Base flags, changes and libraries for standalone build

This commit is contained in:
Alex Sim committed 2026-02-02 22:39:58 +01:00
1 parent 8f68d8e232
commit 36c23553a5
10 files changed
+277 -37

No files matched your search

+18 -7
View File
@@ -1,7 +1,18 @@
# Created by .ignore support plugin (hsz.mobi) db_files
.gradle *.iml
.idea .project
build .classpath
Launcher3_mx.iml .project.properties
gradlew gen/
gradlew.bat tests/stress/gen/
WallpaperPicker/gen/
WallpaperPicker/.project.properties
bin/
.idea/
.gradle/
.kotlin/
local.properties
gradle/
build/
gradlew*
.DS_Store
+40 -22
View File
@@ -59,13 +59,13 @@ android {
productFlavors { productFlavors {
aosp { aosp {
dimension "app" dimension "app"
applicationId 'com.android.launcher3' applicationId 'app.murinelauncher'
testApplicationId 'com.android.launcher3.tests' testApplicationId 'com.android.launcher3.tests'
} }
l3go { l3go {
dimension "app" dimension "app"
applicationId 'com.android.launcher3' applicationId 'app.murinelauncher'
testApplicationId 'com.android.launcher3.tests' testApplicationId 'com.android.launcher3.tests'
} }
@@ -97,15 +97,15 @@ android {
} }
} }
androidTest { //androidTest {
res.srcDirs = ['tests/res'] // res.srcDirs = ['tests/res']
java.srcDirs = ['tests/src', 'tests/tapl'] // java.srcDirs = ['tests/src', 'tests/tapl']
manifest.srcFile "tests/AndroidManifest-common.xml" // manifest.srcFile "tests/AndroidManifest-common.xml"
} //}
//
androidTestDebug { //androidTestDebug {
manifest.srcFile "tests/AndroidManifest.xml" // manifest.srcFile "tests/AndroidManifest.xml"
} //}
aosp { aosp {
java.srcDirs = ['src_flags', 'src_shortcuts_overrides'] java.srcDirs = ['src_flags', 'src_shortcuts_overrides']
@@ -166,28 +166,46 @@ kapt {
allprojects { allprojects {
ext { ext {
daggerVersion = '2.56.2' daggerVersion = '2.56.2'
addFrameworkJar = { String name -> def addFrameworkJarInternal = { Project proj, String name ->
def frameworkJar = new File(FRAMEWORK_PREBUILTS_DIR, name) def frameworkJar = new File(FRAMEWORK_PREBUILTS_DIR, name)
if (!frameworkJar.exists()) { if (!frameworkJar.exists()) {
throw new IllegalArgumentException("Framework jar path ${frameworkJar.path} doesn't exist") return
} }
gradle.projectsEvaluated { proj.dependencies {
tasks.withType(JavaCompile).configureEach { compileOnly proj.files(frameworkJar)
classpath = files(frameworkJar, classpath) }
proj.gradle.projectsEvaluated {
proj.tasks.withType(JavaCompile).configureEach {
classpath = proj.files(frameworkJar) + classpath
} }
tasks.withType(KotlinCompile).configureEach { proj.tasks.withType(KotlinCompile).configureEach {
libraries.from(files(frameworkJar)) // Prepend framework jar to the Kotlin compilation classpath
libraries.setFrom(proj.files(frameworkJar) + libraries.getFrom())
} }
} }
dependencies { }
compileOnly files(frameworkJar)
afterEvaluate { proj ->
if (proj.plugins.hasPlugin('com.android.application') || proj.plugins.hasPlugin('com.android.library')) {
addFrameworkJarInternal(proj, 'framework-16.jar')
proj.dependencies {
// Apply all shared prebuilt jars to every module
// Use compileOnly to avoid desugaring/R8 errors with framework stubs
compileOnly proj.fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: ['*.jar'], exclude: ['framework-16.jar'])
// Common androidx/libs available everywhere
implementation libs.androidx.core.ktx
implementation libs.annotation
implementation libs.kotlinx.coroutines
}
} }
} }
compileOnlyCommonJars = { compileOnlyCommonJars = {
dependencies { dependencies {
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-core.jar') compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-core-16.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd.jar') compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd-16.jar')
} }
} }
} }
@@ -169,6 +169,214 @@ public final class Flags {
return FEATURE_FLAGS.enablePredictiveBackGesture(); return FEATURE_FLAGS.enablePredictiveBackGesture();
} }
public static boolean restoreArchivedAppIconsFromDb() {
return FEATURE_FLAGS.restoreArchivedAppIconsFromDb();
}
public static boolean showTaskbarPinningPopupFromAnywhere() {
return FEATURE_FLAGS.showTaskbarPinningPopupFromAnywhere();
}
public static boolean enableMultiInstanceMenuTaskbar() {
return FEATURE_FLAGS.enableMultiInstanceMenuTaskbar();
}
public static boolean enableDesktopExplodedView() {
return FEATURE_FLAGS.enableDesktopExplodedView();
}
public static boolean enableLargeDesktopWindowingTile() {
return FEATURE_FLAGS.enableLargeDesktopWindowingTile();
}
public static boolean useNewIconForArchivedApps() {
return FEATURE_FLAGS.useNewIconForArchivedApps();
}
public static boolean ignoreThreeFingerTrackpadForNavHandleLongPress() {
return FEATURE_FLAGS.ignoreThreeFingerTrackpadForNavHandleLongPress();
}
public static boolean enableAltTabKqsOnConnectedDisplays() {
return FEATURE_FLAGS.enableAltTabKqsOnConnectedDisplays();
}
public static boolean enableOverviewCommandHelperTimeout() {
return FEATURE_FLAGS.enableOverviewCommandHelperTimeout();
}
public static boolean enableLauncherOverviewInWindow() {
return FEATURE_FLAGS.enableLauncherOverviewInWindow();
}
public static boolean predictiveBackToHomePolish() {
return FEATURE_FLAGS.predictiveBackToHomePolish();
}
public static boolean coordinateWorkspaceScale() {
return FEATURE_FLAGS.coordinateWorkspaceScale();
}
public static boolean enableOverviewBackgroundWallpaperBlur() {
return FEATURE_FLAGS.enableOverviewBackgroundWallpaperBlur();
}
public static boolean msdlFeedback() {
return FEATURE_FLAGS.msdlFeedback();
}
public static boolean enableSeparateExternalDisplayTasks() {
return FEATURE_FLAGS.enableSeparateExternalDisplayTasks();
}
public static boolean enableHoverOfChildElementsInTaskview() {
return FEATURE_FLAGS.enableHoverOfChildElementsInTaskview();
}
public static boolean oneGridSpecs() {
return FEATURE_FLAGS.oneGridSpecs();
}
public static boolean restoreArchivedShortcuts() {
return FEATURE_FLAGS.restoreArchivedShortcuts();
}
public static boolean enableStrictMode() {
return FEATURE_FLAGS.enableStrictMode();
}
public static boolean enableTieredWidgetsByDefaultInPicker() {
return FEATURE_FLAGS.enableTieredWidgetsByDefaultInPicker();
}
public static boolean enableLauncherVisualRefresh() {
return FEATURE_FLAGS.enableLauncherVisualRefresh();
}
public static boolean syncAppLaunchWithTaskbarStash() {
return FEATURE_FLAGS.syncAppLaunchWithTaskbarStash();
}
public static boolean enableExpressiveDismissTaskMotion() {
return FEATURE_FLAGS.enableExpressiveDismissTaskMotion();
}
public static boolean enableGrowthNudge() {
return FEATURE_FLAGS.enableGrowthNudge();
}
public static boolean enableDesktopWindowingCarouselDetach() {
return FEATURE_FLAGS.enableDesktopWindowingCarouselDetach();
}
public static boolean taskbarOverflow() {
return FEATURE_FLAGS.taskbarOverflow();
}
public static boolean enableMouseInteractionChanges() {
return FEATURE_FLAGS.enableMouseInteractionChanges();
}
public static boolean removeExcludeFromScreenMagnificationFlagUsage() {
return FEATURE_FLAGS.removeExcludeFromScreenMagnificationFlagUsage();
}
public static boolean enableTaskbarBehindShade() {
return FEATURE_FLAGS.enableTaskbarBehindShade();
}
public static boolean enableGestureNavHorizontalTouchSlop() {
return FEATURE_FLAGS.enableGestureNavHorizontalTouchSlop();
}
public static boolean enableContainerReturnAnimations() {
return FEATURE_FLAGS.enableContainerReturnAnimations();
}
public static boolean enableDesktopTaskAlphaAnimation() {
return FEATURE_FLAGS.enableDesktopTaskAlphaAnimation();
}
public static boolean enableShowEnabledShortcutsInAccessibilityMenu() {
return FEATURE_FLAGS.enableShowEnabledShortcutsInAccessibilityMenu();
}
public static boolean enableStateManagerProtoLog() {
return FEATURE_FLAGS.enableStateManagerProtoLog();
}
public static boolean extendibleThemeManager() {
return FEATURE_FLAGS.extendibleThemeManager();
}
public static boolean enableContrastTiles() {
return FEATURE_FLAGS.enableContrastTiles();
}
public static boolean removeAppsRefreshOnRightClick() {
return FEATURE_FLAGS.removeAppsRefreshOnRightClick();
}
public static boolean useSystemRadiusForAppWidgets() {
return FEATURE_FLAGS.useSystemRadiusForAppWidgets();
}
public static boolean enableActiveGestureProtoLog() {
return FEATURE_FLAGS.enableActiveGestureProtoLog();
}
public static boolean enableAllAppsButtonInHotseat() {
return FEATURE_FLAGS.enableAllAppsButtonInHotseat();
}
public static boolean oneGridRotationHandling() {
return FEATURE_FLAGS.oneGridRotationHandling();
}
public static boolean allAppsBlur() {
return FEATURE_FLAGS.allAppsBlur();
}
public static boolean letterFastScroller() {
return FEATURE_FLAGS.letterFastScroller();
}
public static boolean multilineSearchBar() {
return FEATURE_FLAGS.multilineSearchBar();
}
public static boolean enableDismissPredictionUndo() {
return FEATURE_FLAGS.enableDismissPredictionUndo();
}
public static boolean enableGestureNavOnConnectedDisplays() {
return FEATURE_FLAGS.enableGestureNavOnConnectedDisplays();
}
public static boolean enablePinningAppWithContextMenu() {
return FEATURE_FLAGS.enablePinningAppWithContextMenu();
}
public static boolean predictiveBackToHomeBlur() {
return FEATURE_FLAGS.predictiveBackToHomeBlur();
}
public static boolean workSchedulerInWorkProfile() {
return FEATURE_FLAGS.workSchedulerInWorkProfile();
}
public static boolean navigateToChildPreference() {
return FEATURE_FLAGS.navigateToChildPreference();
}
public static boolean accessibilityScrollOnAllapps() {
return FEATURE_FLAGS.accessibilityScrollOnAllapps();
}
public static boolean enableRecentsWindowProtoLog() {
return FEATURE_FLAGS.enableRecentsWindowProtoLog();
}
public static boolean enablePrivateSpace() { public static boolean enablePrivateSpace() {
return FEATURE_FLAGS.enablePrivateSpace(); return FEATURE_FLAGS.enablePrivateSpace();
} }
+1
View File
@@ -28,6 +28,7 @@ android {
} }
dependencies { dependencies {
api(project(":flags"))
implementation(libs.core) implementation(libs.core)
implementation(libs.annotation) implementation(libs.annotation)
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -134,6 +134,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
private final Rect mTempRect = new Rect(); private final Rect mTempRect = new Rect();
public static final boolean PROP_CAN_RENDER_GESTURAL_NAV_BUTTONS =
SystemProperties.getBoolean("persist.sys.ime.can_render_gestural_nav_buttons", true);
/** Whether the IME Switcher button is visible. */ /** Whether the IME Switcher button is visible. */
private static final int FLAG_IME_SWITCHER_BUTTON_VISIBLE = 1 << 0; private static final int FLAG_IME_SWITCHER_BUTTON_VISIBLE = 1 << 0;
/** Whether the IME is visible. */ /** Whether the IME is visible. */
@@ -311,7 +314,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
mNavButtonsView.setLayoutParams(navButtonsViewLayoutParams); mNavButtonsView.setLayoutParams(navButtonsViewLayoutParams);
mIsImeRenderingNavButtons = mIsImeRenderingNavButtons =
InputMethodService.canImeRenderGesturalNavButtons() && mContext.imeDrawsImeNavBar(); PROP_CAN_RENDER_GESTURAL_NAV_BUTTONS && mContext.imeDrawsImeNavBar();
if (!mIsImeRenderingNavButtons) { if (!mIsImeRenderingNavButtons) {
// IME switcher // IME switcher
final int switcherResId = Flags.imeSwitcherRevamp() final int switcherResId = Flags.imeSwitcherRevamp()
@@ -56,9 +56,10 @@ class HomeVisibilityState {
) )
} }
override fun onDisplayInsetsChanged(insetsState: InsetsState) { override fun onDisplayInsetsChanged(insetsState: InsetsState) {
val bottomInset = insetsState.calculateInsets(insetsState.displayFrame, val displayFrame = insetsState.displayFrame
WindowInsets.Type.navigationBars(), false).bottom val bottomInset = insetsState.calculateInsets(displayFrame, displayFrame,
navbarInsetPosition = insetsState.displayFrame.bottom - bottomInset WindowInsets.Type.navigationBars(), false,).bottom
navbarInsetPosition = displayFrame.bottom - bottomInset
} }
} }
) )
@@ -68,6 +68,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.launcher3.dagger.ApplicationContext; import com.android.launcher3.dagger.ApplicationContext;
import com.android.launcher3.dagger.LauncherAppComponent; import com.android.launcher3.dagger.LauncherAppComponent;
import com.android.launcher3.dagger.LauncherAppSingleton; import com.android.launcher3.dagger.LauncherAppSingleton;
import com.android.launcher3.taskbar.NavbarButtonsViewController;
import com.android.launcher3.util.DaggerSingletonObject; import com.android.launcher3.util.DaggerSingletonObject;
import com.android.launcher3.util.DaggerSingletonTracker; import com.android.launcher3.util.DaggerSingletonTracker;
import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.DisplayController;
@@ -119,9 +120,6 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E
private final RotationTouchHelper mRotationTouchHelper; private final RotationTouchHelper mRotationTouchHelper;
private final TaskStackChangeListener mPipListener; private final TaskStackChangeListener mPipListener;
// Cache for better performance since it doesn't change at runtime. // Cache for better performance since it doesn't change at runtime.
private final boolean mCanImeRenderGesturalNavButtons =
InputMethodService.canImeRenderGesturalNavButtons();
private @SystemUiStateFlags long mSystemUiStateFlags = QuickStepContract.SYSUI_STATE_AWAKE; private @SystemUiStateFlags long mSystemUiStateFlags = QuickStepContract.SYSUI_STATE_AWAKE;
private final Map<Integer, Long> mSysUIStateFlagsPerDisplay = new ConcurrentHashMap<>(); private final Map<Integer, Long> mSysUIStateFlagsPerDisplay = new ConcurrentHashMap<>();
private NavigationMode mMode = THREE_BUTTONS; private NavigationMode mMode = THREE_BUTTONS;
@@ -626,7 +624,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E
/** Returns whether IME is rendering nav buttons, and IME is currently showing. */ /** Returns whether IME is rendering nav buttons, and IME is currently showing. */
public boolean isImeRenderingNavButtons() { public boolean isImeRenderingNavButtons() {
return mCanImeRenderGesturalNavButtons && mMode == NO_BUTTON return NavbarButtonsViewController.PROP_CAN_RENDER_GESTURAL_NAV_BUTTONS && mMode == NO_BUTTON
&& ((getSysuiStateFlag() & SYSUI_STATE_IME_VISIBLE) != 0); && ((getSysuiStateFlag() & SYSUI_STATE_IME_VISIBLE) != 0);
} }