diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/IUiModeManager.aidl | 7 | ||||
| -rw-r--r-- | core/java/android/app/UiModeManager.java | 15 |
2 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/app/IUiModeManager.aidl b/core/java/android/app/IUiModeManager.aidl index 848464cf3823..7f0b6fb61f05 100644 --- a/core/java/android/app/IUiModeManager.aidl +++ b/core/java/android/app/IUiModeManager.aidl @@ -58,11 +58,16 @@ interface IUiModeManager { void setTheme(String theme); /** - * Gets whith theme overlays to use within /vendor/overlay. + * Gets which theme overlays to use within /vendor/overlay. */ String getTheme(); /** + * Gets the themes available in /vendor/overlay. + */ + String[] getAvailableThemes(); + + /** * Tells if UI mode is locked or not. */ boolean isUiModeLocked(); diff --git a/core/java/android/app/UiModeManager.java b/core/java/android/app/UiModeManager.java index 2572a2021e24..af41a7d5ac5d 100644 --- a/core/java/android/app/UiModeManager.java +++ b/core/java/android/app/UiModeManager.java @@ -271,6 +271,21 @@ public class UiModeManager { } /** + * Gets the valid inputs to {@link #setTheme(String)}. + * @hide + */ + public String[] getAvailableThemes() { + if (mService != null) { + try { + return mService.getAvailableThemes(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + return null; + } + + /** * Returns the currently configured night mode. * <p> * May be one of: |
