mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Add smartspace as a widget to first page (implementation 2)
Flag: SMARTSPACE_AS_A_WIDGET Test: verify that the smartspace gets replaced with a smartspace widget Bug: 300140279 Change-Id: I42c170de5e2a9fd3d24d99bb8b09cf412c55e3a5
This commit is contained in:
@@ -29,6 +29,7 @@ import static com.android.launcher3.LauncherState.SPRING_LOADED;
|
||||
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
|
||||
import static com.android.launcher3.config.FeatureFlags.FOLDABLE_SINGLE_PAGE;
|
||||
import static com.android.launcher3.config.FeatureFlags.shouldShowFirstPageWidget;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SWIPELEFT;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SWIPERIGHT;
|
||||
@@ -594,7 +595,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
* Initializes and binds the first page
|
||||
*/
|
||||
public void bindAndInitFirstWorkspaceScreen() {
|
||||
if (!FeatureFlags.QSB_ON_FIRST_SCREEN) {
|
||||
if (!FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
|| shouldShowFirstPageWidget()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1012,7 +1014,9 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
int id = mWorkspaceScreens.keyAt(i);
|
||||
CellLayout cl = mWorkspaceScreens.valueAt(i);
|
||||
// FIRST_SCREEN_ID can never be removed.
|
||||
if ((!FeatureFlags.QSB_ON_FIRST_SCREEN || id > FIRST_SCREEN_ID)
|
||||
if (((!FeatureFlags.QSB_ON_FIRST_SCREEN
|
||||
|| shouldShowFirstPageWidget())
|
||||
|| id > FIRST_SCREEN_ID)
|
||||
&& cl.getShortcutsAndWidgets().getChildCount() == 0) {
|
||||
removeScreens.add(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user