Remove unnecessary changes
This commit is contained in:
parent
1a4970fbbc
commit
b92c91c31e
2 changed files with 3 additions and 4 deletions
|
@ -1977,11 +1977,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
if (enable) {
|
if (enable) {
|
||||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED,
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED,
|
||||||
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 {
|
} else {
|
||||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
|
||||||
setKeepScreenOn(forceKeepScreenOn);
|
|
||||||
}
|
}
|
||||||
|
setKeepScreenOn(forceKeepScreenOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1991,7 +1990,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void unlock() {
|
public void unlock() {
|
||||||
changeKeyguardFlags(true, false);
|
changeKeyguardFlags(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class LockHelper implements SensorEventListener {
|
||||||
|
|
||||||
private void lock() {
|
private void lock() {
|
||||||
releaseWakeLocks();
|
releaseWakeLocks();
|
||||||
if (lockUIAdapter != null && !(useSystemScreenTimeout.get() && turnScreenOnPowerButton.get())) {
|
if (lockUIAdapter != null) {
|
||||||
lockUIAdapter.lock();
|
lockUIAdapter.lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue