Share via


DevicePolicyManager.SetManagedProfileMaximumTimeOff Method

Definition

Called by a profile owner of an organization-owned managed profile to set maximum time the profile is allowed to be turned off.

[Android.Runtime.Register("setManagedProfileMaximumTimeOff", "(Landroid/content/ComponentName;J)V", "GetSetManagedProfileMaximumTimeOff_Landroid_content_ComponentName_JHandler", ApiSince=30)]
public virtual void SetManagedProfileMaximumTimeOff (Android.Content.ComponentName admin, long timeoutMillis);
[<Android.Runtime.Register("setManagedProfileMaximumTimeOff", "(Landroid/content/ComponentName;J)V", "GetSetManagedProfileMaximumTimeOff_Landroid_content_ComponentName_JHandler", ApiSince=30)>]
abstract member SetManagedProfileMaximumTimeOff : Android.Content.ComponentName * int64 -> unit
override this.SetManagedProfileMaximumTimeOff : Android.Content.ComponentName * int64 -> unit

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with

timeoutMillis
Int64

Maximum time the profile is allowed to be off in milliseconds or 0 if not limited. The minimum non-zero value corresponds to 72 hours. If an admin sets a smaller non-zero vaulue, 72 hours will be set instead.

Attributes

Remarks

Called by a profile owner of an organization-owned managed profile to set maximum time the profile is allowed to be turned off. If the profile is turned off for longer, personal apps are suspended on the device.

When personal apps are suspended, an ongoing notification about that is shown to the user. When the user taps the notification, system invokes #ACTION_CHECK_POLICY_COMPLIANCE in the profile owner package. Profile owner implementation that uses personal apps suspension must handle this intent.

Java documentation for android.app.admin.DevicePolicyManager.setManagedProfileMaximumTimeOff(android.content.ComponentName, long).

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