diff options
author | John Reck <jreck@google.com> | 2011-02-11 17:47:54 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-02-14 10:49:51 -0800 |
commit | 9d27ff5437db16b7ca16ec8cea464aaefdacc17e (patch) | |
tree | 98cdd3cd8f9260168858f5bc0982180dda6bfca1 /src/com/android/browser/BrowserActivity.java | |
parent | 285ef044bb1098b3bf318a65fe6a86c93b2365b0 (diff) | |
download | packages_apps_browser-9d27ff5437db16b7ca16ec8cea464aaefdacc17e.zip packages_apps_browser-9d27ff5437db16b7ca16ec8cea464aaefdacc17e.tar.gz packages_apps_browser-9d27ff5437db16b7ca16ec8cea464aaefdacc17e.tar.bz2 |
Make bookmarks useable-ish on phones
This fix just makes it so that you can actually see and get to
all the various controls. It is unpleasant to use, but at least
it can be used at all.
Change-Id: I43dabb337af61497ddee78cb07ffd04d2e9309b2
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 899a7c2..ddd5aab 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -19,6 +19,7 @@ package com.android.browser; import com.google.common.annotations.VisibleForTesting; import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.graphics.Bitmap; @@ -95,9 +96,7 @@ public class BrowserActivity extends Activity { } mController = new Controller(this); - boolean xlarge = (getResources().getConfiguration().screenLayout - & Configuration.SCREENLAYOUT_SIZE_MASK) - == Configuration.SCREENLAYOUT_SIZE_XLARGE; + boolean xlarge = isXlarge(this); if (xlarge) { mUi = new XLargeUi(this, mController); } else { @@ -114,6 +113,12 @@ public class BrowserActivity extends Activity { mController.start(icicle, getIntent()); } + public static boolean isXlarge(Context context) { + return (context.getResources().getConfiguration().screenLayout + & Configuration.SCREENLAYOUT_SIZE_MASK) + == Configuration.SCREENLAYOUT_SIZE_XLARGE; + } + @VisibleForTesting Controller getController() { return mController; |