summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2014-12-03 10:47:06 -0800
committerTom Taylor <tomtaylor@google.com>2014-12-03 10:47:06 -0800
commitb948d2bc0ff9c8ceb2a07fb6b050a07184aad4ef (patch)
treeb32c596bfe1ceda06de44e73cbc16f2136ee1fae
parenteb16a0d207017ec904a7dbcb69bca7798fee0274 (diff)
downloadMms-b948d2bc0ff9c8ceb2a07fb6b050a07184aad4ef.tar.gz
com.android.mms holding wakelock for more than 30mins/hr on occam
Bug 18596212 When the Messaging app is not the default sms app and the SmsReceiver service is started, the service will bail out without releasing the wakelock. Change-Id: I2e8ad0208561b54d9973f8158bac437731d30d67
-rwxr-xr-xsrc/com/android/mms/transaction/SmsReceiverService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/mms/transaction/SmsReceiverService.java b/src/com/android/mms/transaction/SmsReceiverService.java
index 04eb597e..9cf2bf24 100755
--- a/src/com/android/mms/transaction/SmsReceiverService.java
+++ b/src/com/android/mms/transaction/SmsReceiverService.java
@@ -128,6 +128,9 @@ public class SmsReceiverService extends Service {
public int onStartCommand(Intent intent, int flags, int startId) {
if (!MmsConfig.isSmsEnabled(this)) {
Log.d(TAG, "SmsReceiverService: is not the default sms app");
+ // NOTE: We MUST not call stopSelf() directly, since we need to
+ // make sure the wake lock acquired by AlertReceiver is released.
+ SmsReceiver.finishStartingService(SmsReceiverService.this, startId);
return Service.START_NOT_STICKY;
}
// Temporarily removed for this duplicate message track down.