Merge "Fix 5636798: clear PIN/PUK fields when device sleeps or user cancels" into ics-mr1
This commit is contained in:
@@ -558,9 +558,12 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
mScreenOn = false;
|
mScreenOn = false;
|
||||||
mForgotPattern = false;
|
mForgotPattern = false;
|
||||||
mHasOverlay = mUpdateMonitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE;
|
mHasOverlay = mUpdateMonitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE;
|
||||||
if (mMode == Mode.LockScreen) {
|
|
||||||
|
// Emulate activity life-cycle for both lock and unlock screen.
|
||||||
|
if (mLockScreen != null) {
|
||||||
((KeyguardScreen) mLockScreen).onPause();
|
((KeyguardScreen) mLockScreen).onPause();
|
||||||
} else {
|
}
|
||||||
|
if (mUnlockScreen != null) {
|
||||||
((KeyguardScreen) mUnlockScreen).onPause();
|
((KeyguardScreen) mUnlockScreen).onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,9 +654,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show() {
|
public void show() {
|
||||||
if (mMode == Mode.LockScreen) {
|
// Emulate activity life-cycle for both lock and unlock screen.
|
||||||
|
if (mLockScreen != null) {
|
||||||
((KeyguardScreen) mLockScreen).onResume();
|
((KeyguardScreen) mLockScreen).onResume();
|
||||||
} else {
|
}
|
||||||
|
if (mUnlockScreen != null) {
|
||||||
((KeyguardScreen) mUnlockScreen).onResume();
|
((KeyguardScreen) mUnlockScreen).onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -383,6 +383,9 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
|
|||||||
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v == mCancelButton) {
|
if (v == mCancelButton) {
|
||||||
|
// clear the PIN/PUK entry fields if the user cancels
|
||||||
|
mPinText.setText("");
|
||||||
|
mPukText.setText("");
|
||||||
mCallback.goToLockScreen();
|
mCallback.goToLockScreen();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,6 +359,7 @@ public class SimUnlockScreen extends LinearLayout implements KeyguardScreen, Vie
|
|||||||
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v == mCancelButton) {
|
if (v == mCancelButton) {
|
||||||
|
mPinText.setText(""); // clear the PIN entry field if the user cancels
|
||||||
mCallback.goToLockScreen();
|
mCallback.goToLockScreen();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user