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

Commit fbd2fd2e authored by Alexandru-Andrei Rotaru's avatar Alexandru-Andrei Rotaru
Browse files

Allow disabling of Bluetooth tethering if DISALLOW_CONFIG_TETHERING in on

When turning on the tethering service through Bluetooth connection
and then enabling the DISALLOW_CONFIG_TETHERING restriction from
TestDPC/User Restrinctions, it should run normally without any incidents.

Without this change, this scenario would raise a SecurityException from
bluetoothTethering(false); (file: PanService)

Bug: 27936525
Merged-In: I2df490ac28f129b369f531d106f924a88d721433
Test: manual
Change-Id: I2df490ac28f129b369f531d106f924a88d721433
parent e3e952d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ public class PanService extends ProfileService {
        }

        UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
        if (um.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING)) {
        if (um.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING) && value) {
            throw new SecurityException("DISALLOW_CONFIG_TETHERING is enabled for this user.");
        }
        if(mTetherOn != value) {