OSDN Git Service

Fix 6578735: don't crash system ui when there's no search activity
authorJim Miller <jaggies@google.com>
Wed, 30 May 2012 16:50:00 +0000 (09:50 -0700)
committerJim Miller <jaggies@google.com>
Wed, 30 May 2012 16:50:00 +0000 (09:50 -0700)
Because SearchPanelView tracks input even when it's not showing, it
was possible to trigger search with a gesture.

Change-Id: I60f654d279d2ff1799d8a4b69796da8c7e81f3c7

packages/SystemUI/src/com/android/systemui/SearchPanelView.java

index 060d08e..0747c37 100644 (file)
@@ -109,6 +109,7 @@ public class SearchPanelView extends FrameLayout implements
         mBar.animateCollapse();
         // Launch Assist
         Intent intent = getAssistIntent();
+        if (intent == null) return;
         try {
             ActivityOptions opts = ActivityOptions.makeCustomAnimation(mContext,
                     R.anim.search_launch_enter, R.anim.search_launch_exit);