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

Commit 33b7f2df authored by Erik Kline's avatar Erik Kline Committed by Gerrit Code Review
Browse files

Merge "Make tetherChangePermission to be secured for AppOps permission"

parents b831b055 b9ad638c
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)) {