Prevent guest users from toggling "hide silent notifications"
This is a global setting, not per user, and shouldn't be modifiable by a guest. It can still be toggled by other, "normal" users, for the same global effect. Fixes: 260570341 Test: atest Change-Id: Id6e1803b5364f3b50bdbc14af0468979c96b5638
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.notification;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.UserManager;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
@@ -51,7 +52,7 @@ public class SilentStatusBarPreferenceController extends TogglePreferenceControl
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
return UserManager.get(mContext).isGuestUser() ? DISABLED_FOR_USER : AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user