From 62acae4b3214cdfe7e959d3a639abb8994918591 Mon Sep 17 00:00:00 2001 From: John Wang Date: Thu, 8 Oct 2009 11:20:23 -0700 Subject: 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. --- src/com/android/stk/StkAppService.java | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit v1.1