summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ApplicationPackageManager.java22
-rw-r--r--core/java/android/content/Intent.java12
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java9
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl3
-rw-r--r--core/java/android/content/pm/PackageManager.java17
-rw-r--r--core/java/android/content/pm/PackageParser.java29
-rw-r--r--core/java/android/content/pm/PackageUserState.java3
-rw-r--r--core/java/android/os/IUserManager.aidl3
-rw-r--r--core/java/android/os/UserManager.java58
-rw-r--r--core/java/com/android/internal/app/AlertActivity.java14
-rw-r--r--core/java/com/android/internal/app/RestrictionsPinActivity.java187
-rw-r--r--core/java/com/android/internal/app/RestrictionsPinSetupActivity.java28
12 files changed, 367 insertions, 18 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 271494f..432e9b1 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -1296,6 +1296,28 @@ final class ApplicationPackageManager extends PackageManager {
return PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
}
+ @Override
+ public boolean setApplicationBlockedSettingAsUser(String packageName, boolean blocked,
+ UserHandle user) {
+ try {
+ return mPM.setApplicationBlockedSettingAsUser(packageName, blocked,
+ user.getIdentifier());
+ } catch (RemoteException re) {
+ // Should never happen!
+ }
+ return false;
+ }
+
+ @Override
+ public boolean getApplicationBlockedSettingAsUser(String packageName, UserHandle user) {
+ try {
+ return mPM.getApplicationBlockedSettingAsUser(packageName, user.getIdentifier());
+ } catch (RemoteException re) {
+ // Should never happen!
+ }
+ return false;
+ }
+
/**
* @hide
*/
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 897e6fe..bda7112 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2440,6 +2440,18 @@ public class Intent implements Parcelable, Cloneable {
"android.intent.action.GET_RESTRICTION_ENTRIES";
/**
+ * Activity to challenge the user for a PIN that was configured when setting up
+ * restrictions. Launch the activity using
+ * {@link android.app.Activity#startActivityForResult(Intent, int)} and check if the
+ * result is {@link android.app.Activity#RESULT_OK} for a successful response to the
+ * challenge.<p/>
+ * Before launching this activity, make sure that there is a PIN in effect, by calling
+ * {@link android.os.UserManager#hasRestrictionsPin()}.
+ */
+ public static final String ACTION_RESTRICTIONS_PIN_CHALLENGE =
+ "android.intent.action.RESTRICTIONS_PIN_CHALLENGE";
+
+ /**
* Sent the first time a user is starting, to allow system apps to
* perform one time initialization. (This will not be seen by third
* party applications because a newly initialized user does not have any
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 870610b..9c46d96 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -346,6 +346,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public static final int FLAG_CANT_SAVE_STATE = 1<<28;
/**
+ * Value for {@link #flags}: true if the application is blocked via restrictions and for
+ * most purposes is considered as not installed.
+ * {@hide}
+ */
+ public static final int FLAG_BLOCKED = 1<<27;
+
+ /**
* Flags associated with the application. Any combination of
* {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},
* {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and
@@ -359,7 +366,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
* {@link #FLAG_INSTALLED}.
*/
public int flags = 0;
-
+
/**
* The required smallest screen width the application can run on. If 0,
* nothing has been specified. Comes from
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index a0e1555..eaff7b2 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -399,4 +399,7 @@ interface IPackageManager {
/** Reflects current DeviceStorageMonitorService state */
boolean isStorageLow();
+
+ boolean setApplicationBlockedSettingAsUser(String packageName, boolean blocked, int userId);
+ boolean getApplicationBlockedSettingAsUser(String packageName, int userId);
}
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 4266d85..8a8751e 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -3083,6 +3083,23 @@ public abstract class PackageManager {
public abstract int getApplicationEnabledSetting(String packageName);
/**
+ * Puts the package in a blocked state, which is almost like an uninstalled state,
+ * making the package unavailable, but it doesn't remove the data or the actual
+ * package file.
+ * @hide
+ */
+ public abstract boolean setApplicationBlockedSettingAsUser(String packageName, boolean blocked,
+ UserHandle userHandle);
+
+ /**
+ * Returns the blocked state of a package.
+ * @see #setApplicationBlockedSettingAsUser(String, boolean, UserHandle)
+ * @hide
+ */
+ public abstract boolean getApplicationBlockedSettingAsUser(String packageName,
+ UserHandle userHandle);
+
+ /**
* Return whether the device has been booted into safe mode.
*/
public abstract boolean isSafeMode();
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 883516e..8f0c62d 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -159,7 +159,8 @@ public class PackageParser {
private static WeakReference<byte[]> mReadBuffer;
private static boolean sCompatibilityModeEnabled = true;
- private static final int PARSE_DEFAULT_INSTALL_LOCATION = PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
+ private static final int PARSE_DEFAULT_INSTALL_LOCATION =
+ PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
static class ParsePackageItemArgs {
final Package owner;
@@ -274,15 +275,20 @@ public class PackageParser {
grantedPermissions, state, UserHandle.getCallingUserId());
}
- private static boolean checkUseInstalled(int flags, PackageUserState state) {
- return state.installed || ((flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0);
+ /**
+ * Returns true if the package is installed and not blocked, or if the caller
+ * explicitly wanted all uninstalled and blocked packages as well.
+ */
+ private static boolean checkUseInstalledOrBlocked(int flags, PackageUserState state) {
+ return (state.installed && !state.blocked)
+ || (flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0;
}
public static PackageInfo generatePackageInfo(PackageParser.Package p,
int gids[], int flags, long firstInstallTime, long lastUpdateTime,
HashSet<String> grantedPermissions, PackageUserState state, int userId) {
- if (!checkUseInstalled(flags, state)) {
+ if (!checkUseInstalledOrBlocked(flags, state)) {
return null;
}
PackageInfo pi = new PackageInfo();
@@ -3724,7 +3730,7 @@ public class PackageParser {
return true;
}
}
- if (!state.installed) {
+ if (!state.installed || state.blocked) {
return true;
}
if (state.stopped) {
@@ -3757,6 +3763,11 @@ public class PackageParser {
} else {
ai.flags &= ~ApplicationInfo.FLAG_INSTALLED;
}
+ if (state.blocked) {
+ ai.flags |= ApplicationInfo.FLAG_BLOCKED;
+ } else {
+ ai.flags &= ~ApplicationInfo.FLAG_BLOCKED;
+ }
if (state.enabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
ai.enabled = true;
} else if (state.enabled == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED) {
@@ -3771,7 +3782,7 @@ public class PackageParser {
public static ApplicationInfo generateApplicationInfo(Package p, int flags,
PackageUserState state, int userId) {
if (p == null) return null;
- if (!checkUseInstalled(flags, state)) {
+ if (!checkUseInstalledOrBlocked(flags, state)) {
return null;
}
if (!copyNeeded(flags, p, state, null, userId)
@@ -3855,7 +3866,7 @@ public class PackageParser {
public static final ActivityInfo generateActivityInfo(Activity a, int flags,
PackageUserState state, int userId) {
if (a == null) return null;
- if (!checkUseInstalled(flags, state)) {
+ if (!checkUseInstalledOrBlocked(flags, state)) {
return null;
}
if (!copyNeeded(flags, a.owner, state, a.metaData, userId)) {
@@ -3892,7 +3903,7 @@ public class PackageParser {
public static final ServiceInfo generateServiceInfo(Service s, int flags,
PackageUserState state, int userId) {
if (s == null) return null;
- if (!checkUseInstalled(flags, state)) {
+ if (!checkUseInstalledOrBlocked(flags, state)) {
return null;
}
if (!copyNeeded(flags, s.owner, state, s.metaData, userId)) {
@@ -3937,7 +3948,7 @@ public class PackageParser {
public static final ProviderInfo generateProviderInfo(Provider p, int flags,
PackageUserState state, int userId) {
if (p == null) return null;
- if (!checkUseInstalled(flags, state)) {
+ if (!checkUseInstalledOrBlocked(flags, state)) {
return null;
}
if (!copyNeeded(flags, p.owner, state, p.metaData, userId)
diff --git a/core/java/android/content/pm/PackageUserState.java b/core/java/android/content/pm/PackageUserState.java
index dcd54fc..94e3f79 100644
--- a/core/java/android/content/pm/PackageUserState.java
+++ b/core/java/android/content/pm/PackageUserState.java
@@ -28,6 +28,7 @@ public class PackageUserState {
public boolean stopped;
public boolean notLaunched;
public boolean installed;
+ public boolean blocked; // Is the app restricted by owner / admin
public int enabled;
public String lastDisableAppCaller;
@@ -37,6 +38,7 @@ public class PackageUserState {
public PackageUserState() {
installed = true;
+ blocked = false;
enabled = COMPONENT_ENABLED_STATE_DEFAULT;
}
@@ -45,6 +47,7 @@ public class PackageUserState {
stopped = o.stopped;
notLaunched = o.notLaunched;
enabled = o.enabled;
+ blocked = o.blocked;
lastDisableAppCaller = o.lastDisableAppCaller;
disabledComponents = o.disabledComponents != null
? new HashSet<String>(o.disabledComponents) : null;
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index a11358a..7589a5a 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -46,4 +46,7 @@ interface IUserManager {
int userHandle);
Bundle getApplicationRestrictions(in String packageName);
Bundle getApplicationRestrictionsForUser(in String packageName, int userHandle);
+ boolean changeRestrictionsPin(in String newPin);
+ int checkRestrictionsPin(in String pin);
+ boolean hasRestrictionsPin();
}
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index cb5ed4f..c33a28a 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -140,6 +140,13 @@ public class UserManager {
*/
public static final String DISALLOW_REMOVE_USER = "no_remove_user";
+ /** @hide */
+ public static final int PIN_VERIFICATION_FAILED_INCORRECT = -3;
+ /** @hide */
+ public static final int PIN_VERIFICATION_FAILED_NOT_SET = -2;
+ /** @hide */
+ public static final int PIN_VERIFICATION_SUCCESS = -1;
+
private static UserManager sInstance = null;
/** @hide */
@@ -620,4 +627,55 @@ public class UserManager {
Log.w(TAG, "Could not set application restrictions for user " + user.getIdentifier());
}
}
+
+ /**
+ * @hide
+ * Sets a new restrictions PIN. This should only be called after verifying that there
+ * currently isn't a PIN set, or after the user successfully enters the current PIN.
+ * @param newPin
+ * @return Returns true if the PIN was changed successfully.
+ */
+ public boolean changeRestrictionsPin(String newPin) {
+ try {
+ return mService.changeRestrictionsPin(newPin);
+ } catch (RemoteException re) {
+ Log.w(TAG, "Could not change restrictions pin");
+ }
+ return false;
+ }
+
+ /**
+ * @hide
+ * @param pin The PIN to verify, or null to get the number of milliseconds to wait for before
+ * allowing the user to enter the PIN.
+ * @return Returns a positive number (including zero) for how many milliseconds before
+ * you can accept another PIN, when the input is null or the input doesn't match the saved PIN.
+ * Returns {@link #PIN_VERIFICATION_SUCCESS} if the input matches the saved PIN. Returns
+ * {@link #PIN_VERIFICATION_FAILED_NOT_SET} if there is no PIN set.
+ */
+ public int checkRestrictionsPin(String pin) {
+ try {
+ return mService.checkRestrictionsPin(pin);
+ } catch (RemoteException re) {
+ Log.w(TAG, "Could not check restrictions pin");
+ }
+ return PIN_VERIFICATION_FAILED_INCORRECT;
+ }
+
+ /**
+ * Checks whether the user has restrictions that are PIN-protected. An application that
+ * participates in restrictions can check if the owner has requested a PIN challenge for
+ * any restricted operations. If there is a PIN in effect, the application should launch
+ * the PIN challenge activity {@link android.content.Intent#ACTION_RESTRICTIONS_PIN_CHALLENGE}.
+ * @see android.content.Intent#ACTION_RESTRICTIONS_PIN_CHALLENGE
+ * @return whether a restrictions PIN is in effect.
+ */
+ public boolean hasRestrictionsPin() {
+ try {
+ return mService.hasRestrictionsPin();
+ } catch (RemoteException re) {
+ Log.w(TAG, "Could not change restrictions pin");
+ }
+ return false;
+ }
}
diff --git a/core/java/com/android/internal/app/AlertActivity.java b/core/java/com/android/internal/app/AlertActivity.java
index 7251256..7456def 100644
--- a/core/java/com/android/internal/app/AlertActivity.java
+++ b/core/java/com/android/internal/app/AlertActivity.java
@@ -36,18 +36,18 @@ public abstract class AlertActivity extends Activity implements DialogInterface
* @see #mAlertParams
*/
protected AlertController mAlert;
-
+
/**
* The parameters for the alert.
*/
protected AlertController.AlertParams mAlertParams;
-
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
+
mAlert = new AlertController(this, this, getWindow());
- mAlertParams = new AlertController.AlertParams(this);
+ mAlertParams = new AlertController.AlertParams(this);
}
public void cancel() {
@@ -65,7 +65,7 @@ public abstract class AlertActivity extends Activity implements DialogInterface
/**
* Sets up the alert, including applying the parameters to the alert model,
* and installing the alert's content.
- *
+ *
* @see #mAlert
* @see #mAlertParams
*/
@@ -73,7 +73,7 @@ public abstract class AlertActivity extends Activity implements DialogInterface
mAlertParams.apply(mAlert);
mAlert.installContent();
}
-
+
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (mAlert.onKeyDown(keyCode, event)) return true;
@@ -85,6 +85,4 @@ public abstract class AlertActivity extends Activity implements DialogInterface
if (mAlert.onKeyUp(keyCode, event)) return true;
return super.onKeyUp(keyCode, event);
}
-
-
}
diff --git a/core/java/com/android/internal/app/RestrictionsPinActivity.java b/core/java/com/android/internal/app/RestrictionsPinActivity.java
new file mode 100644
index 0000000..57436f7
--- /dev/null
+++ b/core/java/com/android/internal/app/RestrictionsPinActivity.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.app;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.os.UserManager;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.TextView.OnEditorActionListener;
+
+import com.android.internal.R;
+
+/**
+ * This activity is launched by Settings and other apps to either create a new PIN or
+ * challenge for an existing PIN. The PIN is maintained by UserManager.
+ */
+public class RestrictionsPinActivity extends AlertActivity
+ implements DialogInterface.OnClickListener, TextWatcher, OnEditorActionListener {
+
+ private UserManager mUserManager;
+
+ private EditText mPin1Text;
+ private EditText mPin2Text;
+ private TextView mPinErrorMessage;
+ private TextView mPinMessage;
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+
+ AlertController.AlertParams ap = mAlertParams;
+ ap.mTitle = getString(R.string.restr_pin_enter_pin);
+ ap.mPositiveButtonText = getString(R.string.ok);
+ ap.mNegativeButtonText = getString(R.string.cancel);
+ ap.mPositiveButtonListener = this;
+ ap.mNegativeButtonListener = this;
+ LayoutInflater inflater =
+ (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ ap.mView = inflater.inflate(R.layout.pin_challenge, null);
+
+ mPinMessage = (TextView) ap.mView.findViewById(R.id.pin_message);
+ mPin1Text = (EditText) ap.mView.findViewById(R.id.pin1_text);
+ mPin2Text = (EditText) ap.mView.findViewById(R.id.pin2_text);
+ mPinErrorMessage = (TextView) ap.mView.findViewById(R.id.pin_error_message);
+ mPin1Text.addTextChangedListener(this);
+ mPin2Text.addTextChangedListener(this);
+
+ mUserManager = (UserManager) getSystemService(Context.USER_SERVICE);
+
+ setupAlert();
+ }
+
+ protected boolean verifyingPin() {
+ return true;
+ }
+
+ public void onResume() {
+ super.onResume();
+
+ setPositiveButtonState(false);
+ boolean hasPin = mUserManager.hasRestrictionsPin();
+ if (verifyingPin()) {
+ if (hasPin) {
+ mPinMessage.setVisibility(View.GONE);
+ mPinErrorMessage.setVisibility(View.GONE);
+ mPin2Text.setVisibility(View.GONE);
+ mPin1Text.setOnEditorActionListener(this);
+ updatePinTimer(-1);
+ } else {
+ setResult(RESULT_OK);
+ finish();
+ }
+ } else if (hasPin) {
+ // Shouldn't really be in this state, exit
+ setResult(RESULT_OK);
+ finish();
+ }
+ }
+
+ private void setPositiveButtonState(boolean enabled) {
+ mAlert.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(enabled);
+ }
+
+ private void updatePinTimer(int pinTimerMs) {
+ if (pinTimerMs < 0) {
+ pinTimerMs = mUserManager.checkRestrictionsPin(null);
+ }
+ if (pinTimerMs >= 200) {
+ final int seconds = (pinTimerMs + 200) / 1000;
+ final String formatString = getResources().getQuantityString(
+ R.plurals.restr_pin_countdown,
+ seconds);
+ mPinErrorMessage.setText(String.format(formatString, seconds));
+ mPinErrorMessage.setVisibility(View.VISIBLE);
+ mPin1Text.setEnabled(false);
+ mPin1Text.setText("");
+ setPositiveButtonState(false);
+ mPin1Text.postDelayed(mCountdownRunnable, Math.min(1000, pinTimerMs));
+ } else {
+ mPinErrorMessage.setVisibility(View.INVISIBLE);
+ mPin1Text.setEnabled(true);
+ mPin1Text.setText("");
+ }
+ }
+
+ public void onClick(DialogInterface dialog, int which) {
+ setResult(RESULT_CANCELED);
+ if (which == AlertDialog.BUTTON_POSITIVE) {
+ performPositiveButtonAction();
+ } else if (which == AlertDialog.BUTTON_NEGATIVE) {
+ finish();
+ }
+ }
+
+ private void performPositiveButtonAction() {
+ if (verifyingPin()) {
+ int result = mUserManager.checkRestrictionsPin(mPin1Text.getText().toString());
+ if (result == UserManager.PIN_VERIFICATION_SUCCESS) {
+ setResult(RESULT_OK);
+ finish();
+ } else if (result >= 0) {
+ updatePinTimer(result);
+ }
+ } else {
+ if (mUserManager.changeRestrictionsPin(mPin1Text.getText().toString())) {
+ setResult(RESULT_OK);
+ finish();
+ }
+ }
+ }
+
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ CharSequence pin1 = mPin1Text.getText();
+ if (!verifyingPin()) {
+ CharSequence pin2 = mPin2Text.getText();
+ boolean match = pin1 != null && pin2 != null && pin1.length() >= 4
+ && pin1.toString().equals(pin2.toString());
+ setPositiveButtonState(match);
+ mPinErrorMessage.setVisibility(match ? View.INVISIBLE : View.VISIBLE);
+ } else {
+ setPositiveButtonState(pin1 != null && pin1.length() >= 4);
+ }
+ }
+
+ @Override
+ public void afterTextChanged(Editable s) {
+ }
+
+ @Override
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+ performPositiveButtonAction();
+ return true;
+ }
+
+ private Runnable mCountdownRunnable = new Runnable() {
+ public void run() {
+ updatePinTimer(-1);
+ }
+ };
+}
diff --git a/core/java/com/android/internal/app/RestrictionsPinSetupActivity.java b/core/java/com/android/internal/app/RestrictionsPinSetupActivity.java
new file mode 100644
index 0000000..35f2967
--- /dev/null
+++ b/core/java/com/android/internal/app/RestrictionsPinSetupActivity.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.app;
+
+/**
+ * This activity is launched by Settings and other apps to either create a new PIN or
+ * challenge for an existing PIN. The PIN is maintained by UserManager.
+ */
+public class RestrictionsPinSetupActivity extends RestrictionsPinActivity {
+
+ protected boolean verifyingPin() {
+ return false;
+ }
+}