Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f25a6fbb authored by Erik Kline's avatar Erik Kline Committed by android-build-merger
Browse files

Merge "Make tetherChangePermission to be secured for AppOps permission" am:...

Merge "Make tetherChangePermission to be secured for AppOps permission" am: 33b7f2df am: 86bdfc1e
am: 13074fbd

Change-Id: I2718753d47e9845bcea47eb1d09a54adfdfa95ff
parents f93f95bf 13074fbd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -324,7 +324,9 @@ public class PanService extends ProfileService {

    void setBluetoothTethering(boolean value) {
        if(DBG) Log.d(TAG, "setBluetoothTethering: " + value +", mTetherOn: " + mTetherOn);
        ConnectivityManager.enforceTetherChangePermission(getBaseContext());
        final Context context = getBaseContext();
        String pkgName = context.getOpPackageName();
        ConnectivityManager.enforceTetherChangePermission(context, pkgName);
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission");
        UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
        if (um.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING)) {