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.
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()) {