Fix work profile setting appearing too often

That is, when the user didn't have work profile

Test: robotests, manual
Fixes: 187520760
Change-Id: I9394359a6bc278d58ef13b30f8ce99cbaa595c25
This commit is contained in:
Julia Reynolds
2021-05-07 15:01:58 -04:00
parent f9ebf6600f
commit 540ad99d88
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}