summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/Constants.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java33
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java4
5 files changed, 31 insertions, 15 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Constants.java b/packages/SystemUI/src/com/android/systemui/recents/Constants.java
index 978166438303..cdb6b932de9f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Constants.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Constants.java
@@ -39,6 +39,8 @@ public class Constants {
public static final boolean EnableDismissAll = false;
// Enables the thumbnail alpha on the front-most task
public static final boolean EnableThumbnailAlphaOnFrontmost = false;
+ // This disables the search bar integration
+ public static final boolean DisableSearchBar = true;
// This disables the bitmap and icon caches
public static final boolean DisableBackgroundCache = false;
// Enables the simulated task affiliations
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 331a124cebe9..c416967599f6 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -206,15 +206,19 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
mEmptyView = mEmptyViewStub.inflate();
}
mEmptyView.setVisibility(View.VISIBLE);
- mRecentsView.setSearchBarVisibility(View.GONE);
+ if (!Constants.DebugFlags.App.DisableSearchBar) {
+ mRecentsView.setSearchBarVisibility(View.GONE);
+ }
} else {
if (mEmptyView != null) {
mEmptyView.setVisibility(View.GONE);
}
- if (mRecentsView.hasValidSearchBar()) {
- mRecentsView.setSearchBarVisibility(View.VISIBLE);
- } else {
- refreshSearchWidgetView();
+ if (!Constants.DebugFlags.App.DisableSearchBar) {
+ if (mRecentsView.hasValidSearchBar()) {
+ mRecentsView.setSearchBarVisibility(View.VISIBLE);
+ } else {
+ refreshSearchWidgetView();
+ }
}
}
@@ -315,7 +319,9 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
// Initialize the widget host (the host id is static and does not change)
mConfig = RecentsConfiguration.getInstance();
- mAppWidgetHost = new RecentsAppWidgetHost(this, Constants.Values.App.AppWidgetHostId);
+ if (!Constants.DebugFlags.App.DisableSearchBar) {
+ mAppWidgetHost = new RecentsAppWidgetHost(this, Constants.Values.App.AppWidgetHostId);
+ }
mPackageMonitor = new RecentsPackageMonitor();
mPackageMonitor.register(this);
@@ -330,12 +336,16 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
mScrimViews = new SystemBarScrimViews(this);
// Bind the search app widget when we first start up
- mSearchWidgetInfo = ssp.getOrBindSearchAppWidget(this, mAppWidgetHost);
+ if (!Constants.DebugFlags.App.DisableSearchBar) {
+ mSearchWidgetInfo = ssp.getOrBindSearchAppWidget(this, mAppWidgetHost);
+ }
// Register the broadcast receiver to handle messages when the screen is turned off
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
- filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
+ if (!Constants.DebugFlags.App.DisableSearchBar) {
+ filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
+ }
registerReceiver(mSystemBroadcastReceiver, filter);
}
@@ -420,7 +430,10 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
mPackageMonitor.unregister();
// Stop listening for widget package changes if there was one bound
- mAppWidgetHost.stopListening();
+ if (!Constants.DebugFlags.App.DisableSearchBar) {
+ mAppWidgetHost.stopListening();
+ }
+
EventBus.getDefault().unregister(this);
}
@@ -551,7 +564,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
@Override
public void run() {
// Start listening for widget package changes if there is one bound
- if (mAppWidgetHost != null) {
+ if (!Constants.DebugFlags.App.DisableSearchBar && mAppWidgetHost != null) {
mAppWidgetHost.startListening();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index 563956b8fd1a..d8f40238eaf4 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -165,7 +165,8 @@ public class RecentsConfiguration {
} else {
// In portrait, the search bar appears on the top (which already has the inset)
int swInset = getInsetToSmallestWidth(windowBounds.right - windowBounds.left);
- taskStackBounds.set(windowBounds.left + swInset, searchBarBounds.bottom,
+ int top = searchBarBounds.isEmpty() ? topInset : 0;
+ taskStackBounds.set(windowBounds.left + swInset, searchBarBounds.bottom + top,
windowBounds.right - swInset, windowBounds.bottom);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
index aaeb10cf5f31..07c7897242a4 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
@@ -428,7 +428,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub
// Update the configuration for the current state
mConfig.update(mContext, ssp, ssp.getWindowRect());
- if (tryAndBindSearchWidget) {
+ if (!Constants.DebugFlags.App.DisableSearchBar && tryAndBindSearchWidget) {
// Try and pre-emptively bind the search widget on startup to ensure that we
// have the right thumbnail bounds to animate to.
// Note: We have to reload the widget id before we get the task stack bounds below
@@ -665,7 +665,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub
if (!useThumbnailTransition) {
// If there is no thumbnail transition, but is launching from home into recents, then
// use a quick home transition and do the animation from home
- if (hasRecentTasks) {
+ if (!Constants.DebugFlags.App.DisableSearchBar && hasRecentTasks) {
String homeActivityPackage = ssp.getHomeActivityPackageName();
String searchWidgetPackage = Prefs.getString(mContext,
Prefs.Key.SEARCH_APP_WIDGET_PACKAGE, null);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
index 76399f4446ae..cf4c9cb108e3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
@@ -34,14 +34,14 @@ import com.android.systemui.recents.model.TaskStack;
*/
class DockRegion {
public static TaskStack.DockState[] PHONE_LANDSCAPE = {
- TaskStack.DockState.LEFT, TaskStack.DockState.RIGHT
+ TaskStack.DockState.LEFT
};
public static TaskStack.DockState[] PHONE_PORTRAIT = {
// We only allow docking to the top for now
TaskStack.DockState.TOP
};
public static TaskStack.DockState[] TABLET_LANDSCAPE = {
- TaskStack.DockState.LEFT, TaskStack.DockState.RIGHT
+ TaskStack.DockState.LEFT
};
public static TaskStack.DockState[] TABLET_PORTRAIT = PHONE_PORTRAIT;
}