diff options
| author | Alan Viverette <alanv@google.com> | 2014-04-01 14:57:39 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-04-01 14:57:39 -0700 |
| commit | 6259933ec99dee566f200c5fdfe1756ee72b1513 (patch) | |
| tree | 78196ea29921d4331a576922a564568f6894a207 /core/java | |
| parent | 6f127c9b6c249ca1cd17c07a8476edd0fcc1f04d (diff) | |
| download | frameworks_base-6259933ec99dee566f200c5fdfe1756ee72b1513.zip frameworks_base-6259933ec99dee566f200c5fdfe1756ee72b1513.tar.gz frameworks_base-6259933ec99dee566f200c5fdfe1756ee72b1513.tar.bz2 | |
Switch framework Holo references to Quantum.Light
Change-Id: Ib545a143f1959b6104adbc9d594dd626851d90b3
Diffstat (limited to 'core/java')
4 files changed, 27 insertions, 8 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index d1f94f0..7149ab9 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -468,7 +468,8 @@ class ContextImpl extends Context { outerContext.getApplicationInfo().targetSdkVersion, com.android.internal.R.style.Theme_Dialog, com.android.internal.R.style.Theme_Holo_Dialog, - com.android.internal.R.style.Theme_DeviceDefault_Dialog)), + com.android.internal.R.style.Theme_DeviceDefault_Dialog, + com.android.internal.R.style.Theme_DeviceDefault_Light_Dialog)), ctx.mMainThread.getHandler()); }}); diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index 1955be3..d6eafc6 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -135,17 +135,31 @@ public class Resources { sPreloadedDrawables[1] = new LongSparseArray<ConstantState>(); } - /** @hide */ + /** + * Returns the most appropriate default theme for the specified target SDK version. + * <ul> + * <li>Below API 11: Gingerbread + * <li>APIs 11 thru 14: Holo + * <li>APIs 14 thru XX: Device default dark + * <li>API XX and above: Device default light with dark action bar + * </ul> + * + * @param curTheme The current theme, or 0 if not specified. + * @param targetSdkVersion The target SDK version. + * @return A theme resource identifier + * @hide + */ public static int selectDefaultTheme(int curTheme, int targetSdkVersion) { return selectSystemTheme(curTheme, targetSdkVersion, com.android.internal.R.style.Theme, com.android.internal.R.style.Theme_Holo, - com.android.internal.R.style.Theme_DeviceDefault); + com.android.internal.R.style.Theme_DeviceDefault, + com.android.internal.R.style.Theme_DeviceDefault_Light_DarkActionBar); } - + /** @hide */ - public static int selectSystemTheme(int curTheme, int targetSdkVersion, - int orig, int holo, int deviceDefault) { + public static int selectSystemTheme(int curTheme, int targetSdkVersion, int orig, int holo, + int dark, int deviceDefault) { if (curTheme != 0) { return curTheme; } @@ -155,9 +169,12 @@ public class Resources { if (targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return holo; } + if (targetSdkVersion < Build.VERSION_CODES.CUR_DEVELOPMENT) { + return dark; + } return deviceDefault; } - + /** * This exception is thrown by the resource APIs when a requested resource * can not be found. diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 81ad28b..a355d1e 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -647,6 +647,7 @@ public class InputMethodService extends AbstractInputMethodService { getApplicationInfo().targetSdkVersion, android.R.style.Theme_InputMethod, android.R.style.Theme_Holo_InputMethod, + android.R.style.Theme_DeviceDefault_InputMethod, android.R.style.Theme_DeviceDefault_InputMethod); super.setTheme(mTheme); super.onCreate(); diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java index cc51a8b..80e1caa 100644 --- a/core/java/com/android/internal/app/ActionBarImpl.java +++ b/core/java/com/android/internal/app/ActionBarImpl.java @@ -174,7 +174,6 @@ public class ActionBarImpl extends ActionBar { } private void init(View decor) { - mContext = decor.getContext(); mOverlayLayout = (ActionBarOverlayLayout) decor.findViewById( com.android.internal.R.id.action_bar_overlay_layout); if (mOverlayLayout != null) { @@ -193,6 +192,7 @@ public class ActionBarImpl extends ActionBar { "with a compatible window decor layout"); } + mContext = mActionView.getContext(); mActionView.setContextView(mContextView); mContextDisplayMode = mActionView.isSplitActionBar() ? CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL; |
