diff options
author | Tobias Haamel <haamel@google.com> | 2010-02-09 23:09:17 +0100 |
---|---|---|
committer | Tobias Haamel <haamel@google.com> | 2010-02-11 21:25:58 +0100 |
commit | 27b28b3f62bd3b54fa13acd5d035940b9be464f3 (patch) | |
tree | d1f44096f7071bbc53e5bc979117be8e0f4aa55c /core/java/android/content/pm | |
parent | d5663a108760de672b130ffabd4f6632982f75e5 (diff) | |
download | frameworks_base-27b28b3f62bd3b54fa13acd5d035940b9be464f3.zip frameworks_base-27b28b3f62bd3b54fa13acd5d035940b9be464f3.tar.gz frameworks_base-27b28b3f62bd3b54fa13acd5d035940b9be464f3.tar.bz2 |
Introduce special UI modes for night and car usage.
The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.
The ui mode can be set, like it is done for the locale, as follows:
IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);
To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.
The automatic night mode switching will be added in a separate change.
Diffstat (limited to 'core/java/android/content/pm')
-rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index b94bb51..a13f7f9 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -251,6 +251,13 @@ public class ActivityInfo extends ComponentInfo public static final int CONFIG_SCREEN_LAYOUT = 0x0100; /** * Bit in {@link #configChanges} that indicates that the activity + * can itself handle the ui mode. Set from the + * {@link android.R.attr#configChanges} attribute. + * @hide (UIMODE) Pending API council approval + */ + public static final int CONFIG_UI_MODE = 0x0200; + /** + * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the font scaling factor. Set from the * {@link android.R.attr#configChanges} attribute. This is * not a core resource configutation, but a higher-level value, so its |