Loading core/java/android/app/ContextImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -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()); }}); Loading core/java/android/content/res/Resources.java +23 −6 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -155,6 +169,9 @@ public class Resources { if (targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return holo; } if (targetSdkVersion < Build.VERSION_CODES.CUR_DEVELOPMENT) { return dark; } return deviceDefault; } Loading core/java/android/inputmethodservice/InputMethodService.java +1 −0 Original line number Diff line number Diff line Loading @@ -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(); Loading core/java/com/android/internal/app/ActionBarImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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; Loading core/res/res/layout/screen_action_bar.xml +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ This is an optimized layout for a screen with the Action Bar enabled. android:layout_width="match_parent" android:layout_height="match_parent" android:splitMotionEvents="false" android:theme="?attr/actionBarTheme"> android:theme="?attr/actionBarWidgetTheme"> <FrameLayout android:id="@android:id/content" android:layout_width="match_parent" android:layout_height="match_parent" /> Loading Loading
core/java/android/app/ContextImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -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()); }}); Loading
core/java/android/content/res/Resources.java +23 −6 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -155,6 +169,9 @@ public class Resources { if (targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return holo; } if (targetSdkVersion < Build.VERSION_CODES.CUR_DEVELOPMENT) { return dark; } return deviceDefault; } Loading
core/java/android/inputmethodservice/InputMethodService.java +1 −0 Original line number Diff line number Diff line Loading @@ -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(); Loading
core/java/com/android/internal/app/ActionBarImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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; Loading
core/res/res/layout/screen_action_bar.xml +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ This is an optimized layout for a screen with the Action Bar enabled. android:layout_width="match_parent" android:layout_height="match_parent" android:splitMotionEvents="false" android:theme="?attr/actionBarTheme"> android:theme="?attr/actionBarWidgetTheme"> <FrameLayout android:id="@android:id/content" android:layout_width="match_parent" android:layout_height="match_parent" /> Loading