Merge "Move custom Launcher theme flag to shared SysUI package (1/3)" into main
This commit is contained in:
commit
829f57c522
6 files changed
+12
-16
No files matched your search
@@ -517,13 +517,6 @@ flag {
|
||||
bug: "394651876"
|
||||
}
|
||||
|
||||
flag {
|
||||
name: "extendible_theme_manager"
|
||||
namespace: "launcher"
|
||||
description: "Enables custom theme manager in Launcher"
|
||||
bug: "381897614"
|
||||
}
|
||||
|
||||
flag {
|
||||
name: "enable_alt_tab_kqs_flatenning"
|
||||
namespace: "lse_desktop_experience"
|
||||
|
||||
@@ -20,7 +20,6 @@ import static android.view.View.MeasureSpec.EXACTLY;
|
||||
import static android.view.View.MeasureSpec.makeMeasureSpec;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import static com.android.launcher3.Flags.extendibleThemeManager;
|
||||
import static com.android.launcher3.Hotseat.ALPHA_CHANNEL_PREVIEW_RENDERER;
|
||||
import static com.android.launcher3.LauncherPrefs.FIXED_LANDSCAPE_MODE;
|
||||
import static com.android.launcher3.LauncherPrefs.GRID_NAME;
|
||||
@@ -29,6 +28,7 @@ import static com.android.launcher3.graphics.ThemeManager.PREF_ICON_SHAPE;
|
||||
import static com.android.launcher3.graphics.ThemeManager.THEMED_ICONS;
|
||||
import static com.android.launcher3.model.ModelUtils.currentScreenContentFilter;
|
||||
import static com.android.launcher3.widget.LauncherWidgetHolder.APPWIDGET_HOST_ID;
|
||||
import static com.android.systemui.shared.Flags.extendibleThemeManager;
|
||||
|
||||
import static java.util.Comparator.comparingDouble;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import static android.content.res.Configuration.UI_MODE_NIGHT_NO;
|
||||
import static android.content.res.Configuration.UI_MODE_NIGHT_YES;
|
||||
import static android.view.Display.DEFAULT_DISPLAY;
|
||||
|
||||
import static com.android.launcher3.Flags.extendibleThemeManager;
|
||||
import static com.android.launcher3.LauncherPrefs.GRID_NAME;
|
||||
import static com.android.launcher3.LauncherPrefs.NON_FIXED_LANDSCAPE_GRID_NAME;
|
||||
import static com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID;
|
||||
@@ -30,6 +29,7 @@ import static com.android.launcher3.provider.LauncherDbUtils.selectionForWorkspa
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
import static com.android.launcher3.widget.LauncherWidgetHolder.APPWIDGET_HOST_ID;
|
||||
import static com.android.systemui.shared.Flags.extendibleThemeManager;
|
||||
|
||||
import android.app.WallpaperColors;
|
||||
import android.appwidget.AppWidgetHost;
|
||||
|
||||
@@ -90,6 +90,7 @@ android_library {
|
||||
"testables",
|
||||
"com_android_launcher3_flags_lib",
|
||||
"com_android_wm_shell_flags_lib",
|
||||
"com_android_systemui_shared_flags_lib",
|
||||
"android.appwidget.flags-aconfig-java",
|
||||
"platform-parametric-runner-lib",
|
||||
"kotlin-reflect",
|
||||
@@ -124,6 +125,7 @@ android_test {
|
||||
static_libs: [
|
||||
"Launcher3TestLib",
|
||||
"com_android_launcher3_flags_lib",
|
||||
"com_android_systemui_shared_flags_lib",
|
||||
],
|
||||
libs: [
|
||||
"android.test.base.stubs.system",
|
||||
@@ -197,6 +199,7 @@ android_robolectric_test {
|
||||
"flag-junit",
|
||||
"com_android_launcher3_flags_lib",
|
||||
"com_android_wm_shell_flags_lib",
|
||||
"com_android_systemui_shared_flags_lib",
|
||||
"androidx.test.uiautomator_uiautomator",
|
||||
"androidx.core_core-animation-testing",
|
||||
"androidx.test.ext.junit",
|
||||
|
||||
@@ -28,6 +28,7 @@ import static com.android.launcher3.util.LauncherModelHelper.TEST_ACTIVITY;
|
||||
import static com.android.launcher3.util.LauncherModelHelper.TEST_ACTIVITY2;
|
||||
import static com.android.launcher3.util.LauncherModelHelper.TEST_PACKAGE;
|
||||
import static com.android.launcher3.util.TestUtil.runOnExecutorSync;
|
||||
import static com.android.systemui.shared.Flags.FLAG_EXTENDIBLE_THEME_MANAGER;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@@ -59,7 +60,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.icons.cache.CachingLogic;
|
||||
import com.android.launcher3.icons.cache.IconCacheUpdateHandler;
|
||||
@@ -284,7 +284,7 @@ public class IconCacheTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnableFlags(Flags.FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@EnableFlags(FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
public void theme_icon_not_returned_if_not_requested() {
|
||||
ComponentName cn = new ComponentName(TEST_PACKAGE, TEST_ACTIVITY);
|
||||
UserHandle user = myUserHandle();
|
||||
@@ -302,7 +302,7 @@ public class IconCacheTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnableFlags(Flags.FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@EnableFlags(FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
public void theme_icon_returned_if_requested() {
|
||||
ComponentName cn = new ComponentName(TEST_PACKAGE, TEST_ACTIVITY);
|
||||
UserHandle user = myUserHandle();
|
||||
@@ -320,7 +320,7 @@ public class IconCacheTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisableFlags(Flags.FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@DisableFlags(FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
public void theme_icon_returned_if_not_requested_with_flag_off() {
|
||||
ComponentName cn = new ComponentName(TEST_PACKAGE, TEST_ACTIVITY);
|
||||
UserHandle user = myUserHandle();
|
||||
|
||||
+3
-3
@@ -21,8 +21,8 @@ import android.platform.test.annotations.EnableFlags
|
||||
import android.platform.test.flag.junit.SetFlagsRule
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.filters.SmallTest
|
||||
import com.android.launcher3.Flags
|
||||
import com.android.launcher3.icons.cache.CacheLookupFlag.Companion.DEFAULT_LOOKUP_FLAG
|
||||
import com.android.systemui.shared.Flags.FLAG_EXTENDIBLE_THEME_MANAGER
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Rule
|
||||
@@ -107,14 +107,14 @@ class CacheLookupFlagTest {
|
||||
)
|
||||
}
|
||||
|
||||
@DisableFlags(Flags.FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@DisableFlags(FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@Test
|
||||
fun `isVisuallyLessThan does not depend on theme with flag off`() {
|
||||
assertFalse(DEFAULT_LOOKUP_FLAG.withThemeIcon().isVisuallyLessThan(DEFAULT_LOOKUP_FLAG))
|
||||
assertFalse(DEFAULT_LOOKUP_FLAG.isVisuallyLessThan(DEFAULT_LOOKUP_FLAG.withThemeIcon()))
|
||||
}
|
||||
|
||||
@EnableFlags(Flags.FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@EnableFlags(FLAG_EXTENDIBLE_THEME_MANAGER)
|
||||
@Test
|
||||
fun `isVisuallyLessThan depends on theme with flag on`() {
|
||||
assertFalse(DEFAULT_LOOKUP_FLAG.withThemeIcon().isVisuallyLessThan(DEFAULT_LOOKUP_FLAG))
|
||||
|
||||
Reference in new issue
Block a user