Remove unnecessary changes

This commit is contained in:
Vitaliy 2020-06-03 15:53:01 +03:00
parent 1a4970fbbc
commit b92c91c31e
2 changed files with 3 additions and 4 deletions

View file

@ -1977,11 +1977,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
if (enable) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED,
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
setKeepScreenOn(true);
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
setKeepScreenOn(forceKeepScreenOn);
}
setKeepScreenOn(forceKeepScreenOn);
}
@Override
@ -1991,7 +1990,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
@Override
public void unlock() {
changeKeyguardFlags(true, false);
changeKeyguardFlags(true, true);
}
@Override

View file

@ -118,7 +118,7 @@ public class LockHelper implements SensorEventListener {
private void lock() {
releaseWakeLocks();
if (lockUIAdapter != null && !(useSystemScreenTimeout.get() && turnScreenOnPowerButton.get())) {
if (lockUIAdapter != null) {
lockUIAdapter.lock();
}
}