summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-13 16:24:32 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-13 16:24:32 -0700
commit6121f06ed5847d1edd22b23c3b28bf3b3e3af602 (patch)
tree7a44ff1de4f95b93f98d62b4f206f6f640a03428 /core/java
parentf3f2d731e19bb47a87dc071a5750fc0f18248da2 (diff)
parenta593d9852f3807305763c3f1fe1ac5c59f1fef92 (diff)
downloadframeworks_base-6121f06ed5847d1edd22b23c3b28bf3b3e3af602.zip
frameworks_base-6121f06ed5847d1edd22b23c3b28bf3b3e3af602.tar.gz
frameworks_base-6121f06ed5847d1edd22b23c3b28bf3b3e3af602.tar.bz2
Merge "Fix a bug where an action bar could be created when it should not be." into honeycomb-mr2
Diffstat (limited to 'core/java')
-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 edfd6ef..fc4d12c 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;
}