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

Commit 0b29d7ef 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: 788acf41 am: fe3f185f

Change-Id: I3d55007df34c20442587d06f99015305fe599695
parents 1db50fc6 fe3f185f
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) {