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

Commit 205e26a5 authored by wescande's avatar wescande
Browse files

Clean hidden api - hasUserRestriction



Remove hidden api for mainline project.
Api was rename to hasUserRestrictionForUser

Bug: 190440540
Test: atest BluetoothInstrumentationTests
Tag: #refactor
Signed-off-by: default avatarwescande <wescande@google.com>
Change-Id: I787f5b657eb9e6421c8cf12974d4af51083e498b
parent a4b936a2
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2348,7 +2348,8 @@ public class AdapterService extends Service {


    public synchronized boolean enable(boolean quietMode) {
    public synchronized boolean enable(boolean quietMode) {
        // Enforce the user restriction for disallowing Bluetooth if it was set.
        // Enforce the user restriction for disallowing Bluetooth if it was set.
        if (mUserManager.hasUserRestriction(UserManager.DISALLOW_BLUETOOTH, UserHandle.SYSTEM)) {
        if (mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_BLUETOOTH,
                    UserHandle.SYSTEM)) {
            debugLog("enable() called when Bluetooth was disallowed");
            debugLog("enable() called when Bluetooth was disallowed");
            return false;
            return false;
        }
        }