diff options
| -rw-r--r-- | apps/Development/src/com/android/development/ConfigurationViewer.java | 1 | ||||
| -rw-r--r-- | ndk/platforms/android-9/include/android/configuration.h | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/apps/Development/src/com/android/development/ConfigurationViewer.java b/apps/Development/src/com/android/development/ConfigurationViewer.java index 034f65a0d..354e6cf10 100644 --- a/apps/Development/src/com/android/development/ConfigurationViewer.java +++ b/apps/Development/src/com/android/development/ConfigurationViewer.java @@ -49,6 +49,7 @@ public class ConfigurationViewer extends Activity { + "orientation=" + c.orientation + "\n" + "screenLayout=0x" + Integer.toHexString(c.screenLayout) + "\n" + "touchscreen=" + c.touchscreen + "\n" + + "uiThemeMode=" + Integer.toHexString(c.uiThemeMode) + "\n" + "uiMode=0x" + Integer.toHexString(c.uiMode) + "\n" + "\n" + "DisplayMetrics\n" diff --git a/ndk/platforms/android-9/include/android/configuration.h b/ndk/platforms/android-9/include/android/configuration.h index 99e8f9711..3165cdd67 100644 --- a/ndk/platforms/android-9/include/android/configuration.h +++ b/ndk/platforms/android-9/include/android/configuration.h @@ -73,6 +73,11 @@ enum { ACONFIGURATION_SCREENLONG_NO = 0x1, ACONFIGURATION_SCREENLONG_YES = 0x2, + ACONFIGURATION_UI_THEME_MODE_ANY = 0x0000, + ACONFIGURATION_UI_THEME_MODE_NORMAL = 0x0001, + ACONFIGURATION_UI_THEME_MODE_HOLO_DARK = 0x0002, + ACONFIGURATION_UI_THEME_MODE_HOLO_LIGHT = 0x0003, + ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00, ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01, ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02, @@ -94,6 +99,7 @@ enum { ACONFIGURATION_SCREEN_SIZE = 0x0200, ACONFIGURATION_VERSION = 0x0400, ACONFIGURATION_SCREEN_LAYOUT = 0x0800, + ACONFIGURATION_UI_THEME_MODE = 0x0900, ACONFIGURATION_UI_MODE = 0x1000, }; @@ -266,6 +272,16 @@ int32_t AConfiguration_getScreenLong(AConfiguration* config); void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong); /** + * Return the current ACONFIGURATION_UI_THEME_MODE_* set in the configuration. + */ +int32_t AConfiguration_getUiThemeMode(AConfiguration* config); + +/** + * Set the current theme UI mode in the configuration. + */ +void AConfiguration_setUiThemeMode(AConfiguration* config, int32_t uiThemeMode); + +/** * Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration. */ int32_t AConfiguration_getUiModeType(AConfiguration* config); |
