Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61ccc162 authored by Adam Cohen's avatar Adam Cohen
Browse files

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
parent 0a4f9004
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -189,14 +189,16 @@ class KeyguardStatusViewManager implements SecurityMessageDisplay {
    }

    public void setMessage(CharSequence msg, boolean important) {
        if (!important) return;
        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 = "";