commit | c05ba58f5fcc4f51afea129cb56a853b0c63b668 | [log] [tgz] |
---|---|---|
author | Evan Wu <evanwu@google.com> | Tue Aug 13 17:26:21 2019 +0800 |
committer | Evan Wu <evanwu@google.com> | Tue Aug 13 17:31:58 2019 +0800 |
tree | 69ad189c8a4c446a798c84c13134b2c7417e889e | |
parent | a0f6e90c0f79022292d786ea4a06aa10ed080718 [diff] |
Check for a null intent in RemoteVvmTaskManager#onStartCommand. https://developer.android.com/reference/android/app/Service#onstartcommand indicates that the intent parameter can be null if the service is being restarted after the process has gone away. Bug: 138442946 Test: manual Change-Id: I022a0fa830bd3e53204c86e8a87a132409ee9b1f
diff --git a/src/com/android/phone/vvm/RemoteVvmTaskManager.java b/src/com/android/phone/vvm/RemoteVvmTaskManager.java index 50ac669..14030a1 100644 --- a/src/com/android/phone/vvm/RemoteVvmTaskManager.java +++ b/src/com/android/phone/vvm/RemoteVvmTaskManager.java
@@ -226,6 +226,11 @@ Assert.isMainThread(); mTaskReferenceCount++; + if (intent == null) { + VvmLog.i(TAG, "received intent is null"); + checkReference(); + return START_NOT_STICKY; + } PhoneAccountHandle phoneAccountHandle = intent.getExtras() .getParcelable(VisualVoicemailService.DATA_PHONE_ACCOUNT_HANDLE); int subId = PhoneAccountHandleConverter.toSubId(phoneAccountHandle);