Commit Graph

16 Commits

Author SHA1 Message Date
Julia Reynolds
c400ce3c80 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
(cherry picked from commit a295d71c94)
2019-07-26 19:24:43 +00:00
Yanting Yang
67a4449ef5 Clean up import in homepage
- Update import for MetricsProto to SettingsEnums
- Remove unused import
- Sort import

Fixes: 131885942
Test: robotests
Change-Id: I9a5e06adaa19bac9c082f53f1c627356be7148d8
2019-05-03 18:52:07 +08: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
Yanting Yang
316c763316 Improve the latency of NotificationChannelSlice
Get the notification data in parallel to reduce the latency.

Fixes: 123065955
Test: visual, robotests

Change-Id: I434ec68197af214f540ba39ae9155ee7625a2742
2019-04-24 20:54:23 +08:00
Yanting Yang
ce3359f4d4 Clean up NotificationChannelSlice
- Remove unused variable.
- Change function interface.

Bug: 123065955
Test: visual, robotests
Change-Id: I39c0a92539d45cdbc11bd9090a3ab97a72482632
2019-04-16 23:08:40 +08:00
Yanting Yang
78e097f239 Hide notification channel slice that is interacted
- Ignore interacted package in ContextualNotificationChannelSlice.
- Regularly clear package record with background worker.

Bug:129726858
Test: visual, robotests

Change-Id: I94661a53bcbbe4a15479224c33cfb2eff345aa67
2019-04-12 15:27:49 +08:00
Yanting Yang
1a9a748cdb Remove unused method from NotificationChannelSlice
Fixes:129835504
Test: robotests
Change-Id: Id0bcad694bba39ce67c77388b9bde7018aae1560
2019-04-03 17:29:24 +08:00
Yanting Yang
b1d846cbbd Add condition to ignore invalid packages in NotificationChannelSlice
If all displayable notification channels of package are turned off,
stop showing notification channel slice of package.

Bug: 124480122
Test: robotests
Change-Id: I3ce9ebc4cca18dac3b4b6f15c28c697b72df81e3
2019-03-28 18:01:11 +08:00
Yanting Yang
62608f6fe7 Optimize latency of NotificationChannelSlice
- Use NotificationBackend.getChannel() in onNotifyChange().
- Record AppRow and use it in getEnabledChannels().

Bug: 123065955
Test: robotests
Change-Id: I92466d31544128f09d599d86fb265997207eb55c
2019-03-26 18:18:48 +08:00
Yanting Yang
aed7ad5a43 Improve notification slice string on home page
Add ContextualNotificationChannelSlice to show more clear sub title on
notification slice.

Fixes: 128641319
Test: visual, robotests
Change-Id: I650102f4cde7d8d397c7a501ba9ee76c401ba9db
2019-03-20 22:25:59 +08:00
Jason Chiu
dcedd4e2e2 WiFi Slice Polish - Searching for WiFi state
1. Change the font color to be secondary
2. Align the left to the AP list title
3. Update the font for Wi-Fi list to be body font - Roboto regular 14dp

Fixes: 124468947
Test: robotest
Change-Id: I9f41925f7e3938bdf3f444b09eab33d6bf479f57
2019-02-25 17:35:16 +08:00
Yanting Yang
e7f2ec1360 Update subTitle of NotificationChannelSlice
If there are <=3 channels, should not have the "Tap to manage all".

Fixes: 124461104
Test: visual, robotests
Change-Id: Iebb957c65b8ca53f4c5d482041837338b7b3bbf2
2019-02-21 23:57:55 +08:00
Jason Chiu
c78c54a9c6 Add a util method of creating Icon with Drawable
- Add a util method to help create Icon with Drawable so that
users don't need to handle bitmaps
- Add support for creating with ColorDrawable

Test: robotest
Fixes: 124407373
Change-Id: I1897256821cc804a5e599d967feb84a3bcd689a9
2019-02-19 15:51:38 +08:00
Jason Chiu
1217bbec70 Remove sub-text from the lines of AP list in Wi-Fi Slice
- Remove sub-text from the lines of AP list
- Add colors to the AP names to indicate the connection status of each AP

Fixes: 120685004
Bug: 120786304
Test: make RunSettingsRoboTests -j
Change-Id: I7b879248528a293d14d959994bb054275f0d69a1
2019-02-12 16:10:06 +08:00
Yanting Yang
81410323bc Sort notification channel in NotificationChannelSlice
According request to sort the notification channel by average
weekly sent count in descending.

Bug: 119831690
Test: visual, robotests
Change-Id: I96786b077a37dcbc53606f8d98998e01e15b674d
2019-01-29 22:37:54 +08:00
Yanting Yang
aa29da44d8 Add Notification Channel slice to Contextual Settings Homepage
Bug: 119831690
Test: visual, robotests
Change-Id: Ia8d020dcdab181497d4ae4bf968ea641b6908622
2019-01-19 17:09:25 +08:00