mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Two panel home empty page removing logic change
- Don't remove a single page if it's empty, only if both pages are empty. - Add back empty pages after they were removed while the phone was on single panel home. - On two panel home don't add new workspace items onto the second screen Test: manual Bug: 196376162 Change-Id: I4c54ffa3b359a236deb3ab67adb54111e77ec896
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID;
|
||||
import static com.android.launcher3.WorkspaceLayoutManager.SECOND_SCREEN_ID;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.LauncherActivityInfo;
|
||||
@@ -299,6 +300,11 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
||||
IntSet screensToExclude = new IntSet();
|
||||
if (FeatureFlags.QSB_ON_FIRST_SCREEN) {
|
||||
screensToExclude.add(FIRST_SCREEN_ID);
|
||||
|
||||
// On split display we don't want to add the new items onto the second screen.
|
||||
if (app.getInvariantDeviceProfile().isSplitDisplay) {
|
||||
screensToExclude.add(SECOND_SCREEN_ID);
|
||||
}
|
||||
}
|
||||
|
||||
for (int screen = 0; screen < screenCount; screen++) {
|
||||
|
||||
Reference in New Issue
Block a user