From 788433217422d8e23bf4e267cdcf0c1ee566bfde Mon Sep 17 00:00:00 2001 From: Shikha Malhotra Date: Thu, 24 Feb 2022 13:30:57 +0000 Subject: [PATCH] Top row of first workspace screen occupied only when QSB is placed at the top. This CL facilitates making the Feature Flag QSB_ON_FIRST_SCREEN as false for LauncherLilyGoogle to make sure that that the top row on the first screen is not blocked for QSB. Hinging it on BuildConfig allows it be overwritten in LauncherLilyGoogle. Bug: 208136186 Bug: 188511548 Test: Manually tested that top row of the first screen is not occupied and does not clear the shortcuts after a power cycle for LauncherLilyGoogle. Change-Id: I9113e2e2f2c0a160a2e1caf0ef3c5f86c6ec54b8 --- Android.bp | 15 +++++++++++++++ .../android/launcher3/config/FeatureFlags.java | 2 +- .../com/android/launcher3/BuildConfig.java | 9 +++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Android.bp b/Android.bp index 3aa93946fd..5a153a7d12 100644 --- a/Android.bp +++ b/Android.bp @@ -226,6 +226,21 @@ filegroup { ], } +// Common source files used to build go launcher +filegroup { + name: "launcher-go-src-no-build-config", + srcs: [ + "src/**/*.java", + "src/**/*.kt", + "quickstep/src/**/*.java", + "quickstep/src/**/*.kt", + "go/src/**/*.java", + "go/src/**/*.kt", + "go/quickstep/src/**/*.java", + "go/quickstep/src/**/*.kt", + ], +} + // Proguard files for Launcher3 filegroup { name: "launcher-proguard-rules", diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index 278bcf2fe5..3e0c9fc490 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -52,7 +52,7 @@ public final class FeatureFlags { * Enable moving the QSB on the 0th screen of the workspace. This is not a configuration feature * and should be modified at a project level. */ - public static final boolean QSB_ON_FIRST_SCREEN = true; + public static final boolean QSB_ON_FIRST_SCREEN = BuildConfig.QSB_ON_FIRST_SCREEN; /** * Feature flag to handle define config changes dynamically instead of killing the process. diff --git a/src_build_config/com/android/launcher3/BuildConfig.java b/src_build_config/com/android/launcher3/BuildConfig.java index 49aadf61ff..9a81d3f54c 100644 --- a/src_build_config/com/android/launcher3/BuildConfig.java +++ b/src_build_config/com/android/launcher3/BuildConfig.java @@ -17,6 +17,11 @@ package com.android.launcher3; public final class BuildConfig { - public static final String APPLICATION_ID = "com.android.launcher3"; - public static final boolean DEBUG = false; + public static final String APPLICATION_ID = "com.android.launcher3"; + public static final boolean DEBUG = false; + /** + * Flag to state if the QSB is on the first screen and placed on the top, + * this can be overwritten in other launchers with a different value, if needed. + */ + public static final boolean QSB_ON_FIRST_SCREEN = true; }