Specify limitations of DISALLOW_UNINSTALL_APPS in documentation

Bug: 24928722
Fix: 29871221
Bug: 31344846

Test: Builds successfully

Change-Id: I870c71d537da79b9dd50f81ba5394eb8afc8d839
This commit is contained in:
Esteban Talavera
2017-02-13 12:35:04 +00:00
parent 3f7bf2e96c
commit 8bd7c52fb0

View File

@@ -30,6 +30,7 @@ import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentSender;
import android.content.pm.UserInfo;
import android.content.res.Resources;
@@ -421,6 +422,14 @@ public class UserManager {
* <p>
* The default value is <code>false</code>.
*
* <p><strong>Note:</strong> The user will still be able to perform those actions via other
* means (such as adb). Third party apps will also be able to uninstall apps via the
* {@link android.content.pm.PackageInstaller}. {@link #DISALLOW_UNINSTALL_APPS} or
* {@link DevicePolicyManager#setUninstallBlocked(ComponentName, String, boolean)} should be
* used to prevent the user from uninstalling apps completely, and
* {@link DevicePolicyManager#addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)}
* to add a default intent handler for a given intent filter.
*
* <p>Key for user restrictions.
* <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String)