summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-08-17 11:00:56 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-17 11:00:56 -0700
commit818c04ce8cc422567c3d4cc2fb35ea8cc1a502ee (patch)
tree93a86f7f5c3689cac9724ebbaf9952cb582f7669 /src/com/android
parentb43f2f6fbc7d8c0d5f66e9e72c1ae99dbac5efaf (diff)
parent199e43c5208d96db80caabb2b28c31080c0dc6b7 (diff)
downloadpackages_apps_Browser-818c04ce8cc422567c3d4cc2fb35ea8cc1a502ee.zip
packages_apps_Browser-818c04ce8cc422567c3d4cc2fb35ea8cc1a502ee.tar.gz
packages_apps_Browser-818c04ce8cc422567c3d4cc2fb35ea8cc1a502ee.tar.bz2
Merge "check for parent before embedding titlebar"
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/browser/PhoneUi.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index 7d92cf4..009989b 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -21,7 +21,6 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
-import android.app.ActivityManager;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -34,6 +33,7 @@ import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.DecelerateInterpolator;
import android.webkit.WebView;
@@ -246,6 +246,10 @@ public class PhoneUi extends BaseUi {
}
WebView web = getWebView();
if (web != null) {
+ // make sure we can re-parent titlebar
+ if ((mTitleBar != null) && (mTitleBar.getParent() != null)) {
+ ((ViewGroup) mTitleBar.getParent()).removeView(mTitleBar);
+ }
web.setEmbeddedTitleBar(mTitleBar);
}
setTitleGravity(Gravity.NO_GRAVITY);