Commit Graph

19 Commits

Author SHA1 Message Date
Julia Reynolds
a295d71c94 Move channel listing into a pref controller
And a hidden preference category. This makes
hiding/showing the list a lot cleaner and also allows more
of the code to be tested.

Also delete some unused code that no longer complied after
this refactor.

Fixes: 133443871
Test: atest
Change-Id: I4a5fe0e075019bae2df44a0a9dcec26a40ee6d12
2019-07-02 11:24:50 -04:00
Julia Reynolds
72bdef0781 Fix hiding of channel fields
When channel is off

Test: atest
Bug: 132971502
Change-Id: I5772266e022e5ebb5dbf20f231ca30fad95e3db7
2019-05-20 14:03:07 -04:00
Julia Reynolds
a540fa56d4 Fix visibility and editability of importance fields
- Block field should always be visible
- Locked by OEM: cannot block or change importance
- Locked by default app: cannot block, can change importance
- Locked by system app: cannot block, can change importance
- system app but blockable: can block, can change importance

Test: robotests
Fixes: 131248127
Change-Id: Ifa718c84573dd5125aefa4f672a79dc4f267d515
2019-04-28 22:01:36 -04:00
Julia Reynolds
73c647513b Non-blockable whitelist should only control importance fields
Sounds, etc. should still be modifiable

Test: robotests
Fixes: 130086523
Change-Id: I1a95a73b299bb3afd169b249a3dabae3583a448a
2019-04-18 18:58:12 +00:00
Julia Reynolds
2290e284ec Fix visibility of settings on channel page
Properly hide fields if the parent app or group
is blocked. This is needed because apps can link
directly to this screen.

Test: atest
Fixes: 130184191
Change-Id: I8c39410574940615fbb607a201e20e480ec02d87
2019-04-10 09:57:02 -04:00
Julia Reynolds
bd2bb06567 Prevent oem locked and default apps from being blocked
Test: robotests
Fixes: 129358763
Change-Id: I999b017f9f7389424e499a44cfac43711acbbbea
2019-03-28 16:42:13 -04:00
Julia Reynolds
9c6f1aa74b Fix channel configurability check
Test: atest
Fixes: 128669244
Change-Id: Ib4bc666262426ea1fb8fc034a361c93bdd5afb36
2019-03-15 17:19:02 +00:00
Fan Zhang
cdf284b732 Make Settings robotest work with tot Robolectric
Bug: 116278591
Test: make -j RunSettingsRoboTests
Change-Id: I32cb2fcf6094675f79d2fc24702ef6298a9691e4
2018-10-31 17:59:17 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Julia Reynolds
9e2ec5fa07 Hide block pref on non-configurable channels
Test: robotests
Bug: 109875297
Change-Id: I164ae2e07d178db9e84746e5c59f0968e6c77eae
2018-06-07 19:49:49 +00:00
Julia Reynolds
fea643e243 Merge "Use standard displayPreference" into pi-dev am: eba0723a57
am: b7bfb04f50

Change-Id: I8f6704247d5e633cc1d6cd3d75403837606fca03
2018-05-23 16:05:38 -07:00
Julia Reynolds
b9676e9076 Use standard displayPreference
For notification fields. This is required for them to
display properly within an 'advanced' preference category.

Test: robotests, manual
Change-Id: I1e1ff0e801e136c6a86a0d9164ed21d4160e897a
Fixes: 80132743
2018-05-23 16:44:44 +00:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Julia Reynolds
e2897aedf5 Fix crash on rotation
Load app/channel data early so that any open dialogs can be properly
reconstructed. Never call done on an entityheadercontroller with
an activity that's not yet started.

Test: robotests
Change-Id: Ib2b9f8f1985ef038959062204aaceff686f4ebcf
Fixes: 74114917
2018-04-19 10:17:23 -04:00
Julia Reynolds
d7815fe18f Notification settings updates
- smaller icons
- text update
- fx header
- fix category header

Test: make -j RunSettingsRoboTests

Change-Id: If822d6db31a8dccf20ee88182cda1aee34aa7675
Fixes: 77325154
Fixes: 77323406
Fixes: 77324677
Fixes: 74408368
2018-04-09 17:24:09 -04:00
Fan Zhang
1781cf2cef Remove wrapper class for NotificationGroup.
It's no longer needed as Robolectric can natively support framework
classes

Bug: 76167422
Test: robotests
Change-Id: If0ac597370240b8efaa8df8783a5c309a2322a3f
2018-03-30 16:09:34 -07:00
Julia Reynolds
a87cee11b6 Restore group block button.
Test: RunSettingsRoboTests
Bug: 63927402
Change-Id: I2e8163082d81d696dce2082be49a16c85458672b
2017-11-20 09:11:57 -05:00
Julia Reynolds
ac3f7e80dc PreferenceControllers are the way of the future.
Migrates Notification settings (app level, group level, and channel
level) into PreferenceControllers (and most importantly:
PreferenceControllerTest)

Note: this removes the 'Advanced' preference group, but does
not yet use the standard system 'Advanced' grouping as it does
not currently support our use case (where we don't know how many
fields to show outside of 'Advanced' until onResume() and also
where we need fields to show below the 'Advanced' group).

Test: make RunSettingsRoboTests
Change-Id: Iddd1b4771922db322e5f73562e9d63ed077c5396
2017-11-06 13:50:26 -05:00