resolved conflicts for merge of e619f1e5 to master

Change-Id: I04de9e92a91cd66e848d37cbb07f7d36a4edba06
diff --git a/res/layout-xlarge/pick_bookmark.xml b/res/layout-w600dp/pick_bookmark.xml
similarity index 100%
rename from res/layout-xlarge/pick_bookmark.xml
rename to res/layout-w600dp/pick_bookmark.xml
diff --git a/res/menu-xlarge/browser.xml b/res/menu-w600dp/browser.xml
similarity index 100%
rename from res/menu-xlarge/browser.xml
rename to res/menu-w600dp/browser.xml
diff --git a/res/values-xlarge-port/dimensions.xml b/res/values-w600dp-port/dimensions.xml
similarity index 100%
rename from res/values-xlarge-port/dimensions.xml
rename to res/values-w600dp-port/dimensions.xml
diff --git a/res/values-w600dp/bools.xml b/res/values-w600dp/bools.xml
new file mode 100644
index 0000000..3218656
--- /dev/null
+++ b/res/values-w600dp/bools.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2011 The Android Open Source Project Licensed under the
+    Apache License, Version 2.0 (the "License"); you may not use this file
+    except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+<resources
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <bool name="isTablet">true</bool>
+</resources>
diff --git a/res/values-xlarge/dimensions.xml b/res/values-w600dp/dimensions.xml
similarity index 100%
rename from res/values-xlarge/dimensions.xml
rename to res/values-w600dp/dimensions.xml
diff --git a/res/values-xlarge/integers.xml b/res/values-w600dp/integers.xml
similarity index 100%
rename from res/values-xlarge/integers.xml
rename to res/values-w600dp/integers.xml
diff --git a/res/values-xlarge/strings.xml b/res/values-w600dp/strings.xml
similarity index 100%
rename from res/values-xlarge/strings.xml
rename to res/values-w600dp/strings.xml
diff --git a/res/values/bools.xml b/res/values/bools.xml
new file mode 100644
index 0000000..6217de1
--- /dev/null
+++ b/res/values/bools.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2011 The Android Open Source Project Licensed under the
+    Apache License, Version 2.0 (the "License"); you may not use this file
+    except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+<resources
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <bool name="isTablet">false</bool>
+</resources>
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index c26d850..963f29f 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -85,7 +85,7 @@
         }
 
         mController = new Controller(this);
-        boolean xlarge = isXlarge(this);
+        boolean xlarge = isTablet(this);
         if (xlarge) {
             mUi = new XLargeUi(this, mController);
         } else {
@@ -102,10 +102,8 @@
         mController.start(icicle, getIntent());
     }
 
-    public static boolean isXlarge(Context context) {
-        return (context.getResources().getConfiguration().screenLayout
-                & Configuration.SCREENLAYOUT_SIZE_MASK)
-                == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+    public static boolean isTablet(Context context) {
+        return context.getResources().getBoolean(R.bool.isTablet);
     }
 
     @VisibleForTesting
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index 46197e9..6843dcf 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -257,7 +257,7 @@
     @Override
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
         inflater.inflate(R.menu.bookmark, menu);
-        if (!BrowserActivity.isXlarge(getActivity())) {
+        if (!BrowserActivity.isTablet(getActivity())) {
             MenuItem item = menu.findItem(R.id.add_bookmark);
             item.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
         }
@@ -362,8 +362,8 @@
         return mRoot;
     }
 
-    private int getDefaultView() {
-        if (BrowserActivity.isXlarge(getActivity())) {
+     private int getDefaultView() {
+        if (BrowserActivity.isTablet(getActivity())) {
             return VIEW_THUMBNAILS;
         }
         return VIEW_LIST;
diff --git a/src/com/android/browser/CombinedBookmarkHistoryView.java b/src/com/android/browser/CombinedBookmarkHistoryView.java
index af87401..1fdc260 100644
--- a/src/com/android/browser/CombinedBookmarkHistoryView.java
+++ b/src/com/android/browser/CombinedBookmarkHistoryView.java
@@ -157,7 +157,7 @@
     }
 
     void setupActionBar(int startingFragment) {
-        if (BrowserActivity.isXlarge(mContext)) {
+        if (BrowserActivity.isTablet(mContext)) {
             mActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME
                     | ActionBar.DISPLAY_USE_LOGO);
         } else {