Add predictions row to taskbar all apps.

- We need to listen to DeviceProfile changes in case the number of
  columns changes in the grid. I made an interface/mixin separate from
  ActivityContext to avoid polutting the latter with too many things. I
  also applied this change to existing taskbar A-Z grid.
- Added all apps visited count to onboarding preferences for only
  showing "All Apps" label in place of divider 20 times. Label is also
  tracked on taskbar side and should be kept in sync.

Test: Manual
Fix: 216843395
Bug: 174174514
Change-Id: I97aa91397c334123626caf18251f19e17c7104fb
This commit is contained in:
Brian Isganitis
2022-01-31 18:15:00 -05:00
parent 8c3cb4e324
commit 099945b075
16 changed files with 224 additions and 133 deletions

View File

@@ -41,7 +41,6 @@ import com.android.systemui.plugins.AllAppsRow.OnHeightUpdatedListener;
import com.android.systemui.plugins.PluginListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class FloatingHeaderView extends LinearLayout implements
@@ -226,8 +225,7 @@ public class FloatingHeaderView extends LinearLayout implements
return super.getFocusedChild();
}
<T extends Context & ActivityContext> void setup(
List<BaseAllAppsContainerView<T>.AdapterHolder> mAH, boolean tabsHidden) {
void setup(AllAppsRecyclerView mainRV, AllAppsRecyclerView workRV, boolean tabsHidden) {
for (FloatingHeaderRow row : mAllRows) {
row.setup(this, mAllRows, tabsHidden);
}
@@ -235,10 +233,8 @@ public class FloatingHeaderView extends LinearLayout implements
mTabsHidden = tabsHidden;
mTabLayout.setVisibility(tabsHidden ? View.GONE : View.VISIBLE);
mMainRV = setupRV(mMainRV,
mAH.get(BaseAllAppsContainerView.AdapterHolder.MAIN).mRecyclerView);
mWorkRV = setupRV(mWorkRV,
mAH.get(BaseAllAppsContainerView.AdapterHolder.WORK).mRecyclerView);
mMainRV = setupRV(mMainRV, mainRV);
mWorkRV = setupRV(mWorkRV, workRV);
mParent = (ViewGroup) mMainRV.getParent();
setMainActive(mMainRVActive || mWorkRV == null);
reset(false);