From b6506209a9938fe60c4239d6b6229b22258b1c22 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Thu, 3 Dec 2015 18:49:53 -0800 Subject: [PATCH] Limit GCM Wakelock to 5s fixes #53 --- .../src/main/java/org/microg/gms/gcm/McsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java b/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java index c1a3aa69..c1d0b021 100644 --- a/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java +++ b/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java @@ -158,7 +158,7 @@ public class McsService extends Service implements Handler.Callback { public int onStartCommand(Intent intent, int flags, int startId) { synchronized (McsService.class) { if (rootHandler != null) { - wakeLock.acquire(); + wakeLock.acquire(5000); Object reason = intent == null ? "I am so sticky!" : intent.hasExtra(EXTRA_REASON) ? intent.getExtras().get(EXTRA_REASON) : intent; if (ACTION_CONNECT.equals(intent.getAction())) {