Don't hide network reset even if it's disabled by admin.

Change-Id: Ib78a3c9434c8543f3be34932264802f1065cc54b
Fix: 37134598
Test: robotests
This commit is contained in:
Fan Zhang
2017-04-28 10:58:41 -07:00
parent 1871806fbe
commit cf96674977
4 changed files with 79 additions and 4 deletions

View File

@@ -45,9 +45,13 @@ public class NetworkResetRestrictionChecker {
mContext, UserManager.DISALLOW_NETWORK_RESET, UserHandle.myUserId()) != null;
}
boolean hasRestriction() {
boolean hasUserRestriction() {
return !mUserManager.isAdminUser()
|| hasUserBaseRestriction()
|| hasUserBaseRestriction();
}
boolean hasRestriction() {
return hasUserRestriction()
|| isRestrictionEnforcedByAdmin();
}
}