Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +8 −5 Original line number Diff line number Diff line Loading @@ -203,8 +203,14 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView } if (mConfig.launchedWithNoRecentTasks) { mEmptyView.setVisibility(View.VISIBLE); mRecentsView.setSearchBarVisibility(View.GONE); } else { mEmptyView.setVisibility(View.GONE); if (mRecentsView.hasSearchBar()) { mRecentsView.setSearchBarVisibility(View.VISIBLE); } else { addSearchBarAppWidgetView(); } } // Show the scrim if we animate into Recents without window transitions Loading Loading @@ -351,13 +357,10 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView mFullscreenOverlayStub = (ViewStub) findViewById(R.id.fullscreen_overlay_stub); mScrimViews = new SystemBarScrimViews(this, mConfig); // Update the recent tasks updateRecentsTasks(getIntent()); // Bind the search app widget when we first start up bindSearchBarAppWidget(); // Add the search bar layout addSearchBarAppWidgetView(); // Update the recent tasks updateRecentsTasks(getIntent()); // Update if we are getting a configuration change if (savedInstanceState != null) { Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +12 −5 Original line number Diff line number Diff line Loading @@ -66,8 +66,6 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV // The space partitioning root of this container SpaceNode mBSP; // Whether there are any tasks boolean mHasTasks; // Search bar view View mSearchBar; // Recents view callbacks Loading Loading @@ -110,13 +108,11 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV } // Create and add all the stacks for this partition of space. mHasTasks = false; ArrayList<TaskStack> stacks = mBSP.getStacks(); for (TaskStack stack : stacks) { TaskStackView stackView = new TaskStackView(getContext(), stack); stackView.setCallbacks(this); addView(stackView); mHasTasks |= (stack.getTaskCount() > 0); } // Enable debug mode drawing Loading Loading @@ -246,7 +242,6 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV // Add the new search bar if (searchBar != null) { mSearchBar = searchBar; mSearchBar.setVisibility(mHasTasks ? View.VISIBLE : View.GONE); addView(mSearchBar); if (Console.Enabled) { Loading @@ -258,6 +253,18 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV } } /** Returns whether there is currently a search bar */ public boolean hasSearchBar() { return mSearchBar != null; } /** Sets the visibility of the search bar */ public void setSearchBarVisibility(int visibility) { if (mSearchBar != null) { mSearchBar.setVisibility(visibility); } } /** * This is called with the full size of the window since we are handling our own insets. */ Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +8 −5 Original line number Diff line number Diff line Loading @@ -203,8 +203,14 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView } if (mConfig.launchedWithNoRecentTasks) { mEmptyView.setVisibility(View.VISIBLE); mRecentsView.setSearchBarVisibility(View.GONE); } else { mEmptyView.setVisibility(View.GONE); if (mRecentsView.hasSearchBar()) { mRecentsView.setSearchBarVisibility(View.VISIBLE); } else { addSearchBarAppWidgetView(); } } // Show the scrim if we animate into Recents without window transitions Loading Loading @@ -351,13 +357,10 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView mFullscreenOverlayStub = (ViewStub) findViewById(R.id.fullscreen_overlay_stub); mScrimViews = new SystemBarScrimViews(this, mConfig); // Update the recent tasks updateRecentsTasks(getIntent()); // Bind the search app widget when we first start up bindSearchBarAppWidget(); // Add the search bar layout addSearchBarAppWidgetView(); // Update the recent tasks updateRecentsTasks(getIntent()); // Update if we are getting a configuration change if (savedInstanceState != null) { Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +12 −5 Original line number Diff line number Diff line Loading @@ -66,8 +66,6 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV // The space partitioning root of this container SpaceNode mBSP; // Whether there are any tasks boolean mHasTasks; // Search bar view View mSearchBar; // Recents view callbacks Loading Loading @@ -110,13 +108,11 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV } // Create and add all the stacks for this partition of space. mHasTasks = false; ArrayList<TaskStack> stacks = mBSP.getStacks(); for (TaskStack stack : stacks) { TaskStackView stackView = new TaskStackView(getContext(), stack); stackView.setCallbacks(this); addView(stackView); mHasTasks |= (stack.getTaskCount() > 0); } // Enable debug mode drawing Loading Loading @@ -246,7 +242,6 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV // Add the new search bar if (searchBar != null) { mSearchBar = searchBar; mSearchBar.setVisibility(mHasTasks ? View.VISIBLE : View.GONE); addView(mSearchBar); if (Console.Enabled) { Loading @@ -258,6 +253,18 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV } } /** Returns whether there is currently a search bar */ public boolean hasSearchBar() { return mSearchBar != null; } /** Sets the visibility of the search bar */ public void setSearchBarVisibility(int visibility) { if (mSearchBar != null) { mSearchBar.setVisibility(visibility); } } /** * This is called with the full size of the window since we are handling our own insets. */ Loading