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 f14de789)
Loading
Please register or sign in to comment