Loading src/com/android/settings/network/TetherPreferenceController.java +6 −2 Original line number Diff line number Diff line Loading @@ -88,8 +88,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp public TetherPreferenceController(Context context, Lifecycle lifecycle) { super(context); mBluetoothPan = new AtomicReference<>(); mAdminDisallowedTetherConfig = checkIfRestrictionEnforced( mContext, DISALLOW_CONFIG_TETHERING, UserHandle.myUserId()) != null; mAdminDisallowedTetherConfig = isTetherConfigDisallowed(context); mConnectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); Loading Loading @@ -170,6 +169,11 @@ public class TetherPreferenceController extends AbstractPreferenceController imp } } public static boolean isTetherConfigDisallowed(Context context) { return checkIfRestrictionEnforced( context, DISALLOW_CONFIG_TETHERING, UserHandle.myUserId()) != null; } @VisibleForTesting void updateSummary() { if (mPreference == null) { Loading Loading
src/com/android/settings/network/TetherPreferenceController.java +6 −2 Original line number Diff line number Diff line Loading @@ -88,8 +88,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp public TetherPreferenceController(Context context, Lifecycle lifecycle) { super(context); mBluetoothPan = new AtomicReference<>(); mAdminDisallowedTetherConfig = checkIfRestrictionEnforced( mContext, DISALLOW_CONFIG_TETHERING, UserHandle.myUserId()) != null; mAdminDisallowedTetherConfig = isTetherConfigDisallowed(context); mConnectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); Loading Loading @@ -170,6 +169,11 @@ public class TetherPreferenceController extends AbstractPreferenceController imp } } public static boolean isTetherConfigDisallowed(Context context) { return checkIfRestrictionEnforced( context, DISALLOW_CONFIG_TETHERING, UserHandle.myUserId()) != null; } @VisibleForTesting void updateSummary() { if (mPreference == null) { Loading