Use pref controller to get non-indexable in network setting
Change-Id: I2bcc9047146f4ad014d5929e66ee895ee497b641 Fix: 62555826 Test: robotests
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
*/
|
||||
package com.android.settings.network;
|
||||
|
||||
import static android.os.UserManager.DISALLOW_CONFIG_TETHERING;
|
||||
import static com.android.settingslib.RestrictedLockUtils.checkIfRestrictionEnforced;
|
||||
import static com.android.settingslib.RestrictedLockUtils.hasBaseUserRestriction;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothPan;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
@@ -46,11 +50,6 @@ import com.android.settingslib.core.lifecycle.events.OnResume;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static android.os.UserManager.DISALLOW_CONFIG_TETHERING;
|
||||
|
||||
import static com.android.settingslib.RestrictedLockUtils.checkIfRestrictionEnforced;
|
||||
import static com.android.settingslib.RestrictedLockUtils.hasBaseUserRestriction;
|
||||
|
||||
public class TetherPreferenceController extends AbstractPreferenceController implements
|
||||
PreferenceControllerMixin, LifecycleObserver, OnCreate, OnResume, OnPause, OnDestroy {
|
||||
|
||||
@@ -90,7 +89,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
|
||||
super(context);
|
||||
mBluetoothPan = new AtomicReference<>();
|
||||
mAdminDisallowedTetherConfig = checkIfRestrictionEnforced(
|
||||
context, DISALLOW_CONFIG_TETHERING, UserHandle.myUserId()) != null;
|
||||
mContext, DISALLOW_CONFIG_TETHERING, UserHandle.myUserId()) != null;
|
||||
mConnectivityManager =
|
||||
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
|
||||
Reference in New Issue
Block a user