Refactor all apps to depend on activity context.
The current AllAppsContainerView has been split into a base class and a subclass for activities. The base class allows using all apps with an activity context. A-Z and work profile tabs are supported, but search and the hotseat still require an Activity. Test: Manual. All apps should work the same. Bug: 204696617 Change-Id: I3b146714bc11b3b3555d97623aab5d78ac836482
This commit is contained in:
1 parent
46728f6481
commit
1664c9f418
26 files changed
+534
-387
No files matched your search
@@ -37,7 +37,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.ExtendedEditText;
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.AllAppsContainerView;
|
||||
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
|
||||
import com.android.launcher3.allapps.AllAppsGridAdapter.AdapterItem;
|
||||
import com.android.launcher3.allapps.AllAppsStore;
|
||||
import com.android.launcher3.allapps.AlphabeticalAppsList;
|
||||
@@ -57,8 +57,8 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
private final AllAppsSearchBarController mSearchBarController;
|
||||
private final SpannableStringBuilder mSearchQueryBuilder;
|
||||
|
||||
private AlphabeticalAppsList mApps;
|
||||
private AllAppsContainerView mAppsView;
|
||||
private AlphabeticalAppsList<?> mApps;
|
||||
private ActivityAllAppsContainerView<?> mAppsView;
|
||||
|
||||
// The amount of pixels to shift down and overlap with the rest of the content.
|
||||
private final int mContentOverlap;
|
||||
@@ -130,7 +130,7 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeSearch(AllAppsContainerView appsView) {
|
||||
public void initializeSearch(ActivityAllAppsContainerView<?> appsView) {
|
||||
mApps = appsView.getApps();
|
||||
mAppsView = appsView;
|
||||
mSearchBarController.initialize(
|
||||
|
||||
Reference in new issue
Block a user