Fix issue 582 with TTS taking dim lock
This commit is contained in:
parent
f314ea3615
commit
fe0060c7f1
1 changed files with 3 additions and 1 deletions
|
@ -58,7 +58,9 @@ public class NavigationService extends Service implements LocationListener {
|
|||
protected synchronized static PowerManager.WakeLock getLock(Context context) {
|
||||
if (lockStatic == null) {
|
||||
PowerManager mgr = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
lockStatic = mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "OsmandServiceLock");
|
||||
// lockStatic = mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "OsmandServiceLock");
|
||||
// Require for TTS engine
|
||||
lockStatic = mgr.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "OsmandServiceLock");
|
||||
}
|
||||
return lockStatic;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue