Fix issue 582 with TTS taking dim lock

This commit is contained in:
Victor Shcherb 2011-08-07 23:37:42 +02:00
parent f314ea3615
commit fe0060c7f1

View file

@ -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;
}