OSDN Git Service

Fixes #1921372. Pressing Home with the window shade down would show gestures pad.
authorRomain Guy <romainguy@android.com>
Tue, 16 Jun 2009 20:25:29 +0000 (13:25 -0700)
committerRomain Guy <romainguy@android.com>
Tue, 16 Jun 2009 20:25:29 +0000 (13:25 -0700)
This change checks for the window focus before taking action. If the Home's window
does not have focus, then the gestures pad is not shown.

src/com/android/launcher/Launcher.java

index 5131081..fb454c0 100644 (file)
@@ -869,7 +869,8 @@ public final class Launcher extends Activity implements View.OnClickListener, On
             if ((intent.getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) !=
                     Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) {
 
-                if (mGesturesPanel != null && mDragLayer.getWindowVisibility() == View.VISIBLE) {
+                if (mGesturesPanel != null && mDragLayer.getWindowVisibility() == View.VISIBLE &&
+                        mDragLayer.hasWindowFocus()) {
                     SearchManager searchManager =
                             (SearchManager) getSystemService(Context.SEARCH_SERVICE);
                     if (!searchManager.isVisible()) {