summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-13 16:32:00 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-13 16:32:00 -0700
commitba4990c77cbc643809f1d0e74fabe5a1d1d1c3dc (patch)
treeed313e5e970dd64781ff8d5d036be69ed5a91486
parentbfb6791934dae9888dc017f1057f5b9cf12f35d2 (diff)
parent71da32074ce729fe170de2d6c348b110fb6625cc (diff)
downloadframeworks_base-ba4990c77cbc643809f1d0e74fabe5a1d1d1c3dc.zip
frameworks_base-ba4990c77cbc643809f1d0e74fabe5a1d1d1c3dc.tar.gz
frameworks_base-ba4990c77cbc643809f1d0e74fabe5a1d1d1c3dc.tar.bz2
am 71da3207: am 7d87c37b: am 6121f06e: Merge "Fix a bug where an action bar could be created when it should not be." into honeycomb-mr2
* commit '71da32074ce729fe170de2d6c348b110fb6625cc': Fix a bug where an action bar could be created when it should not be.
-rw-r--r--core/java/android/app/Activity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 02b6619..87369ab 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1760,6 +1760,11 @@ public class Activity extends ContextThemeWrapper
*/
private void initActionBar() {
Window window = getWindow();
+
+ // Initializing the window decor can change window feature flags.
+ // Make sure that we have the correct set before performing the test below.
+ window.getDecorView();
+
if (isChild() || !window.hasFeature(Window.FEATURE_ACTION_BAR) || mActionBar != null) {
return;
}