Merge remote-tracking branch 'origin/r3.7'

This commit is contained in:
Victor Shcherb 2020-06-03 15:44:45 +02:00
commit 0774ea9101
2 changed files with 5 additions and 3 deletions

View file

@ -1992,7 +1992,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
@Override
public void unlock() {
changeKeyguardFlags(true, false);
changeKeyguardFlags(true, true);
}
@Override

View file

@ -118,9 +118,11 @@ public class LockHelper implements SensorEventListener {
private void lock() {
releaseWakeLocks();
int unlockTime = turnScreenOnTime.get();
if (lockUIAdapter != null) {
if (!(useSystemScreenTimeout.get() && turnScreenOnPowerButton.get()) && unlockTime != 0) {
boolean useSystemTimeout = useSystemScreenTimeout.get();
boolean usePowerButton = useSystemTimeout && turnScreenOnPowerButton.get()
|| !useSystemTimeout && turnScreenOnTime.get() == 0 && turnScreenOnPowerButton.get();
if (!usePowerButton) {
lockUIAdapter.lock();
}
}