Freigeben über


DevicePolicyManager.SetSystemSetting(ComponentName, String, String) Method

Definition

Called by a device or profile owner to update android.provider.Settings.System settings.

[Android.Runtime.Register("setSystemSetting", "(Landroid/content/ComponentName;Ljava/lang/String;Ljava/lang/String;)V", "GetSetSystemSetting_Landroid_content_ComponentName_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=28)]
public virtual void SetSystemSetting (Android.Content.ComponentName admin, string setting, string? value);
[<Android.Runtime.Register("setSystemSetting", "(Landroid/content/ComponentName;Ljava/lang/String;Ljava/lang/String;)V", "GetSetSystemSetting_Landroid_content_ComponentName_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=28)>]
abstract member SetSystemSetting : Android.Content.ComponentName * string * string -> unit
override this.SetSystemSetting : Android.Content.ComponentName * string * string -> unit

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with.

setting
String

The name of the setting to update.

value
String

The value to update the setting to.

Attributes

Remarks

Called by a device or profile owner to update android.provider.Settings.System settings. Validation that the value of the setting is in the correct form for the setting type should be performed by the caller.

The settings that can be updated by a device owner or profile owner of secondary user with this method are: <ul> <li>android.provider.Settings.System#SCREEN_BRIGHTNESS</li> <li>android.provider.Settings.System#SCREEN_BRIGHTNESS_MODE</li> <li>android.provider.Settings.System#SCREEN_OFF_TIMEOUT</li> </ul>

Java documentation for android.app.admin.DevicePolicyManager.setSystemSetting(android.content.ComponentName, java.lang.String, java.lang.String).

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