SettingsSlicesContract


public class SettingsSlicesContract
extends Object

java.lang.Object
   ↳ android.provider.SettingsSlicesContract


Provides a contract for platform-supported Settings Slices.

Contains definitions for the supported SliceProvider authority, authority Uri, and key constants.

Slice presenters interested in learning meta-data about the Slice should read the Slice object at runtime.

Uri builder example:

 Uri wifiActionUri = BASE_URI
         .buildUpon()
         .appendPath(PATH_SETTING_ACTION)
         .appendPath(KEY_WIFI)
         .build();
 Uri bluetoothIntentUri = BASE_URI
         .buildUpon()
         .appendPath(PATH_SETTING_INTENT)
         .appendPath(KEY_BLUETOOTH)
         .build();
 

Summary

Constants

String AUTHORITY

Authority for platform Settings Slices.

String KEY_AIRPLANE_MODE

Uri key for the Airplane Mode setting.

String KEY_BATTERY_SAVER

Uri key for the Battery Saver setting.

String KEY_BLUETOOTH

Uri key for the Bluetooth setting.

String KEY_LOCATION

Uri key for the Location setting.

String KEY_WIFI

Uri key for the Wi-fi setting.

String PATH_SETTING_ACTION

Uri path indicating that the requested Slice should have inline controls for the corresponding setting.

String PATH_SETTING_INTENT

Uri path indicating that the requested Slice should be Intent-only.

Fields

public static final Uri BASE_URI

A content:// style uri to the Settings Slices authority, AUTHORITY.

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.

Constants

AUTHORITY

Added in API level 28
public static final String AUTHORITY

Authority for platform Settings Slices.

Constant Value: "android.settings.slices"

KEY_AIRPLANE_MODE

Added in API level 28
public static final String KEY_AIRPLANE_MODE

Uri key for the Airplane Mode setting.

Constant Value: "airplane_mode"

KEY_BATTERY_SAVER

Added in API level 28
public static final String KEY_BATTERY_SAVER

Uri key for the Battery Saver setting.

Constant Value: "battery_saver"

KEY_BLUETOOTH

Added in API level 28
public static final String KEY_BLUETOOTH

Uri key for the Bluetooth setting.

Constant Value: "bluetooth"

KEY_LOCATION

Added in API level 28
public static final String KEY_LOCATION

Uri key for the Location setting.

Constant Value: "location"

KEY_WIFI

Added in API level 28
public static final String KEY_WIFI

Uri key for the Wi-fi setting.

Constant Value: "wifi"

PATH_SETTING_ACTION

Added in API level 28
public static final String PATH_SETTING_ACTION

Uri path indicating that the requested Slice should have inline controls for the corresponding setting.

This path will only contain Slices defined by keys in this class.

Constant Value: "action"

PATH_SETTING_INTENT

Added in API level 28
public static final String PATH_SETTING_INTENT

Uri path indicating that the requested Slice should be Intent-only.

Slices with actions should use the PATH_SETTING_ACTION path.

This path will only contain Slices defined by keys in this class

Constant Value: "intent"

Fields

BASE_URI

Added in API level 28
public static final Uri BASE_URI

A content:// style uri to the Settings Slices authority, AUTHORITY.