Adding Private Space views to Launcher.
This CL adds the following: * Static View Elements to be added to AllApps recycler View * View Controller to load the above elements dynamically * Private Space Section Decorator * PrivateProfile Manager containing the logic related to Private Space * Abstract UserProfileManager as the super class of Work/Private ProfileManager Private Space Views Figma [link](https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?type=design&node-id=14535-111985&mode=design&t=JLz9W0O551TpzQYH-0) Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT Bug: 289223923 Test: Ran Launcher3 tests Change-Id: I8aa4247c78064a551e5e0d0b46d3fc033873f99d
This commit is contained in:
@@ -52,13 +52,16 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex
|
||||
|
||||
public static final int VIEW_TYPE_WORK_EDU_CARD = 1 << 4;
|
||||
public static final int VIEW_TYPE_WORK_DISABLED_CARD = 1 << 5;
|
||||
|
||||
public static final int NEXT_ID = 6;
|
||||
public static final int VIEW_TYPE_PRIVATE_SPACE_HEADER = 1 << 6;
|
||||
public static final int NEXT_ID = 7;
|
||||
|
||||
// Common view type masks
|
||||
public static final int VIEW_TYPE_MASK_DIVIDER = VIEW_TYPE_ALL_APPS_DIVIDER;
|
||||
public static final int VIEW_TYPE_MASK_ICON = VIEW_TYPE_ICON;
|
||||
|
||||
public static final int VIEW_TYPE_MASK_PRIVATE_SPACE_HEADER =
|
||||
VIEW_TYPE_PRIVATE_SPACE_HEADER;
|
||||
|
||||
protected final SearchAdapterProvider<?> mAdapterProvider;
|
||||
|
||||
/**
|
||||
@@ -196,6 +199,9 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex
|
||||
case VIEW_TYPE_WORK_DISABLED_CARD:
|
||||
return new ViewHolder(mLayoutInflater.inflate(
|
||||
R.layout.work_apps_paused, parent, false));
|
||||
case VIEW_TYPE_PRIVATE_SPACE_HEADER:
|
||||
return new ViewHolder(mLayoutInflater.inflate(
|
||||
R.layout.private_space_header, parent, false));
|
||||
default:
|
||||
if (mAdapterProvider.isViewSupported(viewType)) {
|
||||
return mAdapterProvider.onCreateViewHolder(mLayoutInflater, parent, viewType);
|
||||
@@ -223,6 +229,7 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIEW_TYPE_PRIVATE_SPACE_HEADER:
|
||||
case VIEW_TYPE_ALL_APPS_DIVIDER:
|
||||
case VIEW_TYPE_WORK_DISABLED_CARD:
|
||||
// nothing to do
|
||||
|
||||
Reference in New Issue
Block a user