Keyguard Home Button Bug

Post your questions and help other users.

Moderator: Martin

Post Reply
eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Keyguard Home Button Bug

Post by eldron » 28 Apr 2015 06:46

Hi again,
I had an issue yesterday with my home button (couldn´t use it anymore to go back to the home screen and long click wouldn´t open the recently used apps, but wierdly enough a double click would still open S Voice).
As I was only playing around with automagic at that time, I checked the known lollipop bugs and sure enough, there is a known "Set Keyguard State: Off" issue, which I use in some of my flows.
Using the "user present" trigger is listed as a workaround, but that wouldn´t help in my case, as the keyguard get´s removed whilst I am still asleep (a "Wifi on" get´s triggered just before I get up and another flow removes the keyguard in my home wifi).
This morning the home button didn´t work again. So my question is, if there is another workaround, that doesn´t require me to unlock the phone. Ideally the workaround also does not switch on the screen.
I would play around with it myself, but I couldn´t really force-reproduce the issue. Just running "Set Keyguard State: Off" with a locked screen didn´t trigger the home button problem. Maybe it only happens when the phone is in deep sleep?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Keyguard Home Button Bug

Post by Martin » 28 Apr 2015 19:25

Hi,

Working with the lock screen is no fun on Android and gets a worse with every new Android version.
The devices I have tested with Lollipop (5.0 and 5.1) have been affected by a bug that usually leads to a black screen. I was not able to move out of this state except by rebooting the device. I think that this might be caused by a security feature of Lollipop that's not working properly. The only known workaround was to disable the keyguard when the device is in an unlocked state already. An S5 wit 5.0 behaves less catastrophic by simply not doing anything when the keyguard is disabled but it I did not run into the black screen issue.

As an alternative you could try to remove the lock with either action Set Lock Pin/Password (option Clear) or Set Lock Pattern State depending on the lock method you use. Some devices turn on the screen when the PIN in cleared. You could mitigate the problem by adding a short action Sleep (~1s) action and then execute an action Lock Device to turn the screen off again.
Switching to the devices Smart lock/trusted places-feature might also be an option. On CyanogenMod there's also the possibility to create a profile without a lock screen and to switch the profile with Automagic.

I hope that Google will allow third party apps like Automagic to provide its own trust agent in the future.

Regards,
Martin

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Keyguard Home Button Bug

Post by eldron » 28 Apr 2015 20:47

Hi Martin,
once again, thanks for your quick response.
As the behaviour obviously varies a lot from model to model - here is what I am using:
Galaxy S4, on stock Android 5.0.1, rooted.
My current keyguard remove flow is: When connected to home wifi, set lock pin/password (clear) and then set keyguard state: off.
Using only the set lock pin (clear) was not enough, as I´d still have to swipe to unlock.
Both together work fine and I only have to klick the power (or home) button to unlock the phone.
So let me get this straight - it´s the set keyguard state: off that triggers the wierd home button behaviour, right?
How is that even connected? Is that because on the S4 you can use the home button to unlock your phone?
Anyway, I have inserted a 2 second pause between the pin clear and the keyguard off actions. Let´s see if that does the trick - I´ll know more tomorrow morning.
I don´t like the smart lock / trusted places feature, as I just want to specify a wifi and not a place.

Post Reply