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

Commit d53ced3a authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Automerger Merge Worker
Browse files

Merge "Pipe through attributionTag though bt app" am: da0f4e11

Change-Id: I35d8215989529dec1ad0cf550ad8bc1ba56e58bd
parents 7f5418a5 da0f4e11
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -306,14 +306,14 @@ public class PanService extends ProfileService {
        }

        @Override
        public void setBluetoothTethering(boolean value, String pkgName) {
        public void setBluetoothTethering(boolean value, String pkgName, String attributionTag) {
            PanService service = getService();
            if (service == null) {
                return;
            }
            Log.d(TAG, "setBluetoothTethering: " + value + ", pkgName: " + pkgName
                    + ", mTetherOn: " + service.mTetherOn);
            service.setBluetoothTethering(value, pkgName);
            service.setBluetoothTethering(value, pkgName, attributionTag);
        }

        @Override
@@ -390,7 +390,8 @@ public class PanService extends ProfileService {
        return mTetherOn;
    }

    void setBluetoothTethering(boolean value, final String pkgName) {
    void setBluetoothTethering(boolean value, final String pkgName,
            final String callingAttributionTag) {
        if (DBG) {
            Log.d(TAG, "setBluetoothTethering: " + value + ", mTetherOn: " + mTetherOn);
        }
@@ -398,7 +399,7 @@ public class PanService extends ProfileService {
                BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission");
        final Context context = getBaseContext();

        ConnectivityManager.enforceTetherChangePermission(context, pkgName);
        ConnectivityManager.enforceTetherChangePermission(context, pkgName, callingAttributionTag);

        UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
        if (um.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING) && value) {