Loading src/com/android/settings/notification/RedactNotificationPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class RedactNotificationPreferenceController extends TogglePreferenceCont public int getAvailabilityStatus() { // hide work profile setting if no work profile if (KEY_LOCKSCREEN_WORK_PROFILE_REDACT.equals(getPreferenceKey()) && mProfileUserId == UserHandle.USER_NULL) { && mProfileUserId == UserHandle.myUserId()) { return CONDITIONALLY_UNAVAILABLE; } Loading tests/robotests/src/com/android/settings/notification/RedactNotificationPreferenceControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class RedactNotificationPreferenceControllerTest { @Test public void getAvailabilityStatus_noWorkProfile() { // reset controllers with no work profile when(mUm.getProfileIdsWithDisabled(anyInt())).thenReturn(new int[] {UserHandle.USER_NULL}); when(mUm.getProfileIdsWithDisabled(anyInt())).thenReturn(new int[] {UserHandle.myUserId()}); mWorkController = new RedactNotificationPreferenceController(mMockContext, RedactNotificationPreferenceController.KEY_LOCKSCREEN_WORK_PROFILE_REDACT); mController = new RedactNotificationPreferenceController(mMockContext, Loading Loading
src/com/android/settings/notification/RedactNotificationPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class RedactNotificationPreferenceController extends TogglePreferenceCont public int getAvailabilityStatus() { // hide work profile setting if no work profile if (KEY_LOCKSCREEN_WORK_PROFILE_REDACT.equals(getPreferenceKey()) && mProfileUserId == UserHandle.USER_NULL) { && mProfileUserId == UserHandle.myUserId()) { return CONDITIONALLY_UNAVAILABLE; } Loading
tests/robotests/src/com/android/settings/notification/RedactNotificationPreferenceControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class RedactNotificationPreferenceControllerTest { @Test public void getAvailabilityStatus_noWorkProfile() { // reset controllers with no work profile when(mUm.getProfileIdsWithDisabled(anyInt())).thenReturn(new int[] {UserHandle.USER_NULL}); when(mUm.getProfileIdsWithDisabled(anyInt())).thenReturn(new int[] {UserHandle.myUserId()}); mWorkController = new RedactNotificationPreferenceController(mMockContext, RedactNotificationPreferenceController.KEY_LOCKSCREEN_WORK_PROFILE_REDACT); mController = new RedactNotificationPreferenceController(mMockContext, Loading