summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndrew Stadler <stadler@android.com>2010-02-08 22:59:36 -0800
committerAndrew Stadler <stadler@android.com>2010-02-08 22:59:36 -0800
commit88209d15dd5fcb883403525a6455857566e3aee7 (patch)
treee49571ebf656dae79710f0fa1c19c8ce1b1fb8a2 /core
parent53bd2522ca7767f46646606123b6e2689b811850 (diff)
downloadframeworks_base-88209d15dd5fcb883403525a6455857566e3aee7.zip
frameworks_base-88209d15dd5fcb883403525a6455857566e3aee7.tar.gz
frameworks_base-88209d15dd5fcb883403525a6455857566e3aee7.tar.bz2
Fixes to DeviceAdmin & DevicePolicyManager Javadoc
1. Fix build break caused by renaming of sample app files 2. Rewrote JavaDoc for setMaximumFailedPasswords()
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/DeviceAdmin.java2
-rw-r--r--core/java/android/app/DevicePolicyManager.java18
2 files changed, 13 insertions, 7 deletions
diff --git a/core/java/android/app/DeviceAdmin.java b/core/java/android/app/DeviceAdmin.java
index ecbad01..af9c379 100644
--- a/core/java/android/app/DeviceAdmin.java
+++ b/core/java/android/app/DeviceAdmin.java
@@ -40,7 +40,7 @@ import android.os.Bundle;
* to the device administrator, as parsed by the {@link DeviceAdminInfo} class.
* A typical file would be:</p>
*
- * {@sample development/samples/ApiDemos/res/xml/sample_device_admin.xml meta_data}
+ * {@sample development/samples/ApiDemos/res/xml/device_admin_sample.xml meta_data}
*/
public class DeviceAdmin extends BroadcastReceiver {
private static String TAG = "DevicePolicy";
diff --git a/core/java/android/app/DevicePolicyManager.java b/core/java/android/app/DevicePolicyManager.java
index 08cdd05..847e879 100644
--- a/core/java/android/app/DevicePolicyManager.java
+++ b/core/java/android/app/DevicePolicyManager.java
@@ -328,14 +328,20 @@ public class DevicePolicyManager {
}
/**
- * Set the maximum number of failed password attempts that are allowed
- * before the device wipes its data. This is convenience for implementing
- * the corresponding functionality with a combination of watching failed
- * password attempts and calling {@link #wipeData} upon reaching a certain
- * count, and as such requires that you request both
- * {@link DeviceAdminInfo#USES_POLICY_WATCH_LOGIN} and
+ * Setting this to a value greater than zero enables a built-in policy
+ * that will perform a device wipe after too many incorrect
+ * device-unlock passwords have been entered. This built-in policy combines
+ * watching for failed passwords and wiping the device, and requires
+ * that you request both {@link DeviceAdminInfo#USES_POLICY_WATCH_LOGIN} and
* {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA}}.
*
+ * <p>To implement any other policy (e.g. wiping data for a particular
+ * application only, erasing or revoking credentials, or reporting the
+ * failure to a server), you should implement
+ * {@link DeviceAdmin#onPasswordFailed(Context, android.content.Intent)}
+ * instead. Do not use this API, because if the maximum count is reached,
+ * the device will be wiped immediately, and your callback will not be invoked.
+ *
* @param admin Which {@link DeviceAdmin} this request is associated with.
* @param num The number of failed password attempts at which point the
* device will wipe its data.