Calling hideKeyguard more often, instead of caching it

Because we were caching the Keyguard state, we didn't call
hideKeyguard anymore when going to the shade locked and then
unlocking. As a consequence did we never update the public
mode and therefore remained in a wrong state.

Lot's of bad things could happen with it, for example did
inline reply not work anymore and the clear all button would
be hidden in certain cases. In general would the user not
be properly unlocked.

Test: manual, go to locked shade with redaction turned on, unlock via affordance, observe notifications are unlocked
Fixes: 62721741
Fixes: 62378400
Change-Id: Ibc757859ef26a1dba887e8986d6a2f8f2fe2efb4
This commit is contained in:
Selim Cinek
2017-07-03 14:44:17 +02:00
parent d43bc31eb7
commit c3d4c74c17

View File

@@ -4196,7 +4196,7 @@ public class StatusBar extends SystemUI implements DemoMode,
}
if (shouldBeKeyguard) {
showKeyguardImpl();
} else if (!shouldBeKeyguard && mIsKeyguard) {
} else {
return hideKeyguardImpl();
}
return false;