Compartir a través de


UserManager.DisallowAppsControl Field

Definition

Specifies if a user is disallowed from modifying applications in Settings or launchers.

[Android.Runtime.Register("DISALLOW_APPS_CONTROL")]
public const string DisallowAppsControl;
[<Android.Runtime.Register("DISALLOW_APPS_CONTROL")>]
val mutable DisallowAppsControl : string

Field Value

Attributes

Remarks

Specifies if a user is disallowed from modifying applications in Settings or launchers. The following actions will not be allowed when this restriction is enabled: <li>uninstalling apps</li> <li>disabling apps</li> <li>clearing app caches</li> <li>clearing app data</li> <li>force stopping apps</li> <li>clearing app defaults</li>

The default value is false.

<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 android.content.pm.PackageInstaller. #DISALLOW_UNINSTALL_APPS or DevicePolicyManager#setUninstallBlocked(ComponentName, String, boolean) should be used to prevent the user from uninstalling apps completely, and DevicePolicyManager#addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName) to add a default intent handler for a given intent filter.

Holders of the permission android.Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

Java documentation for android.os.UserManager.DISALLOW_APPS_CONTROL.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also