Have separate DeviceProfile instances for taskbar and all apps windows.
We want to scale down the DeviceProfile for taskbar, but the all apps
window should rely on the original DeviceProfile.
Test: Manual
Fix: 232907361
Change-Id: Ia09f674ada9e445c1d7278fa94c536ea9de13ef9
Merged-In: Ia09f674ada9e445c1d7278fa94c536ea9de13ef9
(cherry picked from commit a9a78117c7)
This commit is contained in:
@@ -19,7 +19,6 @@ import static android.view.KeyEvent.ACTION_UP;
|
||||
import static android.view.KeyEvent.KEYCODE_BACK;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
|
||||
import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_REGION;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -78,14 +77,13 @@ class TaskbarAllAppsContext extends BaseTaskbarContext {
|
||||
TaskbarStashController taskbarStashController) {
|
||||
super(taskbarContext.createWindowContext(TYPE_APPLICATION_OVERLAY, null));
|
||||
mTaskbarContext = taskbarContext;
|
||||
mDeviceProfile = taskbarContext.getDeviceProfile();
|
||||
mWindowController = windowController;
|
||||
mDragController = new TaskbarDragController(this);
|
||||
mOnboardingPrefs = new OnboardingPrefs<>(this, Utilities.getPrefs(this));
|
||||
|
||||
mDragLayer = new TaskbarAllAppsDragLayer(this);
|
||||
TaskbarAllAppsSlideInView slideInView = (TaskbarAllAppsSlideInView) mLayoutInflater.inflate(
|
||||
R.layout.taskbar_all_apps, mDragLayer, false);
|
||||
mWindowController = windowController;
|
||||
mAllAppsViewController = new TaskbarAllAppsViewController(
|
||||
this,
|
||||
slideInView,
|
||||
@@ -101,6 +99,11 @@ class TaskbarAllAppsContext extends BaseTaskbarContext {
|
||||
return mAllAppsViewController;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceProfile getDeviceProfile() {
|
||||
return mWindowController.getDeviceProfile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskbarDragController getDragController() {
|
||||
return mDragController;
|
||||
@@ -141,15 +144,6 @@ class TaskbarAllAppsContext extends BaseTaskbarContext {
|
||||
return mTaskbarContext.getDotInfoForItem(info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDeviceProfile(DeviceProfile dp) {
|
||||
mDeviceProfile = dp;
|
||||
|
||||
AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE);
|
||||
|
||||
dispatchDeviceProfileChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDragStart() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user