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)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Tue, 17 Jul 2018 23:28:34 +0000 (23:28 +0000)
commit0844fb92d8151773c58f808232182e4116708ca2
tree27dd9f00e6a9eb9637d3c794849eac7f5a4e0433
parent1582ec3db7b2e827a134aaa148f079de36696c9a
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
(cherry picked from commit f14de789f4cc7d145e6011e5a5562876e25c3f31)
src/com/android/settings/notification/VisibilityPreferenceController.java
tests/robotests/src/com/android/settings/notification/VisibilityPreferenceControllerTest.java