RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in some RestrictedLockUtilsInternal. This causes a lot of trivial code changes. I also updated the ordering of the imports in all affected files. Bug: 110953302 Test: Built make -j RunSettingsRoboTests Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
This commit is contained in:
@@ -53,6 +53,7 @@ import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
import com.android.settingslib.RestrictedLockUtilsInternal;
|
||||
|
||||
import java.security.UnrecoverableKeyException;
|
||||
import java.util.ArrayList;
|
||||
@@ -137,11 +138,12 @@ public class UserCredentialsSettings extends SettingsPreferenceFragment
|
||||
|
||||
final String restriction = UserManager.DISALLOW_CONFIG_CREDENTIALS;
|
||||
final int myUserId = UserHandle.myUserId();
|
||||
if (!RestrictedLockUtils.hasBaseUserRestriction(getContext(), restriction, myUserId)) {
|
||||
if (!RestrictedLockUtilsInternal.hasBaseUserRestriction(getContext(), restriction,
|
||||
myUserId)) {
|
||||
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
|
||||
@Override public void onClick(DialogInterface dialog, int id) {
|
||||
final EnforcedAdmin admin = RestrictedLockUtils.checkIfRestrictionEnforced(
|
||||
getContext(), restriction, myUserId);
|
||||
final EnforcedAdmin admin = RestrictedLockUtilsInternal
|
||||
.checkIfRestrictionEnforced(getContext(), restriction, myUserId);
|
||||
if (admin != null) {
|
||||
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(getContext(),
|
||||
admin);
|
||||
|
Reference in New Issue
Block a user