Handle renamed APIs
Bug: 10461761
Change-Id: If63c3801663b347a4643e44d5bd3bab4e3049578
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index 3777a8e..262aca3 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -80,9 +80,9 @@
}
private boolean runRestrictionsChallenge() {
- if (UserManager.get(getActivity()).hasRestrictionsPin()) {
+ if (UserManager.get(getActivity()).hasRestrictionsChallenge()) {
startActivityForResult(
- new Intent(Intent.ACTION_RESTRICTIONS_PIN_CHALLENGE), PIN_REQUEST);
+ new Intent(Intent.ACTION_RESTRICTIONS_CHALLENGE), PIN_REQUEST);
return true;
}
return false;
diff --git a/src/com/android/settings/RestrictedSettingsFragment.java b/src/com/android/settings/RestrictedSettingsFragment.java
index ac1f7e3..34eda1e 100644
--- a/src/com/android/settings/RestrictedSettingsFragment.java
+++ b/src/com/android/settings/RestrictedSettingsFragment.java
@@ -173,7 +173,7 @@
if (!mChallengeSucceeded) {
final UserManager um = UserManager.get(getActivity());
if (!mChallengeRequested) {
- if (um.hasRestrictionsPin()) {
+ if (um.hasRestrictionsChallenge()) {
mResumeActionBundle = new Bundle();
if (preference != null) {
mResumeActionBundle.putString(EXTRA_PREFERENCE, preference.getKey());
@@ -182,7 +182,7 @@
((CheckBoxPreference)preference).isChecked());
}
}
- Intent requestPin = new Intent(Intent.ACTION_RESTRICTIONS_PIN_CHALLENGE);
+ Intent requestPin = new Intent(Intent.ACTION_RESTRICTIONS_CHALLENGE);
startActivityForResult(requestPin, REQUEST_PIN_CHALLENGE);
mChallengeRequested = true;
}
@@ -200,7 +200,7 @@
return false;
}
return mUserManager.hasUserRestriction(mRestrictionKey)
- && !mUserManager.hasRestrictionsPin();
+ && !mUserManager.hasRestrictionsChallenge();
}
/**
@@ -230,7 +230,7 @@
}
boolean restricted = RESTRICTIONS_PIN_SET.equals(restrictionKey)
|| mUserManager.hasUserRestriction(restrictionKey);
- return restricted && mUserManager.hasRestrictionsPin();
+ return restricted && mUserManager.hasRestrictionsChallenge();
}
/**
diff --git a/src/com/android/settings/TrustedCredentialsSettings.java b/src/com/android/settings/TrustedCredentialsSettings.java
index 3e3d5a3..cdb96cb 100644
--- a/src/com/android/settings/TrustedCredentialsSettings.java
+++ b/src/com/android/settings/TrustedCredentialsSettings.java
@@ -380,7 +380,7 @@
removeButton.setText(certHolder.mTab.getButtonLabel(certHolder));
removeButton.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
- if (mUserManager.hasRestrictionsPin() && !mChallengeSucceeded) {
+ if (mUserManager.hasRestrictionsChallenge() && !mChallengeSucceeded) {
ensurePin();
return;
}
@@ -426,9 +426,9 @@
if (!mChallengeSucceeded) {
final UserManager um = UserManager.get(getActivity());
if (!mChallengeRequested) {
- if (um.hasRestrictionsPin()) {
+ if (um.hasRestrictionsChallenge()) {
Intent requestPin =
- new Intent(Intent.ACTION_RESTRICTIONS_PIN_CHALLENGE);
+ new Intent(Intent.ACTION_RESTRICTIONS_CHALLENGE);
startActivityForResult(requestPin, REQUEST_PIN_CHALLENGE);
mChallengeRequested = true;
}