Skip to content

Commit 61ccc16

Browse files
author
Adam Cohen
committed
Fix edge case with status message (issue 7343848)
-> When an unimportant message is set, we need to clear the security string so that battery / owner info takes precedence at that point. Change-Id: I3f86b0c2cc8fb2fb0023fce77a7725d8ada96d9e
1 parent 0a4f900 commit 61ccc16

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,16 @@ void resetStatusInfo() {
189189
}
190190

191191
public void setMessage(CharSequence msg, boolean important) {
192-
if (!important) return;
193-
mSecurityMessageContents = msg;
192+
if (!important) {
193+
mSecurityMessageContents = "";
194+
} else {
195+
mSecurityMessageContents = msg;
196+
}
194197
securityMessageChanged();
195198
}
196199

197200
public void setMessage(int resId, boolean important) {
198-
if (!important) return;
199-
if (resId != 0) {
201+
if (resId != 0 && important) {
200202
mSecurityMessageContents = getContext().getResources().getText(resId);
201203
} else {
202204
mSecurityMessageContents = "";
@@ -205,8 +207,7 @@ public void setMessage(int resId, boolean important) {
205207
}
206208

207209
public void setMessage(int resId, boolean important, Object... formatArgs) {
208-
if (!important) return;
209-
if (resId != 0) {
210+
if (resId != 0 && important) {
210211
mSecurityMessageContents = getContext().getString(resId, formatArgs);
211212
} else {
212213
mSecurityMessageContents = "";

0 commit comments

Comments
 (0)