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

Commit fb37824e authored by Zoey Chen's avatar Zoey Chen
Browse files

[Provider Model] Fix the condition about admin user

Only the user is admin AND the admin is allowed to config mobile network

Bug: 196020201
Test: manual
Change-Id: I566dfa7585ade8fcba53a6a98213776e156267bd
Merged-In: I566dfa7585ade8fcba53a6a98213776e156267bd
(cherry picked from commit 0906d57b)
parent 0cf7dc97
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -123,7 +123,7 @@ public class AccessPointControllerImpl


    public boolean canConfigMobileData() {
    public boolean canConfigMobileData() {
        return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS,
        return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS,
                UserHandle.of(mCurrentUser)) || mUserTracker.getUserInfo().isAdmin();
                UserHandle.of(mCurrentUser)) && mUserTracker.getUserInfo().isAdmin();
    }
    }


    public void onUserSwitched(int newUserId) {
    public void onUserSwitched(int newUserId) {