mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Fix foldable single page bug" into tm-qpr-dev am: 00cbb5e63c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21328431 Change-Id: Ib58ba25662e2da177752e61b015d6b17f963a2e2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -501,7 +501,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
}
|
||||
|
||||
private boolean isTwoPanelEnabled() {
|
||||
return mLauncher.mDeviceProfile.isTwoPanels;
|
||||
return !FOLDABLE_SINGLE_PAGE.get() && mLauncher.mDeviceProfile.isTwoPanels;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -663,8 +663,9 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
|
||||
// Inflate the cell layout, but do not add it automatically so that we can get the newly
|
||||
// created CellLayout.
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
CellLayout newScreen;
|
||||
if (FOLDABLE_SINGLE_PAGE.get() && isTwoPanelEnabled()) {
|
||||
if (FOLDABLE_SINGLE_PAGE.get() && dp.isTwoPanels) {
|
||||
newScreen = (CellLayout) LayoutInflater.from(getContext()).inflate(
|
||||
R.layout.workspace_screen_foldable, this, false /* attachToRoot */);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user