Merge "Import translations. DO NOT MERGE" into jb-dev
diff --git a/res/layout-sw600dp/crypt_keeper_password_entry.xml b/res/layout-sw600dp/crypt_keeper_password_entry.xml
index fe6edaf..f8c113d 100644
--- a/res/layout-sw600dp/crypt_keeper_password_entry.xml
+++ b/res/layout-sw600dp/crypt_keeper_password_entry.xml
@@ -16,7 +16,8 @@
 ** limitations under the License.
 */
 -->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
 >
@@ -25,7 +26,7 @@
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
+        android:layout_gravity="center_horizontal"
         android:layout_marginTop="318dip"
     >
         <ImageView android:id="@+id/encroid"
@@ -53,10 +54,11 @@
             android:layout_width="320dip"
             android:layout_toRightOf="@+id/passwordLabel"
             android:layout_marginTop="26dip"
+            android:layout_centerVertical="true"
             android:orientation="horizontal"
         >
             <include layout="@layout/crypt_keeper_password_field" />
         </LinearLayout>
     </RelativeLayout>
 
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/crypt_keeper_status.xml b/res/layout/crypt_keeper_status.xml
index d94e66d..b92bbe8 100644
--- a/res/layout/crypt_keeper_status.xml
+++ b/res/layout/crypt_keeper_status.xml
@@ -23,6 +23,7 @@
     android:orientation="vertical"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
+    android:layout_gravity="center_horizontal"
 >
 
     <com.android.internal.widget.DigitalClock android:id="@+id/time"
@@ -31,6 +32,7 @@
         android:layout_alignParentTop="true"
         android:layout_alignParentLeft="true"
         android:layout_marginTop="8dip"
+        android:layout_gravity="center"
         android:layout_marginBottom="8dip"
         >
 
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index 3e88e27..2739d91 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -476,6 +476,16 @@
         mPasswordEntry.setOnEditorActionListener(this);
         mPasswordEntry.requestFocus();
 
+        // Disable the Emergency call button if the device has no voice telephone capability
+        final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
+        if (!tm.isVoiceCapable()) {
+            final View emergencyCall = findViewById(R.id.emergencyCallButton);
+            if (emergencyCall != null) {
+                Log.d(TAG, "Removing the emergency Call button");
+                emergencyCall.setVisibility(View.GONE);
+            }
+        }
+
         final View imeSwitcher = findViewById(R.id.switch_ime_button);
         final InputMethodManager imm = (InputMethodManager) getSystemService(
                 Context.INPUT_METHOD_SERVICE);
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 7d45461..1255b6b 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -278,6 +278,12 @@
         mShowWifi = mPrefs.getBoolean(PREF_SHOW_WIFI, false);
         mShowEthernet = mPrefs.getBoolean(PREF_SHOW_ETHERNET, false);
 
+        // override preferences when no mobile radio
+        if (!hasReadyMobileRadio(context)) {
+            mShowWifi = hasWifiRadio(context);
+            mShowEthernet = hasEthernet(context);
+        }
+
         setHasOptionsMenu(true);
     }
 
@@ -461,7 +467,6 @@
             showWifi.setChecked(mShowWifi);
         } else {
             showWifi.setVisible(false);
-            mShowWifi = true;
         }
 
         final MenuItem showEthernet = menu.findItem(R.id.data_usage_menu_show_ethernet);
@@ -470,7 +475,6 @@
             showEthernet.setChecked(mShowEthernet);
         } else {
             showEthernet.setVisible(false);
-            mShowEthernet = true;
         }
 
         final MenuItem metered = menu.findItem(R.id.data_usage_menu_metered);