Merge "Fix bug where "Loading..." is shown on digital appwidget" into lmp-dev
diff --git a/res/layout-land/clock_fragment.xml b/res/layout-land/clock_fragment.xml
index 8a2d663..02ce812 100644
--- a/res/layout-land/clock_fragment.xml
+++ b/res/layout-land/clock_fragment.xml
@@ -27,8 +27,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
-        android:gravity="center"
-        android:weightSum="@integer/clocks_per_row" >
+        android:gravity="center">
         <include layout="@layout/main_clock_frame"
             android:id="@+id/main_clock_left_pane"
             android:layout_width="0dp"
diff --git a/res/values-land/config.xml b/res/values-land/config.xml
deleted file mode 100644
index 0607115..0000000
--- a/res/values-land/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- Number of world clocks in a row, for the clock tab. -->
-    <item type="integer" name="world_clocks_per_row">1</item>
-    <!-- Total clocks per row is 2 + world_clocks_per_row. -->
-    <item type="integer" name="clocks_per_row">3</item>
-</resources>
diff --git a/res/values-sw600dp-land/config.xml b/res/values-sw600dp-land/config.xml
index 9b8a46d..5a1fd2b 100644
--- a/res/values-sw600dp-land/config.xml
+++ b/res/values-sw600dp-land/config.xml
@@ -21,8 +21,4 @@
      for different hardware and product builds. -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <item type="integer" name="timer_column_count">2</item>
-    <!-- Number of world clocks in a row, for the clock tab. -->
-    <item type="integer" name="world_clocks_per_row">1</item>
-    <!-- Total clocks per row is 2 + world_clocks_per_row. -->
-    <item type="integer" name="clocks_per_row">3</item>
 </resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 380a851..9884671 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -26,6 +26,6 @@
     <item type="integer" name="timer_column_count">1</item>
     <!-- Number of world clocks in a row, for the clock tab. -->
     <item type="integer" name="world_clocks_per_row">1</item>
-    <!-- Total clocks per row is 2 + world_clocks_per_row. -->
-    <item type="integer" name="clocks_per_row">3</item>
+    <!-- Number of world clocks in a row, for the digital appwidget. -->
+    <item type="integer" name="appwidget_world_clocks_per_row">2</item>
 </resources>
diff --git a/src/com/android/alarmclock/DigitalWidgetViewsFactory.java b/src/com/android/alarmclock/DigitalWidgetViewsFactory.java
index 274798f..077fdba 100644
--- a/src/com/android/alarmclock/DigitalWidgetViewsFactory.java
+++ b/src/com/android/alarmclock/DigitalWidgetViewsFactory.java
@@ -52,6 +52,8 @@
 
         public RemoteWorldClockAdapter(Context context) {
             super(context);
+            mClocksPerRow = context.getResources().getInteger(
+                    R.integer.appwidget_world_clocks_per_row);
             mFontSize = context.getResources().getDimension(R.dimen.widget_medium_font_size);
             mFont24Size = context.getResources().getDimension(R.dimen.widget_24_medium_font_size);
         }
diff --git a/src/com/android/deskclock/worldclock/WorldClockAdapter.java b/src/com/android/deskclock/worldclock/WorldClockAdapter.java
index a4d2447..bbf74d2 100644
--- a/src/com/android/deskclock/worldclock/WorldClockAdapter.java
+++ b/src/com/android/deskclock/worldclock/WorldClockAdapter.java
@@ -47,7 +47,7 @@
     private String mClockStyle;
     private final Collator mCollator = Collator.getInstance();
     protected HashMap<String, CityObj> mCitiesDb = new HashMap<String, CityObj>();
-    private int mClocksPerRow;
+    protected int mClocksPerRow;
 
     public WorldClockAdapter(Context context) {
         super();