Merge pull request #955 from Zahnstocher/noScreenOff-patch

Only turn off the screen if map is shown (wake on voice)
This commit is contained in:
vshcherb 2014-11-17 09:34:34 +01:00
commit d52f7f70f2

View file

@ -839,7 +839,7 @@ public class MapActivity extends AccessibleActivity implements
if (mDevicePolicyManager != null && mDeviceAdmin != null) {
final Integer screenPowerSave = settings.WAKE_ON_VOICE_INT.get();
if (screenPowerSave > 0) {
if (screenPowerSave > 0 && settings.MAP_ACTIVITY_ENABLED.get()) {
if (mDevicePolicyManager.isAdminActive(mDeviceAdmin)) {
try {
mDevicePolicyManager.lockNow();