diff options
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/NavScreen.java | 26 | ||||
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 14 |
2 files changed, 4 insertions, 36 deletions
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java index 8cc2271..edbaa3b 100644 --- a/src/com/android/browser/NavScreen.java +++ b/src/com/android/browser/NavScreen.java @@ -40,7 +40,6 @@ import android.widget.TextView; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.Semaphore; public class NavScreen extends LinearLayout implements OnClickListener { @@ -65,7 +64,6 @@ public class NavScreen extends LinearLayout implements OnClickListener { int mTabHeight; TabAdapter mAdapter; ListPopupWindow mPopup; - Semaphore mLock; public NavScreen(Activity activity, UiController ctl, PhoneUi ui) { super(activity); @@ -85,30 +83,6 @@ public class NavScreen extends LinearLayout implements OnClickListener { requestLayout(); } - protected synchronized void startTask(Runnable r) { - Thread task = new Thread(r); - mLock = new Semaphore(1); - try { - mLock.acquire(); - } catch (InterruptedException e) { - } - task.start(); - } - - protected synchronized void finishTask() { - mLock.release(); - } - - protected synchronized void waitForTask() { - if (mLock != null) { - try { - mLock.acquire(); - } catch (InterruptedException e) { - } - } - mLock = null; - } - protected void showMenu() { Menu menu = mUi.getMenu(); menu.setGroupVisible(R.id.NAV_MENU, false); diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 063fcb9..fe13139 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -298,15 +298,6 @@ public class PhoneUi extends BaseUi { if (mAnimating) return; mAnimating = true; mNavScreen = new NavScreen(mActivity, mUiController, this); - mNavScreen.startTask(new Runnable() { - public void run() { - BrowserWebView web = (BrowserWebView) getWebView(); - if (web != null) { - mActiveTab.setScreenshot(web.capture()); - } - mNavScreen.finishTask(); - } - }); WebView web = getWebView(); if (web != null) { int w = web.getWidth(); @@ -352,7 +343,10 @@ public class PhoneUi extends BaseUi { mContentView.setVisibility(View.GONE); mContentView.setScaleX(1.0f); mContentView.setScaleY(1.0f); - mNavScreen.waitForTask(); + BrowserWebView web = (BrowserWebView) getWebView(); + if (web != null) { + mActiveTab.setScreenshot(web.capture()); + } // Finally show the custom view container. mCustomViewContainer.setVisibility(View.VISIBLE); mCustomViewContainer.bringToFront(); |