diff options
author | John Wang <johnwang@google.com> | 2009-10-08 11:20:23 -0700 |
---|---|---|
committer | John Wang <johnwang@google.com> | 2009-10-08 11:45:59 -0700 |
commit | 62acae4b3214cdfe7e959d3a639abb8994918591 (patch) | |
tree | c7a5c1fd59331be0cdd05be536569ad7c8ea90b2 | |
parent | 141ed3f07b6c0c52c14c9dcfe31817c28364e0e3 (diff) | |
download | packages_apps_Stk-62acae4b3214cdfe7e959d3a639abb8994918591.zip packages_apps_Stk-62acae4b3214cdfe7e959d3a639abb8994918591.tar.gz packages_apps_Stk-62acae4b3214cdfe7e959d3a639abb8994918591.tar.bz2 |
Handle null intent in StkAppService.
Bug 2151421. The onStart() may be passed a null intent if a service is restarted and it need handle the null intent for now.
-rw-r--r-- | src/com/android/stk/StkAppService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java index d13be1d..7831503 100644 --- a/src/com/android/stk/StkAppService.java +++ b/src/com/android/stk/StkAppService.java @@ -161,7 +161,14 @@ public class StkAppService extends Service implements Runnable { public void onStart(Intent intent, int startId) { waitForLooper(); + // onStart() method can be passed a null intent + // TODO: replace onStart() with onStartCommand() + if (intent == null) { + return; + } + Bundle args = intent.getExtras(); + if (args == null) { return; } |