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
This commit is contained in:
Vikram Aggarwal
2012-05-02 16:29:10 -07:00
parent 277cf8cc5b
commit c62d321e8d
3 changed files with 17 additions and 3 deletions

View File

@@ -476,6 +476,16 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
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);