summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2010-03-17 21:52:35 -0400
committerDaniel Sandler <dsandler@android.com>2010-03-26 11:52:52 -0400
commitd323995d316b94512119b98cf444c62bdfde9a0e (patch)
tree8a612cccee9a34c1cc9f80bf56fa5d8eb5bee770 /policy
parentf7c5d0e46ced3ec3edb6f656acd82900b9ac988c (diff)
downloadframeworks_base-d323995d316b94512119b98cf444c62bdfde9a0e.zip
frameworks_base-d323995d316b94512119b98cf444c62bdfde9a0e.tar.gz
frameworks_base-d323995d316b94512119b98cf444c62bdfde9a0e.tar.bz2
Redesigned keyguard layout in the no-SIM case. DO NOT MERGE
The emergency call button has been removed (since the user can disable the keyguard, open the phone app, and enter the emergency number there). This change also restores a number of the informational & help messages that were previously removed from the lock screen. Bug: 2421380 Change-Id: I4dda16be5d54c1e0ab4e26914c63d1f5b922cfe8
Diffstat (limited to 'policy')
-rw-r--r--policy/com/android/internal/policy/impl/LockScreen.java57
1 files changed, 20 insertions, 37 deletions
diff --git a/policy/com/android/internal/policy/impl/LockScreen.java b/policy/com/android/internal/policy/impl/LockScreen.java
index baed9eb..381b913 100644
--- a/policy/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/com/android/internal/policy/impl/LockScreen.java
@@ -66,7 +66,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
private TextView mStatus1;
private TextView mStatus2;
private TextView mScreenLocked;
- private Button mEmergencyCallButton;
+ private TextView mEmergencyCallText;
// current configuration state of keyboard and display
private int mKeyboardHidden;
@@ -203,18 +203,12 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
mStatus1 = (TextView) findViewById(R.id.status1);
mStatus2 = (TextView) findViewById(R.id.status2);
- mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
- mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
mScreenLocked = (TextView) findViewById(R.id.screenLocked);
mSelector = (SlidingTab) findViewById(R.id.tab_selector);
mSelector.setHoldAfterTrigger(true, false);
mSelector.setLeftHintText(R.string.lockscreen_unlock_label);
- mEmergencyCallButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- mCallback.takeEmergencyCallAction();
- }
- });
+
+ mEmergencyCallText = (TextView) findViewById(R.id.emergencyCallText);
setFocusable(true);
setFocusableInTouchMode(true);
@@ -269,7 +263,6 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
refreshBatteryStringAndIcon();
refreshAlarmDisplay();
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
mTimeFormat = DateFormat.getTimeFormat(getContext());
mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
@@ -340,8 +333,6 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
* @param iconResourceId The left hand icon.
*/
private void toastMessage(final TextView textView, final String text, final int color, final int iconResourceId) {
- if (DBG) android.util.Log.d("LockScreen", "toastMessage(text=" + text +", color=" + color + ")");
-
if (mPendingR1 != null) {
textView.removeCallbacks(mPendingR1);
mPendingR1 = null;
@@ -499,9 +490,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
* Update the layout to match the current status.
*/
private void updateLayout(Status status) {
- // The emergency call button appears where the carrier would
- // ordinarily be shown, so if one is VISIBLE the other must be
- // INVISIBLE.
+ // The emergency call button no longer appears on this screen.
+ if (DBG) Log.d(TAG, "updateLayout: status=" + status);
switch (status) {
case Normal:
// text
@@ -509,12 +499,13 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
getCarrierString(
mUpdateMonitor.getTelephonyPlmn(),
mUpdateMonitor.getTelephonySpn()));
-// mScreenLocked.setText(R.string.lockscreen_screen_locked);
+ // unnecessary clutter
+ //mScreenLocked.setText(R.string.lockscreen_screen_locked);
// layout
- mScreenLocked.setVisibility(View.VISIBLE);
+ mScreenLocked.setVisibility(View.INVISIBLE);
mSelector.setVisibility(View.VISIBLE);
- mEmergencyCallButton.setVisibility(View.GONE);
+ mEmergencyCallText.setVisibility(View.GONE);
break;
case NetworkLocked:
// The carrier string shows both sim card status (i.e. No Sim Card) and
@@ -528,35 +519,30 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
// layout
mScreenLocked.setVisibility(View.VISIBLE);
mSelector.setVisibility(View.VISIBLE);
- mEmergencyCallButton.setVisibility(View.GONE);
+ mEmergencyCallText.setVisibility(View.GONE);
break;
case SimMissing:
// text
- mCarrier.setText("");
- mScreenLocked.setText(
- getCarrierString(
- mUpdateMonitor.getTelephonyPlmn(),
- getContext().getText(R.string.lockscreen_missing_sim_message_short)));
- // previously shown here: lockscreen_instructions_when_pattern_disabled
+ mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
+ mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);
// layout
mScreenLocked.setVisibility(View.VISIBLE);
mSelector.setVisibility(View.VISIBLE);
- mEmergencyCallButton.setVisibility(View.VISIBLE);
+ mEmergencyCallText.setVisibility(View.VISIBLE);
break;
case SimMissingLocked:
// text
- mCarrier.setText("");
- mScreenLocked.setText(
+ mCarrier.setText(
getCarrierString(
mUpdateMonitor.getTelephonyPlmn(),
getContext().getText(R.string.lockscreen_missing_sim_message_short)));
- // previously shown here: lockscreen_missing_sim_instructions
+ mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);
// layout
mScreenLocked.setVisibility(View.VISIBLE);
mSelector.setVisibility(View.GONE);
- mEmergencyCallButton.setVisibility(View.VISIBLE);
+ mEmergencyCallText.setVisibility(View.VISIBLE);
break;
case SimLocked:
// text
@@ -568,21 +554,20 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
// layout
mScreenLocked.setVisibility(View.INVISIBLE);
mSelector.setVisibility(View.VISIBLE);
- mEmergencyCallButton.setVisibility(View.GONE);
+ mEmergencyCallText.setVisibility(View.GONE);
break;
case SimPukLocked:
// text
- mCarrier.setText("");
- mScreenLocked.setText(
+ mCarrier.setText(
getCarrierString(
mUpdateMonitor.getTelephonyPlmn(),
getContext().getText(R.string.lockscreen_sim_puk_locked_message)));
- // previously shown here: lockscreen_sim_puk_locked_instructions);
+ mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions);
// layout
mScreenLocked.setVisibility(View.VISIBLE);
mSelector.setVisibility(View.GONE);
- mEmergencyCallButton.setVisibility(View.VISIBLE);
+ mEmergencyCallText.setVisibility(View.VISIBLE);
break;
}
}
@@ -655,7 +640,6 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
/** {@inheritDoc} */
public void onResume() {
resetStatusInfo(mUpdateMonitor);
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
}
/** {@inheritDoc} */
@@ -673,6 +657,5 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
}
public void onPhoneStateChanged(String newState) {
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
}
}