summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-04-15 17:33:43 -0700
committerJim Miller <jaggies@google.com>2010-04-15 17:39:17 -0700
commitecaced9a788910b3517bdab08b382c9d45e34dfe (patch)
tree77c9e1167738308a596efcf87eb12873620b1f4d /policy
parent5c14f2d08fb01be02b4952904c0f07464882653d (diff)
downloadframeworks_base-ecaced9a788910b3517bdab08b382c9d45e34dfe.zip
frameworks_base-ecaced9a788910b3517bdab08b382c9d45e34dfe.tar.gz
frameworks_base-ecaced9a788910b3517bdab08b382c9d45e34dfe.tar.bz2
Manual merge of Idf6bb25438336616e6453e7afe0e79f227af98d3
Fix 2575838: Update emergency button in AccountUnlockScreen DO NOT MERGE AccountUnlockScreen wasn't registered to receive updates from UpdateMonitor. It now correctly updates the Emergency call button to allow the user to return to the call in progress (InCallScreen). Tested on WVGA device with keyboard: - hitting Home during call, observing state, and pressing button to return to call. - hitting Home while not in call to ensure it still invokes EmergencyDialer. - above in various keyboard states. Change-Id: Ic4480ff69ff4479557ddb7f76c751b005b1c60bf
Diffstat (limited to 'policy')
-rw-r--r--policy/com/android/internal/policy/impl/AccountUnlockScreen.java10
-rw-r--r--policy/com/android/internal/policy/impl/LockPatternKeyguardView.java1
2 files changed, 9 insertions, 2 deletions
diff --git a/policy/com/android/internal/policy/impl/AccountUnlockScreen.java b/policy/com/android/internal/policy/impl/AccountUnlockScreen.java
index 9921069..cb88916 100644
--- a/policy/com/android/internal/policy/impl/AccountUnlockScreen.java
+++ b/policy/com/android/internal/policy/impl/AccountUnlockScreen.java
@@ -29,7 +29,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Rect;
-import android.telephony.TelephonyManager;
import android.text.Editable;
import android.text.InputFilter;
import android.text.LoginFilter;
@@ -65,6 +64,7 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree
private final KeyguardScreenCallback mCallback;
private final LockPatternUtils mLockPatternUtils;
+ private KeyguardUpdateMonitor mUpdateMonitor;
private TextView mTopHeader;
private TextView mInstructions;
@@ -81,9 +81,11 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree
/**
* AccountUnlockScreen constructor.
* @param configuration
+ * @param updateMonitor
*/
public AccountUnlockScreen(Context context,Configuration configuration,
- KeyguardScreenCallback callback, LockPatternUtils lockPatternUtils) {
+ KeyguardUpdateMonitor updateMonitor, KeyguardScreenCallback callback,
+ LockPatternUtils lockPatternUtils) {
super(context);
mCallback = callback;
mLockPatternUtils = lockPatternUtils;
@@ -111,6 +113,9 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree
mEmergencyCall = (Button) findViewById(R.id.emergencyCall);
mEmergencyCall.setOnClickListener(this);
mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCall);
+
+ mUpdateMonitor = updateMonitor;
+ mUpdateMonitor.registerInfoCallback(this);
}
public void afterTextChanged(Editable s) {
@@ -154,6 +159,7 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree
if (mCheckingDialog != null) {
mCheckingDialog.hide();
}
+ mUpdateMonitor.removeCallback(this);
}
/** {@inheritDoc} */
diff --git a/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java
index c1b14c4..27706ef 100644
--- a/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -601,6 +601,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
unlockView = new AccountUnlockScreen(
mContext,
mConfiguration,
+ mUpdateMonitor,
mKeyguardScreenCallback,
mLockPatternUtils);
} catch (IllegalStateException e) {