SettingsPreferenceMetadata.Builder


public static final class SettingsPreferenceMetadata.Builder
extends Object

java.lang.Object
   ↳ android.service.settings.preferences.SettingsPreferenceMetadata.Builder


Builder to construct SettingsPreferenceMetadata.

Summary

Public constructors

Builder(String screenKey, String key)

Create Builder instance.

Public methods

SettingsPreferenceMetadata build()

Constructs an immutable SettingsPreferenceMetadata object.

SettingsPreferenceMetadata.Builder setAvailable(boolean available)

Sets whether the preference is available.

SettingsPreferenceMetadata.Builder setEnabled(boolean enabled)

Set whether the preference is enabled.

SettingsPreferenceMetadata.Builder setExtras(Bundle extras)

Sets additional fields specific to this preference.

SettingsPreferenceMetadata.Builder setLaunchIntent(Intent launchIntent)

Sets the intent to launch the host app page for this preference.

SettingsPreferenceMetadata.Builder setReadPermissions(List<String> readPermissions)

Sets the permissions required for reading this preference.

SettingsPreferenceMetadata.Builder setRestricted(boolean restricted)

Sets whether the preference is restricted.

SettingsPreferenceMetadata.Builder setSummary(String summary)

Sets the preference summary.

SettingsPreferenceMetadata.Builder setTitle(String title)

Sets the preference title.

SettingsPreferenceMetadata.Builder setWritable(boolean writable)

Sets whether the preference is writable.

SettingsPreferenceMetadata.Builder setWritePermissions(List<String> writePermissions)

Sets the permissions required for writing this preference.

SettingsPreferenceMetadata.Builder setWriteSensitivity(int sensitivity)

Sets the preference write-level sensitivity.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder (String screenKey, 
                String key)

Create Builder instance.

Parameters
screenKey String: required to be not empty

key String: required to be not empty

Public methods

setAvailable

public SettingsPreferenceMetadata.Builder setAvailable (boolean available)

Sets whether the preference is available.

Parameters
available boolean

setEnabled

public SettingsPreferenceMetadata.Builder setEnabled (boolean enabled)

Set whether the preference is enabled.

Parameters
enabled boolean

setExtras

public SettingsPreferenceMetadata.Builder setExtras (Bundle extras)

Sets additional fields specific to this preference. Treat all data as optional.

Parameters
extras Bundle

setLaunchIntent

public SettingsPreferenceMetadata.Builder setLaunchIntent (Intent launchIntent)

Sets the intent to launch the host app page for this preference.

Parameters
launchIntent Intent

setReadPermissions

public SettingsPreferenceMetadata.Builder setReadPermissions (List<String> readPermissions)

Sets the permissions required for reading this preference.

Parameters
readPermissions List

setRestricted

public SettingsPreferenceMetadata.Builder setRestricted (boolean restricted)

Sets whether the preference is restricted.

Parameters
restricted boolean

setSummary

public SettingsPreferenceMetadata.Builder setSummary (String summary)

Sets the preference summary.

Parameters
summary String

setTitle

public SettingsPreferenceMetadata.Builder setTitle (String title)

Sets the preference title.

Parameters
title String

setWritable

public SettingsPreferenceMetadata.Builder setWritable (boolean writable)

Sets whether the preference is writable.

Parameters
writable boolean

setWritePermissions

public SettingsPreferenceMetadata.Builder setWritePermissions (List<String> writePermissions)

Sets the permissions required for writing this preference.

Parameters
writePermissions List