OSDN Git Service

Use primary user's LOCK_SCREEN_SHOW_NOTIFICATIONS.
authorPavel Grafov <pgrafov@google.com>
Tue, 3 Jul 2018 19:31:42 +0000 (20:31 +0100)
committerPavel Grafov <pgrafov@google.com>
Tue, 3 Jul 2018 19:47:08 +0000 (20:47 +0100)
commitf14de789f4cc7d145e6011e5a5562876e25c3f31
tree705bfc0fa30aff6faebb6e26ebd9a30cf260ca9c
parent87007778393facface3753401ac8d830280485fa
Use primary user's LOCK_SCREEN_SHOW_NOTIFICATIONS.

Only primary user can set LOCK_SCREEN_SHOW_NOTIFICATIONS,
profile can only set notifications to be redacted. When the
user changes notification settings for a work app, this class
is invoked from the profile, meaning it attempts to read
LOCK_SCREEN_SHOW_NOTIFICATIONS for the profile, which is not
there. As a result the function always returs 0 for work apps.

Bug: 111112011
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/notification/VisibilityPreferenceControllerTest.java
Change-Id: Ifb50209ea8ea8fb6639f00ca8b7cf8a4295890ad
src/com/android/settings/notification/VisibilityPreferenceController.java
tests/robotests/src/com/android/settings/notification/VisibilityPreferenceControllerTest.java