UI fixes for tablets
1. Center the clock on Xoom and large tablets. Fix b/5579000
2. Correctly remove the emergency call button if the device (*cough*
Nakasi *cough*) does not have telephone capability.
Change-Id: Ib7552dc35392a1b9d6c0381c6167949e2b163ddc
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);