Prevent guest user from toggling mobile data Quick Setting
Prevents the guest user from toggling mobile data on/off by using the mobile data quick setting. The guest user is not able to access the network settings menu where mobile data is usually toggled. The guest user should therefore not be able to toggle mobile data on/off by using quick settings. Bug: 150262422 Test: atest SystemUITests Change-Id: I24262d4580fa5d7414d5d3e7e0e42873432ab74f
This commit is contained in:
committed by
Fabian Kozynski
parent
d323c8d428
commit
7f65f1aff2
@@ -25,6 +25,7 @@ import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.service.quicksettings.Tile;
|
||||
import android.telephony.SubscriptionManager;
|
||||
@@ -244,7 +245,8 @@ public class CellularTile extends QSTileImpl<SignalState> {
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return mController.hasMobileDataFeature();
|
||||
return mController.hasMobileDataFeature()
|
||||
&& mHost.getUserContext().getUserId() == UserHandle.USER_SYSTEM;
|
||||
}
|
||||
|
||||
private static final class CallbackInfo {
|
||||
|
||||
Reference in New Issue
Block a user