Loading packages/SystemUI/src/com/android/systemui/recents/Constants.java +2 −0 Original line number Diff line number Diff line Loading @@ -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 Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +23 −10 Original line number Diff line number Diff line Loading @@ -206,17 +206,21 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView mEmptyView = mEmptyViewStub.inflate(); } mEmptyView.setVisibility(View.VISIBLE); if (!Constants.DebugFlags.App.DisableSearchBar) { mRecentsView.setSearchBarVisibility(View.GONE); } } else { if (mEmptyView != null) { mEmptyView.setVisibility(View.GONE); } if (!Constants.DebugFlags.App.DisableSearchBar) { if (mRecentsView.hasValidSearchBar()) { mRecentsView.setSearchBarVisibility(View.VISIBLE); } else { refreshSearchWidgetView(); } } } // Animate the SystemUI scrims into view mScrimViews.prepareEnterRecentsAnimation(); Loading Loading @@ -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(); if (!Constants.DebugFlags.App.DisableSearchBar) { mAppWidgetHost = new RecentsAppWidgetHost(this, Constants.Values.App.AppWidgetHostId); } mPackageMonitor = new RecentsPackageMonitor(); mPackageMonitor.register(this); Loading @@ -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 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); if (!Constants.DebugFlags.App.DisableSearchBar) { filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED); } registerReceiver(mSystemBroadcastReceiver, filter); } Loading Loading @@ -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 if (!Constants.DebugFlags.App.DisableSearchBar) { mAppWidgetHost.stopListening(); } EventBus.getDefault().unregister(this); } Loading Loading @@ -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(); } } Loading packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +2 −1 Original line number Diff line number Diff line Loading @@ -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); } } Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
packages/SystemUI/src/com/android/systemui/recents/Constants.java +2 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +23 −10 Original line number Diff line number Diff line Loading @@ -206,17 +206,21 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView mEmptyView = mEmptyViewStub.inflate(); } mEmptyView.setVisibility(View.VISIBLE); if (!Constants.DebugFlags.App.DisableSearchBar) { mRecentsView.setSearchBarVisibility(View.GONE); } } else { if (mEmptyView != null) { mEmptyView.setVisibility(View.GONE); } if (!Constants.DebugFlags.App.DisableSearchBar) { if (mRecentsView.hasValidSearchBar()) { mRecentsView.setSearchBarVisibility(View.VISIBLE); } else { refreshSearchWidgetView(); } } } // Animate the SystemUI scrims into view mScrimViews.prepareEnterRecentsAnimation(); Loading Loading @@ -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(); if (!Constants.DebugFlags.App.DisableSearchBar) { mAppWidgetHost = new RecentsAppWidgetHost(this, Constants.Values.App.AppWidgetHostId); } mPackageMonitor = new RecentsPackageMonitor(); mPackageMonitor.register(this); Loading @@ -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 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); if (!Constants.DebugFlags.App.DisableSearchBar) { filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED); } registerReceiver(mSystemBroadcastReceiver, filter); } Loading Loading @@ -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 if (!Constants.DebugFlags.App.DisableSearchBar) { mAppWidgetHost.stopListening(); } EventBus.getDefault().unregister(this); } Loading Loading @@ -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(); } } Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +2 −1 Original line number Diff line number Diff line Loading @@ -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); } } Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading