OSDN Git Service

Clear deprecated effects when saving zen policy
authorBeverly <beverlyt@google.com>
Thu, 10 May 2018 17:28:00 +0000 (13:28 -0400)
committerBeverly <beverlyt@google.com>
Thu, 10 May 2018 17:37:37 +0000 (13:37 -0400)
commit3403c3729e0b3cabc35cb56be3f04db13b4cafa6
treef7ea27136a2f8d2d53347d294f9da43a64f3b22d
parent200da8978f45d2afeeaa8f5a5a03603102d7809e
Clear deprecated effects when saving zen policy

- Deprecated effects are set in NotificationManagerService,
so unset them before setting the NotificationPolicy
- When user clicks on Custom, they are brought to the custom vis effects
page instead of resetting custom values to presets

Fixes: 79383781
Test: manual
Test: NotificationManagerServiceTest testSetNotificationPolicy_preP_setOldNewFields
Change-Id: Id6db9ce2aaeed6321389f8dbfbea65eda30c74ad
src/com/android/settings/notification/ZenModeBackend.java
src/com/android/settings/notification/ZenModeRestrictNotificationsSettings.java
src/com/android/settings/notification/ZenModeVisEffectsCustomPreferenceController.java
tests/robotests/src/com/android/settings/notification/ZenModeVisEffectsCustomPreferenceControllerTest.java