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
This commit is contained in:
Adam Cohen
2012-10-13 17:03:16 -07:00
parent 0a4f900463
commit 61ccc162a0

View File

@@ -189,14 +189,16 @@ class KeyguardStatusViewManager implements SecurityMessageDisplay {
}
public void setMessage(CharSequence msg, boolean important) {
if (!important) return;
mSecurityMessageContents = msg;
if (!important) {
mSecurityMessageContents = "";
} else {
mSecurityMessageContents = msg;
}
securityMessageChanged();
}
public void setMessage(int resId, boolean important) {
if (!important) return;
if (resId != 0) {
if (resId != 0 && important) {
mSecurityMessageContents = getContext().getResources().getText(resId);
} else {
mSecurityMessageContents = "";
@@ -205,8 +207,7 @@ class KeyguardStatusViewManager implements SecurityMessageDisplay {
}
public void setMessage(int resId, boolean important, Object... formatArgs) {
if (!important) return;
if (resId != 0) {
if (resId != 0 && important) {
mSecurityMessageContents = getContext().getString(resId, formatArgs);
} else {
mSecurityMessageContents = "";