osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.59k stars 1.01k forks source link

Phone stuck in a "lock screen" loop #4667

Open Artefact2 opened 6 years ago

Artefact2 commented 6 years ago

When I turn on the navigation, the screen will turn off after some time of inactivity.

Trying to bring the screen back on with the power button sometimes results in a "loop" where the phone flips very rapidly between the lock screen and the Osmand interface itself.

Trying to unlock the screen, or do any kind of interaction is impossible, the only way out is to reboot the phone. Needless to say, this is not appropriate when you're driving.

Here's a short video of the issue: https://i.imgur.com/RHlqnAM.mp4

I am running Android 6.0.1 on a LG G3, Osmand is from f-droid (version 2.7.5).

scaidermern commented 6 years ago

Sounds similar to #3925

qantourisc commented 6 years ago

Severity: bloody annoying / pull-over / dangerous if your GPS drops out while you are driving, and the only way to fix it is rebooting your phone. (And rebooting your phone is NOT easy in this case since you have a limited amount of time to do it, IF you succeed.)

For me this bug only occurs if I am in landscape.

If it occurs for me you have options:

It's as if the lockscreen is saying: NO we are going into screen out, and osmand is saying, ow we are still of I wanted it on, go ON, and then the lockscreen says NO again.

Workarounds: Set screenlock/standby to 30 mins, and don't drive longer then 30 mins. Use in portrait mode.

Artefact2 commented 6 years ago

Detect it in time, place the phone in portrait.

Not really feasible, once it happens I can't do any kind of interaction, besides long pressing power and rebooting the phone.

Place in portrait, wait until all rotate/unlock/lock-whatever queue is finished (if this even works)

Tried various combinations of locking portrait, landscape, etc. None really seem to completely eliminate the issue. I noticed it happens less often when I do lock the orientation.

I have learned to adapt to only use the audio cues, until I can safely stop and reboot the phone (which is a very annoying process, esp. if it is encrypted).

qantourisc commented 6 years ago

Another trick I tried that works: turn on (developers menu) "stay awake" "screen will never sleep while carging". Then leave app open, and do not lock the phone.

scaidermern commented 6 years ago

Do you have the "Turn screen on" feature activated (under navigation settings). If so, do you really need it? It has caused some strange bugs in the past for me.

momu commented 6 years ago

Similar issue here (Android 7.1.2, OSMAnd+ 2.9.3) When using the phone in the car or with a headset it will not be locked due to the approved bluetooth connections (smart lock). But sometimes the phone will shut the display off. By activating the screen again (push power button) it got stuck in this loop where the display with OSMand starts flashing.

To get out of it, I turned the phone some times in portrait mode and managed to push the lock icon. So phone was locked again and after unlocking I could access it normally and use OSMand again.

Steps I did reproduce:

  1. Use smart lock
  2. connect bluetooth device (headset etc) for which smart lock is enabled
  3. open OSMand and search for a destination
  4. get directions for destination
  5. don't start navigation
  6. wait until screen turns off
  7. push power button to turn screen on

In my case this showed this loop.

swertz commented 5 years ago

This serious bug seems to still be present, I've been affected twice in the past week. Both times my screen was locked in portrait mode.

Osmand 3.1.5 Android 7.0 Lenovo Moto G5 plus