Skip to content

Commit d36ebe0

Browse files
author
Jim Miller
committed
Keyguard bug fixes
Bug:7088530 Lockscreen falsely states "Wrong PIN" Bug:7091531 Owner name no longer shown on slide to unlock screen, Nakasi Bug:7091131 When entering a SIM PIN, focus is not put onto the pin entry box Change-Id: I5c7e957083b25a3445804ea092d962163d187fa1
1 parent 58a2950 commit d36ebe0

File tree

9 files changed

+26
-18
lines changed

9 files changed

+26
-18
lines changed

core/res/res/layout-sw600dp/keyguard_screen_status_land.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
/>
110110

111111
<TextView
112-
android:id="@+id/propertyOf"
112+
android:id="@+id/owner_info"
113113
android:lineSpacingExtra="8dip"
114114
android:layout_width="wrap_content"
115115
android:layout_height="wrap_content"

core/res/res/layout-sw600dp/keyguard_screen_status_port.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
/>
110110

111111
<TextView
112-
android:id="@+id/propertyOf"
112+
android:id="@+id/owner_info"
113113
android:lineSpacingExtra="8dip"
114114
android:layout_width="wrap_content"
115115
android:layout_height="wrap_content"

core/res/res/layout/keyguard_navigation.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,19 @@
3131
android:padding="10dip"
3232
android:clickable="true">
3333

34-
<TextView
35-
android:layout_width="20dip"
36-
android:layout_height="wrap_content"
37-
android:textSize="28dp"
38-
android:text="@string/kg_temp_back_string" />
34+
<ImageView
35+
android:src="?android:attr/homeAsUpIndicator"
36+
android:layout_gravity="center_vertical|start"
37+
android:layout_width="wrap_content"
38+
android:layout_height="wrap_content"/>
3939

4040
<!-- message area for security screen -->
4141
<TextView
4242
android:id="@+id/keyguard_message_area"
4343
android:layout_width="0dip"
4444
android:layout_height="wrap_content"
4545
android:layout_weight="1"
46+
android:layout_gravity="end"
4647
android:singleLine="true"
4748
android:ellipsize="marquee"
4849
android:layout_marginEnd="6dip"

core/res/res/layout/keyguard_status_view.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</LinearLayout>
9595

9696
<TextView
97-
android:id="@*android:id/status1"
97+
android:id="@+id/status1"
9898
android:layout_gravity="end"
9999
android:layout_marginEnd="@*android:dimen/keyguard_lockscreen_status_line_font_right_margin"
100100
android:singleLine="true"
@@ -105,7 +105,18 @@
105105
/>
106106

107107
<TextView
108-
android:id="@*android:id/carrier"
108+
android:id="@+id/owner_info"
109+
android:layout_gravity="end"
110+
android:layout_marginEnd="@*android:dimen/keyguard_lockscreen_status_line_font_right_margin"
111+
android:singleLine="true"
112+
android:ellipsize="marquee"
113+
android:textAppearance="?android:attr/textAppearanceMedium"
114+
android:textSize="@*android:dimen/keyguard_lockscreen_status_line_font_size"
115+
android:drawablePadding="4dip"
116+
/>
117+
118+
<TextView
119+
android:id="@+id/carrier"
109120
android:layout_gravity="end"
110121
android:layout_marginEnd="@*android:dimen/keyguard_lockscreen_status_line_font_right_margin"
111122
android:singleLine="true"

core/res/res/values/public.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@
12921292
<java-symbol type="id" name="passwordEntry" />
12931293
<java-symbol type="id" name="pinDel" />
12941294
<java-symbol type="id" name="pinDisplay" />
1295-
<java-symbol type="id" name="propertyOf" />
1295+
<java-symbol type="id" name="owner_info" />
12961296
<java-symbol type="id" name="pukDel" />
12971297
<java-symbol type="id" name="pukDisplay" />
12981298
<java-symbol type="id" name="right_icon" />

policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,10 @@ protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocu
256256

257257
private void verifyPasswordAndUnlock() {
258258
String entry = mPasswordEntry.getText().toString();
259-
boolean wrongPassword = true;
260259
if (mLockPatternUtils.checkPassword(entry)) {
261260
mCallback.reportSuccessfulUnlockAttempt();
262261
KeyStore.getInstance().password(entry);
263262
mCallback.dismiss(true);
264-
wrongPassword = false;
265263
} else if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT ) {
266264
// to avoid accidental lockout, only count attempts that are long enough to be a
267265
// real password. This may require some tweaking.
@@ -271,9 +269,9 @@ private void verifyPasswordAndUnlock() {
271269
long deadline = mLockPatternUtils.setLockoutAttemptDeadline();
272270
handleAttemptLockout(deadline);
273271
}
272+
mNavigationManager.setMessage(
273+
mIsAlpha ? R.string.kg_wrong_password : R.string.kg_wrong_pin);
274274
}
275-
mNavigationManager.setMessage(wrongPassword ?
276-
(mIsAlpha ? R.string.kg_wrong_password : R.string.kg_wrong_pin) : 0);
277275
mPasswordEntry.setText("");
278276
}
279277

policy/src/com/android/internal/policy/impl/keyguard/KeyguardSimPinView.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ public void onClick(View v) {
9191
}
9292
});
9393
}
94-
95-
setFocusableInTouchMode(true);
9694
reset();
9795
}
9896

policy/src/com/android/internal/policy/impl/keyguard/KeyguardStatusViewManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public KeyguardStatusViewManager(View view) {
119119
mDateView = (TextView) findViewById(R.id.date);
120120
mStatus1View = (TextView) findViewById(R.id.status1);
121121
mAlarmStatusView = (TextView) findViewById(R.id.alarm_status);
122-
mOwnerInfoView = (TextView) findViewById(R.id.propertyOf);
122+
mOwnerInfoView = (TextView) findViewById(R.id.owner_info);
123123
mDigitalClock = (DigitalClock) findViewById(R.id.time);
124124

125125
// Registering this callback immediately updates the battery state, among other things.

policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardStatusViewManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public KeyguardStatusViewManager(View view, KeyguardUpdateMonitor updateMonitor,
179179
mDateView = (TextView) findViewById(R.id.date);
180180
mStatus1View = (TextView) findViewById(R.id.status1);
181181
mAlarmStatusView = (TextView) findViewById(R.id.alarm_status);
182-
mOwnerInfoView = (TextView) findViewById(R.id.propertyOf);
182+
mOwnerInfoView = (TextView) findViewById(R.id.owner_info);
183183
mTransportView = (TransportControlView) findViewById(R.id.transport);
184184
mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
185185
mEmergencyCallButtonEnabledInScreen = emergencyButtonEnabledInScreen;

0 commit comments

Comments
 (0)