Merge "Handle renamed APIs" into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
256637ffb3
@@ -80,9 +80,9 @@ public class MasterClear extends Fragment {
|
||||
}
|
||||
|
||||
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;
|
||||
|
@@ -173,7 +173,7 @@ public class RestrictedSettingsFragment extends SettingsPreferenceFragment {
|
||||
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 @@ public class RestrictedSettingsFragment extends SettingsPreferenceFragment {
|
||||
((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 @@ public class RestrictedSettingsFragment extends SettingsPreferenceFragment {
|
||||
return false;
|
||||
}
|
||||
return mUserManager.hasUserRestriction(mRestrictionKey)
|
||||
&& !mUserManager.hasRestrictionsPin();
|
||||
&& !mUserManager.hasRestrictionsChallenge();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -230,7 +230,7 @@ public class RestrictedSettingsFragment extends SettingsPreferenceFragment {
|
||||
}
|
||||
boolean restricted = RESTRICTIONS_PIN_SET.equals(restrictionKey)
|
||||
|| mUserManager.hasUserRestriction(restrictionKey);
|
||||
return restricted && mUserManager.hasRestrictionsPin();
|
||||
return restricted && mUserManager.hasRestrictionsChallenge();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -380,7 +380,7 @@ public class TrustedCredentialsSettings extends Fragment {
|
||||
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 @@ public class TrustedCredentialsSettings extends Fragment {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user