Share via


DevicePolicyManager.SetDeviceOwnerLockScreenInfo Method

Definition

Overloads

SetDeviceOwnerLockScreenInfo(ComponentName, ICharSequence)

Sets the device owner information to be shown on the lock screen.

SetDeviceOwnerLockScreenInfo(ComponentName, String)

Sets the device owner information to be shown on the lock screen.

SetDeviceOwnerLockScreenInfo(ComponentName, ICharSequence)

Sets the device owner information to be shown on the lock screen.

[Android.Runtime.Register("setDeviceOwnerLockScreenInfo", "(Landroid/content/ComponentName;Ljava/lang/CharSequence;)V", "GetSetDeviceOwnerLockScreenInfo_Landroid_content_ComponentName_Ljava_lang_CharSequence_Handler", ApiSince=24)]
public virtual void SetDeviceOwnerLockScreenInfo (Android.Content.ComponentName admin, Java.Lang.ICharSequence? info);
[<Android.Runtime.Register("setDeviceOwnerLockScreenInfo", "(Landroid/content/ComponentName;Ljava/lang/CharSequence;)V", "GetSetDeviceOwnerLockScreenInfo_Landroid_content_ComponentName_Ljava_lang_CharSequence_Handler", ApiSince=24)>]
abstract member SetDeviceOwnerLockScreenInfo : Android.Content.ComponentName * Java.Lang.ICharSequence -> unit
override this.SetDeviceOwnerLockScreenInfo : Android.Content.ComponentName * Java.Lang.ICharSequence -> unit

Parameters

admin
ComponentName

The name of the admin component to check.

info
ICharSequence

Device owner information which will be displayed instead of the user owner info.

Attributes

Remarks

Sets the device owner information to be shown on the lock screen.

Device owner information set using this method overrides any owner information manually set by the user and prevents the user from further changing it.

If the device owner information is null or empty then the device owner info is cleared and the user owner info is shown on the lock screen if it is set.

If the device owner information contains only whitespaces then the message on the lock screen will be blank and the user will not be allowed to change it.

If the device owner information needs to be localized, it is the responsibility of the DeviceAdminReceiver to listen to the Intent#ACTION_LOCALE_CHANGED broadcast and set a new version of this string accordingly.

May be called by the device owner or the profile owner of an organization-owned device.

Java documentation for android.app.admin.DevicePolicyManager.setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.CharSequence).

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

SetDeviceOwnerLockScreenInfo(ComponentName, String)

Sets the device owner information to be shown on the lock screen.

public void SetDeviceOwnerLockScreenInfo (Android.Content.ComponentName admin, string? info);
member this.SetDeviceOwnerLockScreenInfo : Android.Content.ComponentName * string -> unit

Parameters

admin
ComponentName

The name of the admin component to check.

info
String

Device owner information which will be displayed instead of the user owner info.

Remarks

Sets the device owner information to be shown on the lock screen.

Device owner information set using this method overrides any owner information manually set by the user and prevents the user from further changing it.

If the device owner information is null or empty then the device owner info is cleared and the user owner info is shown on the lock screen if it is set.

If the device owner information contains only whitespaces then the message on the lock screen will be blank and the user will not be allowed to change it.

If the device owner information needs to be localized, it is the responsibility of the DeviceAdminReceiver to listen to the Intent#ACTION_LOCALE_CHANGED broadcast and set a new version of this string accordingly.

May be called by the device owner or the profile owner of an organization-owned device.

Java documentation for android.app.admin.DevicePolicyManager.setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.CharSequence).

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