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
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 @@
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 @@
}
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 @@
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;