diff options
author | Tom Taylor <tomtaylor@google.com> | 2014-12-03 10:47:06 -0800 |
---|---|---|
committer | Tom Taylor <tomtaylor@google.com> | 2014-12-03 10:47:06 -0800 |
commit | b948d2bc0ff9c8ceb2a07fb6b050a07184aad4ef (patch) | |
tree | b32c596bfe1ceda06de44e73cbc16f2136ee1fae | |
parent | eb16a0d207017ec904a7dbcb69bca7798fee0274 (diff) | |
download | Mms-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-x | src/com/android/mms/transaction/SmsReceiverService.java | 3 |
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. |