diff --git a/.editorconfig b/.editorconfig
index b5297ead85..87cc9903e4 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -22,7 +22,6 @@ ktlint_code_style = intellij_idea
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_discouraged-comment-location = disabled
ktlint_standard_function-expression-body = disabled
-ktlint_standard_mixed-condition-operators = disabled
ktlint_compose_lambda-param-event-trailing = disabled
[*.md]
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 35bc4fb816..2aabcc996f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -1,7 +1,7 @@
name: Bug report
description: Create a report to help us address issues you are facing with the app.
title: "[BUG] "
-labels: [bug, 'status: needs triage']
+labels: [bug]
type: Bug
body:
- type: markdown
@@ -12,9 +12,9 @@ body:
> If you wish to help triage Lawnchair's issues, visit [#4232](https://github.com/LawnchairLauncher/lawnchair/issues/4232) for more information.
Thanks for taking the time to file this issue! Here are a few things to do before submitting:
- 1. Use the [**latest nightly version**](https://github.com/LawnchairLauncher/lawnchair#development-builds) when reporting bugs.
- 2. [**Read the FAQ**](https://lawnchair.app/faq/#common-issues) for common issues; if it is, please don't create an issue about it.
- 3. Search **both [open and closed issues](https://github.com/LawnchairLauncher/lawnchair/issues?q=is%3Aissue+sort%3Aupdated-desc+)** for your bug.
+ 1. Make sure you're on the [latest **nightly** version](https://github.com/LawnchairLauncher/lawnchair#development-builds) of the app.
+ 2. [Read the FAQ](https://lawnchair.app/faq) to check if it's one of the common issues you can encounter in the launcher; if it is, please don't create an issue about it.
+ 3. Search through **both** [open and closed issues](https://github.com/LawnchairLauncher/lawnchair/issues?q=is%3Aissue+sort%3Aupdated-desc+) for your bug.
- type: textarea
id: bug-description
@@ -28,11 +28,11 @@ body:
id: steps-to-reproduce
attributes:
label: Steps to reproduce
- description: Steps to reproduce the bug. **Be specific** on what steps you need to do to encounter this bug.
+ description: Steps to reproduce the bug. Be specific on what steps you need to do to encounter this bug.
placeholder: |
1. Go to '...'
2. Click on '....'
- 3. Scroll down to '...'
+ 3. Scroll down to '....'
4. See error
validations:
required: true
@@ -68,12 +68,9 @@ body:
id: app-version
attributes:
label: App version
- description: |
- Open Lawnchair settings > About to view the app version.
-
- On nightly builds, **long-press** the version name and paste the GitHub link here.
+ description: Open Lawnchair settings > About to view the app version. On nightly builds, long-press the version name and paste the GitHub link here.
placeholder: |
- 15 Beta 1
+ 14 Beta 3
validations:
required: true
@@ -81,11 +78,7 @@ body:
id: additional-context
attributes:
label: Additional context
- description: |
- Add any other context about the problem here.
-
- If this is a crash report, paste or link the crash message here.
- placeholder: |
- Crash log: https://katb.in/examplelink
+ description: Add any other context about the problem here.
+ placeholder: If this is a crash report, you can paste or link the crash message in here.
validations:
required: false
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml
index 5d643e874f..87ddd72f5d 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yaml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yaml
@@ -1,7 +1,7 @@
name: Feature request
description: Suggest features you want the developers (or contributors) to make for the launcher.
title: "[FEATURE] "
-labels: [feature-request, 'status: needs triage']
+labels: [feature-request]
type: Feature
body:
- type: markdown
@@ -12,11 +12,11 @@ body:
> If you wish to help triage Lawnchair's issues, visit [#4232](https://github.com/LawnchairLauncher/lawnchair/issues/4232) for more information.
Thanks for taking the time to file this issue! Here are a few things to do before submitting:
- 1. Use the [**latest nightly version**](https://github.com/LawnchairLauncher/lawnchair#development-builds) when requesting.
- 2. [**Read the FAQ**](https://lawnchair.app/faq) to check if your request is already planned by the developers.
- 3. Search **both [open and closed issues](https://github.com/LawnchairLauncher/lawnchair/issues?q=is%3Aissue+sort%3Aupdated-desc+)** for your feature request.
+ 1. Make sure you're on the [latest **nightly** version](https://github.com/LawnchairLauncher/lawnchair#development-builds) of the app.
+ 2. [Read the FAQ](https://lawnchair.app/faq) to check if it's one of the common issues you can encounter in the launcher; if it is, please don't create an issue about it.
+ 3. Search through **both** [open and closed issues](https://github.com/LawnchairLauncher/lawnchair/issues?q=is%3Aissue+sort%3Aupdated-desc+) for your bug.
- Please keep in mind that **we may not always implement this feature request**.
+ Please keep in mind that we may not always implement this feature request.
- type: textarea
id: feature-description
@@ -37,11 +37,9 @@ body:
- type: dropdown
id: feature-in-version-two
attributes:
- label: Did the feature exist in Lawnchair Legacy?
+ label: Did the feature exist in Lawnchair v2? (Play Store version)
description: |
- See [this FAQ page](https://lawnchair.app/faq/#what-happened-to-lawnchair-legacy) for more info about Lawnchair Legacy, previously
- known as Lawnchair 2.
-
+ If so, the feature might be already in the dev's to-do list and may be closed. See [this page](https://lawnchair.app/faq#can-you-return-x-feature-from-lawnchair-2) for more information.
options:
- "Yes"
- "No"
diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 0000000000..e3f65ef6a5
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,8 @@
+housekeeping:
+ - "*.md"
+ - .github/PULL_REQUEST_TEMPLATE/*.md
+ - .github/pull_request_template.md
+ - docs/**
+
+outdated:
+ - base-branch: '!16-dev'
diff --git a/.github/release.yml b/.github/release.yml
index 968b64dcc2..d15e13133a 100644
--- a/.github/release.yml
+++ b/.github/release.yml
@@ -3,7 +3,7 @@ changelog:
labels:
- bot
authors:
- - renovate
+ - renovate[bot]
- lawnchair-bot
- crowdin-bot
categories:
@@ -18,6 +18,3 @@ changelog:
- title: 🧹 Housekeeping
labels:
- housekeeping
- - title: 🧑💻 Dependencies
- labels:
- - dependencies
diff --git a/.github/renovate.json5 b/.github/renovate.json5
index 5cef531408..51645b7e00 100644
--- a/.github/renovate.json5
+++ b/.github/renovate.json5
@@ -6,17 +6,4 @@
labels: [
'dependencies',
],
- packageRules: [
- // Enable auto-merge for minor/patch updates.
- {
- matchUpdateTypes: [
- 'minor',
- 'patch',
- ],
- automerge: true,
- matchPackageNames: [
- '/.*/',
- ],
- },
- ],
}
diff --git a/.github/workflows/build_release_apk.yml b/.github/workflows/build_release_apk.yml
index 585ad7927b..b3696d91c2 100644
--- a/.github/workflows/build_release_apk.yml
+++ b/.github/workflows/build_release_apk.yml
@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-java@v5
@@ -31,7 +31,7 @@ jobs:
- name: Build release APK
run: ./gradlew assembleLawnWithQuickstepGithubRelease bundleLawnWithQuickstepPlayRelease
- name: Upload artifact
- uses: actions/upload-artifact@v6
+ uses: actions/upload-artifact@v5
with:
name: Release APK
path: build/outputs/*
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ef32b63e95..9d1e68eb1c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-java@v5
@@ -51,10 +51,11 @@ jobs:
echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
fi
+ # Release variant is disabled due to build conflict | assembleLawnWithQuickstepNightlyRelease
- name: Build debug APK
- run: ./gradlew assembleLawnWithQuickstepGithubDebug assembleLawnWithQuickstepPlayDebug assembleLawnWithQuickstepNightlyRelease --no-configuration-cache
+ run: ./gradlew assembleLawnWithQuickstepGithubDebug assembleLawnWithQuickstepPlayDebug --no-configuration-cache
- name: Upload artifact
- uses: actions/upload-artifact@v6
+ uses: actions/upload-artifact@v5
with:
name: Debug APK
path: build/outputs/apk/**/*.apk
@@ -62,7 +63,7 @@ jobs:
check-style:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-java@v5
@@ -77,7 +78,7 @@ jobs:
if: github.repository_owner == 'LawnchairLauncher'
needs: build-debug-apk
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
@@ -89,7 +90,7 @@ jobs:
python -m pip install --upgrade pip
pip install gitpython requests
- name: Download artifact
- uses: actions/download-artifact@v7
+ uses: actions/download-artifact@v6
with:
name: Debug APK
path: artifacts/debug-apk
@@ -118,13 +119,14 @@ jobs:
nightly-release:
runs-on: ubuntu-latest
- if: github.repository_owner == 'LawnchairLauncher' && github.event_name == 'push' && github.ref == 'refs/heads/15-dev'
+ if: false
+ # if: github.repository_owner == 'LawnchairLauncher' && github.event_name == 'push' && github.ref == 'refs/heads/15-dev'
needs: build-debug-apk
permissions:
contents: write
steps:
- - uses: actions/checkout@v6
- - uses: actions/download-artifact@v7
+ - uses: actions/checkout@v5
+ - uses: actions/download-artifact@v6
with:
name: Debug APK
# Note the # and () symbols are not supported in GitHub Release filenames, even manually
diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml
index 123e8e8435..4c945dc193 100644
--- a/.github/workflows/crowdin.yml
+++ b/.github/workflows/crowdin.yml
@@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@v5
- name: Sync Translations
uses: crowdin/github-action@v2
@@ -24,7 +24,7 @@ jobs:
upload_translations: false
upload_sources: true
download_translations: true
- localization_branch_name: 15-dev-localization
+ localization_branch_name: 16-dev-localization
create_pull_request: true
base_url: 'https://lawnchair.crowdin.com'
env:
diff --git a/.github/workflows/crowdin_download.yml b/.github/workflows/crowdin_download.yml
index 19fe5136d6..3e3d61d76d 100644
--- a/.github/workflows/crowdin_download.yml
+++ b/.github/workflows/crowdin_download.yml
@@ -18,7 +18,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@v5
- name: Download translations
uses: crowdin/github-action@v2
@@ -26,7 +26,7 @@ jobs:
upload_translations: false
upload_sources: false
download_translations: true
- localization_branch_name: 15-dev-localization
+ localization_branch_name: 16-dev-localization
create_pull_request: true
base_url: 'https://lawnchair.crowdin.com'
env:
diff --git a/.github/workflows/crowdin_upload.yml b/.github/workflows/crowdin_upload.yml
index f85f080306..afb14137a5 100644
--- a/.github/workflows/crowdin_upload.yml
+++ b/.github/workflows/crowdin_upload.yml
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@v5
- name: Upload Strings
uses: crowdin/github-action@v2
@@ -22,7 +22,7 @@ jobs:
upload_translations: false
upload_sources: true
download_translations: false
- localization_branch_name: 15-dev-localization
+ localization_branch_name: 16-dev-localization
create_pull_request: false
base_url: 'https://lawnchair.crowdin.com'
env:
diff --git a/.github/workflows/release_update.yml b/.github/workflows/release_update.yml
index 4354f5b46d..6f24e75756 100644
--- a/.github/workflows/release_update.yml
+++ b/.github/workflows/release_update.yml
@@ -27,7 +27,7 @@ jobs:
id-token: write
attestations: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
with:
submodules: true
- uses: actions/setup-java@v5
@@ -55,7 +55,7 @@ jobs:
with:
subject-path: ${{ github.event.inputs.artifactName }}
- name: Upload artifact
- uses: actions/upload-artifact@v6
+ uses: actions/upload-artifact@v5
with:
name: Release APK
path: ${{ github.event.inputs.artifactName }}
@@ -66,9 +66,9 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
- name: Download artifact
- uses: actions/download-artifact@v7
+ uses: actions/download-artifact@v6
with:
name: Release APK
path: artifacts/release-apk
@@ -86,9 +86,9 @@ jobs:
runs-on: ubuntu-latest
needs: build-release-apk
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v5
- name: Download artifact
- uses: actions/download-artifact@v7
+ uses: actions/download-artifact@v6
with:
name: Release APK
path: artifacts/release-apk
diff --git a/.gitmodules b/.gitmodules
index cf7551ac41..f2284aca65 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,4 @@
[submodule "platform_frameworks_libs_systemui"]
path = platform_frameworks_libs_systemui
url = https://github.com/LawnchairLauncher/platform_frameworks_libs_systemui
+ branch = 16-dev
diff --git a/Android.bp b/Android.bp
index eb033ee0da..07db82b10e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -17,7 +17,19 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
-min_launcher3_sdk_version = "30"
+min_launcher3_sdk_version = "31"
+
+// Targets that don't inherit framework aconfig libs (i.e., those that don't set
+// `platform_apis: true`) must manually link them.
+java_defaults {
+ name: "launcher-non-platform-apis-defaults",
+ static_libs: [
+ "android.os.flags-aconfig-java",
+ "android.multiuser.flags-aconfig-java",
+ "android.appwidget.flags-aconfig-java",
+ "com.android.window.flags.window-aconfig-java",
+ ],
+}
// Common source files used to build launcher (java and kotlin)
// All sources are split so they can be reused in many other libraries/apps in other folders
@@ -31,12 +43,156 @@ filegroup {
],
}
+// Main Launcher source for compose, excluding the build config
+filegroup {
+ name: "launcher-compose-enabled-src",
+ srcs: [
+ "compose/facade/enabled/**/*.kt",
+ "compose/facade/core/**/*.kt",
+ "compose/features/**/*.kt",
+ ],
+}
+
+filegroup {
+ name: "launcher-compose-disabled-src",
+ srcs: [
+ "compose/facade/core/**/*.kt",
+ "compose/facade/disabled/**/*.kt",
+ ],
+}
+
+filegroup {
+ name: "launcher-compose-test-helpers-src",
+ srcs: [
+ "compose/tests/com/android/launcher3/helper/TestHelper.kt",
+ ],
+}
+
+filegroup {
+ name: "launcher-compose-ui-tests-src",
+ srcs: [], // Placeholder for compose/tests/com/android/launcher3/ui/.. tests.
+}
+
+// Tests for features that are enabled only when compose dependency is enabled & run as part of
+// Launcher3Tests
+filegroup {
+ name: "launcher-compose-unit-tests-src",
+ srcs: [
+ "compose/tests/com/android/launcher3/widget/AddWidgetConfigTest.kt",
+ ],
+}
+
+filegroup {
+ name: "launcher-compose-tests-src",
+ srcs: [
+ "compose/tests/**/*.kt",
+ ],
+}
+
// Source code for quickstep build, on top of launcher-src
filegroup {
name: "launcher-quickstep-src",
srcs: [
- "quickstep/src/**/*.java",
"quickstep/src/**/*.kt",
+ "quickstep/src/**/*.java",
+ ],
+ device_common_srcs: [
+ ":launcher-quickstep-processed-protolog-src",
+ ],
+}
+
+filegroup {
+ name: "quickstep-compose-tests-src",
+ srcs: [
+ "quickstep/compose/tests/**/*.kt",
+ ],
+}
+
+// Launcher ProtoLog support
+filegroup {
+ name: "launcher-quickstep-unprocessed-protolog-src",
+ srcs: [
+ "quickstep/src_protolog/**/*.java",
+ ],
+}
+
+java_library {
+ name: "launcher-quickstep_protolog-groups",
+ srcs: [
+ "quickstep/src_protolog/**/*.java",
+ ],
+ static_libs: [
+ "protolog-group",
+ "androidx.annotation_annotation",
+ "com_android_launcher3_flags_lib",
+ ],
+}
+
+java_genrule {
+ name: "launcher-quickstep-processed-protolog-src",
+ srcs: [
+ ":protolog-impl",
+ ":launcher-quickstep-unprocessed-protolog-src",
+ ":launcher-quickstep_protolog-groups",
+ ],
+ tools: ["protologtool"],
+ cmd: "$(location protologtool) transform-protolog-calls " +
+ "--protolog-class com.android.internal.protolog.common.ProtoLog " +
+ "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
+ "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
+ "--viewer-config-file-path /system_ext/etc/launcher.quickstep.protolog.pb " +
+ "--output-srcjar $(out) " +
+ "$(locations :launcher-quickstep-unprocessed-protolog-src)",
+ out: ["launcher.quickstep.protolog.srcjar"],
+}
+
+java_genrule {
+ name: "gen-launcher.quickstep.protolog.pb",
+ srcs: [
+ ":launcher-quickstep-unprocessed-protolog-src",
+ ":launcher-quickstep_protolog-groups",
+ ],
+ tools: ["protologtool"],
+ cmd: "$(location protologtool) generate-viewer-config " +
+ "--protolog-class com.android.internal.protolog.common.ProtoLog " +
+ "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
+ "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
+ "--viewer-config $(out) " +
+ "$(locations :launcher-quickstep-unprocessed-protolog-src)",
+ out: ["launcher.quickstep.protolog.pb"],
+}
+
+prebuilt_etc {
+ name: "launcher.quickstep.protolog.pb",
+ system_ext_specific: true,
+ src: ":gen-launcher.quickstep.protolog.pb",
+ filename_from_src: true,
+}
+
+// Source code for quickstep dagger
+filegroup {
+ name: "launcher-quickstep-dagger",
+ srcs: [
+ "quickstep/dagger/**/*.java",
+ "quickstep/dagger/**/*.kt",
+ ],
+}
+
+// Source code for quickstep build with compose enabled, on top of launcher-src
+filegroup {
+ name: "launcher-quickstep-compose-enabled-src",
+ srcs: [
+ "quickstep/compose/facade/core/*.kt",
+ "quickstep/compose/facade/enabled/*.kt",
+ "quickstep/compose/features/**/*.kt",
+ ],
+}
+
+filegroup {
+ name: "launcher-quickstep-compose-disabled-src",
+ srcs: [
+ "quickstep/compose/facade/core/*.kt",
+ "quickstep/compose/facade/disabled/*.kt",
],
}
@@ -63,10 +219,130 @@ filegroup {
srcs: ["proguard.flags"],
}
+soong_config_bool_variable {
+ name: "release_enable_compose_in_launcher",
+}
+
+// Opt-in configuration for Launcher3 code depending on Jetpack Compose.
+soong_config_module_type {
+ name: "launcher_compose_java_defaults",
+ module_type: "java_defaults",
+ config_namespace: "ANDROID",
+ bool_variables: ["release_enable_compose_in_launcher"],
+ properties: [
+ "srcs",
+ "static_libs",
+ ],
+}
+
+launcher_compose_java_defaults {
+ name: "launcher_compose_defaults",
+ soong_config_variables: {
+ release_enable_compose_in_launcher: {
+ srcs: [
+ ":launcher-compose-enabled-src",
+ ],
+
+ static_libs: [
+ "widget_picker_component",
+ // Compose dependencies
+ "androidx.compose.runtime_runtime",
+ "androidx.compose.material3_material3",
+ "androidx.compose.ui_ui-tooling-preview",
+ "androidx.compose.ui_ui-tooling",
+ ],
+
+ // By default, Compose is disabled and we compile the ComposeFacade
+ // in compose/launcher3/facade/disabled/.
+ conditions_default: {
+ srcs: [
+ ":launcher-compose-disabled-src",
+ ],
+ static_libs: [],
+ },
+ },
+ },
+}
+
+soong_config_module_type {
+ name: "launcher_compose_tests_java_defaults",
+ module_type: "java_defaults",
+ config_namespace: "ANDROID",
+ bool_variables: ["release_enable_compose_in_launcher"],
+ properties: [
+ "srcs",
+ "static_libs",
+ ],
+}
+
+launcher_compose_tests_java_defaults {
+ name: "launcher_compose_tests_defaults",
+ soong_config_variables: {
+ release_enable_compose_in_launcher: {
+ srcs: [
+ ":launcher-compose-test-helpers-src",
+ ":launcher-compose-unit-tests-src",
+ ],
+ // Compose dependencies
+ static_libs: [
+ "widget_picker_component",
+ "androidx.compose.runtime_runtime",
+ "androidx.compose.ui_ui-test-junit4",
+ "androidx.compose.ui_ui-test-manifest",
+ ],
+
+ conditions_default: {
+ srcs: [],
+ static_libs: [],
+ },
+ },
+ },
+}
+
+// Opt-in configuration for Launcher Quickstep code depending on Jetpack Compose.
+soong_config_module_type {
+ name: "quickstep_compose_java_defaults",
+ module_type: "java_defaults",
+ config_namespace: "ANDROID",
+ bool_variables: ["release_enable_compose_in_launcher"],
+ properties: [
+ "srcs",
+ "static_libs",
+ ],
+}
+
+quickstep_compose_java_defaults {
+ name: "quickstep_compose_defaults",
+ soong_config_variables: {
+ release_enable_compose_in_launcher: {
+ srcs: [
+ ":launcher-quickstep-compose-enabled-src",
+ ],
+
+ // Compose dependencies
+ static_libs: [
+ "androidx.compose.runtime_runtime",
+ "androidx.compose.material3_material3",
+ "androidx.compose.ui_ui-tooling-preview",
+ "androidx.compose.ui_ui-tooling",
+ ],
+
+ // By default, Compose is disabled and we compile the ComposeFacade
+ // in compose/quickstep/facade/disabled/.
+ conditions_default: {
+ srcs: [
+ ":launcher-quickstep-compose-disabled-src",
+ ],
+ static_libs: [],
+ },
+ },
+ },
+}
+
android_library {
name: "launcher-aosp-tapl",
libs: [
- "framework-statsd",
+ "framework-statsd.stubs.module_lib",
],
static_libs: [
"androidx.annotation_annotation",
@@ -76,11 +352,14 @@ android_library {
"androidx.preference_preference",
"SystemUISharedLib",
"//frameworks/libs/systemui:animationlib",
+ "//frameworks/libs/systemui:contextualeducationlib",
"launcher-testing-shared",
],
srcs: [
"tests/tapl/**/*.java",
"tests/tapl/**/*.kt",
+ "tests/src_tapl_build_config/**/*.java",
+ "tests/src_tapl_build_config/**/*.kt",
],
resource_dirs: [],
manifest: "tests/tapl/AndroidManifest.xml",
@@ -141,7 +420,6 @@ android_library {
static_libs: [
"LauncherPluginLib",
"launcher_quickstep_log_protos_lite",
- "android.os.flags-aconfig-java",
"androidx-constraintlayout_constraintlayout",
"androidx.recyclerview_recyclerview",
"androidx.dynamicanimation_dynamicanimation",
@@ -154,7 +432,11 @@ android_library {
"//frameworks/libs/systemui:iconloader_base",
"//frameworks/libs/systemui:view_capture",
"//frameworks/libs/systemui:animationlib",
+ "//frameworks/libs/systemui:contextualeducationlib",
+ "//frameworks/libs/systemui:mechanics",
+ "//frameworks/libs/systemui:msdl",
"SystemUI-statsd",
+ "WindowManager-Shell-shared-AOSP",
"launcher-testing-shared",
"androidx.lifecycle_lifecycle-common-java8",
"androidx.lifecycle_lifecycle-extensions",
@@ -163,8 +445,12 @@ android_library {
"kotlinx_coroutines",
"com_android_launcher3_flags_lib",
"com_android_wm_shell_flags_lib",
- "android.appwidget.flags-aconfig-java",
- "com.android.window.flags.window-aconfig-java",
+ "dagger2",
+ "jsr330",
+ "com_android_systemui_shared_flags_lib",
+ "launcher-dagger-qualifiers",
+ "launcher-executor-qualifiers",
+ "launcher-executors-module",
],
manifest: "AndroidManifest-common.xml",
sdk_version: "current",
@@ -172,6 +458,9 @@ android_library {
lint: {
baseline_filename: "lint-baseline.xml",
},
+ flags_packages: [
+ "com_android_launcher3_flags",
+ ],
}
//
@@ -179,6 +468,10 @@ android_library {
//
android_app {
name: "Launcher3",
+ defaults: [
+ "launcher-non-platform-apis-defaults",
+ "launcher_compose_defaults",
+ ],
static_libs: [
"Launcher3ResLib",
@@ -190,7 +483,7 @@ android_app {
],
optimize: {
- proguard_flags_files: ["proguard.pro"],
+ proguard_flags_files: [":launcher-proguard-rules"],
// Proguard is disable for testing. Derivarive prjects to keep proguard enabled
enabled: false,
},
@@ -198,6 +491,7 @@ android_app {
sdk_version: "current",
min_sdk_version: min_launcher3_sdk_version,
target_sdk_version: "current",
+ plugins: ["dagger2-compiler"],
privileged: true,
system_ext_specific: true,
@@ -214,8 +508,12 @@ android_app {
"AndroidManifest-common.xml",
],
lint: {
+ extra_check_modules: ["Launcher3LintChecker"],
baseline_filename: "lint-baseline.xml",
},
+ kotlincflags: [
+ "-Xjvm-default=all",
+ ],
}
// Library with all the dependencies for building quickstep
@@ -226,24 +524,35 @@ android_library {
"quickstep/res",
],
libs: [
- "framework-statsd",
+ "framework-statsd.stubs.module_lib",
],
static_libs: [
"Launcher3ResLib",
"lottie",
"SystemUISharedLib",
"SettingsLibSettingsTheme",
+ "dagger2",
+ "protolog-group",
+ "displaylib",
],
manifest: "quickstep/AndroidManifest.xml",
min_sdk_version: "current",
+ lint: {
+ disabled_checks: ["MissingClass"],
+ },
}
// Library with all the source code and dependencies for building Launcher Go
android_library {
name: "Launcher3GoLib",
+ defaults: [
+ "launcher_compose_defaults",
+ "quickstep_compose_defaults",
+ ],
srcs: [
":launcher-src",
":launcher-quickstep-src",
+ ":launcher-quickstep-dagger",
"go/quickstep/src/**/*.java",
"go/quickstep/src/**/*.kt",
],
@@ -258,7 +567,10 @@ android_library {
"QuickstepResLib",
"androidx.room_room-runtime",
],
- plugins: ["androidx.room_room-compiler-plugin"],
+ plugins: [
+ "androidx.room_room-compiler-plugin",
+ "dagger2-compiler",
+ ],
manifest: "quickstep/AndroidManifest.xml",
additional_manifests: [
"go/AndroidManifest.xml",
@@ -267,19 +579,27 @@ android_library {
min_sdk_version: "current",
// TODO(b/319712088): re-enable use_resource_processor
use_resource_processor: false,
+ kotlincflags: [
+ "-Xjvm-default=all",
+ ],
}
// Library with all the source code and dependencies for building Quickstep
android_library {
name: "Launcher3QuickStepLib",
+ defaults: [
+ "launcher_compose_defaults",
+ "quickstep_compose_defaults",
+ ],
srcs: [
":launcher-src",
":launcher-quickstep-src",
+ ":launcher-quickstep-dagger",
":launcher-build-config",
],
resource_dirs: [],
libs: [
- "framework-statsd",
+ "framework-statsd.stubs.module_lib",
],
// Note the ordering here is important when it comes to resource
// overriding. We want the most specific resource overrides defined
@@ -291,18 +611,23 @@ android_library {
],
manifest: "quickstep/AndroidManifest.xml",
platform_apis: true,
+ plugins: ["dagger2-compiler"],
min_sdk_version: "current",
// TODO(b/319712088): re-enable use_resource_processor
use_resource_processor: false,
+ kotlincflags: [
+ "-Xjvm-default=all",
+ ],
}
// Build rule for Quickstep app.
android_app {
name: "Launcher3QuickStep",
-
static_libs: ["Launcher3QuickStepLib"],
optimize: {
- enabled: false,
+ proguard_flags_files: [":launcher-proguard-rules"],
+ enabled: true,
+ shrink_resources: true,
},
platform_apis: true,
@@ -316,7 +641,10 @@ android_app {
"Launcher2",
"Launcher3",
],
- required: ["privapp_whitelist_com.android.launcher3"],
+ required: [
+ "privapp_whitelist_com.android.launcher3",
+ "launcher.quickstep.protolog.pb",
+ ],
resource_dirs: ["quickstep/res"],
@@ -332,13 +660,11 @@ android_app {
}
-
// Build rule for Launcher3 Go app with quickstep for Android Go devices.
// Note that the following two rules are exactly same, and should
// eventually be merged into a single target
android_app {
name: "Launcher3Go",
-
static_libs: ["Launcher3GoLib"],
resource_dirs: [],
@@ -349,6 +675,7 @@ android_app {
optimize: {
proguard_flags_files: ["proguard.flags"],
enabled: true,
+ shrink_resources: true,
},
privileged: true,
@@ -372,9 +699,9 @@ android_app {
include_filter: ["com.android.launcher3.*"],
},
}
+
android_app {
name: "Launcher3QuickStepGo",
-
static_libs: ["Launcher3GoLib"],
resource_dirs: [],
@@ -385,6 +712,7 @@ android_app {
optimize: {
proguard_flags_files: ["proguard.flags"],
enabled: true,
+ shrink_resources: true,
},
privileged: true,
diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml
index e8fa644e1f..efaca3a83b 100644
--- a/AndroidManifest-common.xml
+++ b/AndroidManifest-common.xml
@@ -65,9 +65,14 @@
android:protectionLevel="signatureOrSystem"
android:label="@string/permlab_write_settings"
android:description="@string/permdesc_write_settings"/>
+
+
+
+
+
+
When set to "true" in the result of startActivityForResult, the client that launched the + * picker knows that activity was closed due to pending drag. + */ + private static final String EXTRA_IS_PENDING_WIDGET_DRAG = "is_pending_widget_drag"; + + // Intent extras that specify the desired widget width and height. If these are not specified in + // the intent, then widgets will not be filtered for size. + private static final String EXTRA_DESIRED_WIDGET_WIDTH = "desired_widget_width"; + private static final String EXTRA_DESIRED_WIDGET_HEIGHT = "desired_widget_height"; + // Unlike the AppWidgetManager.EXTRA_CATEGORY_FILTER, this filter removes certain categories. + // Filter is ignore if it is not a negative value. + // Example usage: WIDGET_CATEGORY_HOME_SCREEN.inv() and WIDGET_CATEGORY_NOT_KEYGUARD.inv() + private static final String EXTRA_CATEGORY_EXCLUSION_FILTER = "category_exclusion_filter"; + /** + * Widgets currently added by the user in the UI surface. + *
This allows widget picker to exclude existing widgets from suggestions.
+ */ + private static final String EXTRA_ADDED_APP_WIDGETS = "added_app_widgets"; + /** + * Intent extra for the string representing the title displayed within the picker header. + */ + private static final String EXTRA_PICKER_TITLE = "picker_title"; + /** + * Intent extra for the string representing the description displayed within the picker header. + */ + private static final String EXTRA_PICKER_DESCRIPTION = "picker_description"; + + /** + * A unique identifier of the surface hosting the widgets; + *"widgets" is reserved for home screen surface.
+ *"widgets_hub" is reserved for lockscreen hub surface.
+ */ + private static final String EXTRA_UI_SURFACE = "ui_surface"; + private static final String LOCKSCREEN_WIDGETS_HUB_UI_SURFACE = "widgets_hub"; + private static final Pattern UI_SURFACE_PATTERN = + Pattern.compile("^(widgets|widgets_hub)$"); + /** + * User ids that should be filtered out of the widget lists created by this activity. + */ + private static final String EXTRA_USER_ID_FILTER = "filtered_user_ids"; + + private WidgetsModel mModel; + private StringCache mStringCache; + private WidgetPredictionsRequester mWidgetPredictionsRequester; + private WidgetPickerDataProvider mWidgetPickerDataProvider; + private int mDesiredWidgetWidth; + private int mDesiredWidgetHeight; + private WidgetCategoryFilter mWidgetCategoryInclusionFilter; + private WidgetCategoryFilter mWidgetCategoryExclusionFilter; + // Widgets existing on the host surface. + @NonNull + private ListThis class handles the complex logic of creating various animators, including launch,
+ * minimize, and trampoline close animations, based on the provided transition information and
+ * launch type. It also utilizes {@link InteractionJankMonitor} to monitor animation jank.
+ *
+ * @param context The application context.
+ * @param launchType The type of app launch, containing animation parameters.
+ * @param cujType The CUJ (Critical User Journey) type for jank monitoring.
+ */
+class DesktopAppLaunchAnimatorHelper(
+ private val context: Context,
+ private val launchType: AppLaunchType,
+ @Cuj.CujType private val cujType: Int,
+ private val transactionSupplier: Supplier
+ * Shift nav buttons up to at-home position.
+ */
+ public void onLauncherResume() {
+ mLauncherPauseProgress.animateToValue(0.0f).start();
+ }
+
+ /**
+ * Called when Launcher Activity paused while staying at home.
+ *
+ * To avoid UI clash between taskbar & bottom sheet, shift nav buttons down to in-app position.
+ */
+ public void onLauncherPause() {
+ mLauncherPauseProgress.animateToValue(1.0f).start();
+ }
+
+ /**
+ * On launcher stop, avoid animating taskbar & overriding pre-existing animations.
+ */
+ public void onLauncherStop() {
+ mLauncherPauseProgress.cancelAnimation();
+ mLauncherPauseProgress.updateValue(0.0f);
+ }
+
+ private void onLauncherPauseProgressUpdate() {
+ // If we are not aligned with hotseat, setting this will clobber the 3 button nav position.
+ // So in that case, treat the progress as 0 instead.
+ float pauseProgress = isIconAlignedWithHotseat() ? mLauncherPauseProgress.value : 0;
+ onTaskbarInAppDisplayProgressUpdate(pauseProgress, LAUNCHER_PAUSE_PROGRESS_INDEX);
+ }
+
+
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/ManageWindowsTaskbarShortcut.kt b/quickstep/src/com/android/launcher3/taskbar/ManageWindowsTaskbarShortcut.kt
new file mode 100644
index 0000000000..2d6f1ee5be
--- /dev/null
+++ b/quickstep/src/com/android/launcher3/taskbar/ManageWindowsTaskbarShortcut.kt
@@ -0,0 +1,275 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3.taskbar
+
+import android.content.Context
+import android.graphics.Bitmap
+import android.view.MotionEvent
+import android.view.View
+import com.android.launcher3.AbstractFloatingView
+import com.android.launcher3.R
+import com.android.launcher3.Utilities
+import com.android.launcher3.model.data.ItemInfo
+import com.android.launcher3.popup.SystemShortcut
+import com.android.launcher3.taskbar.TaskbarAutohideSuspendController.FLAG_AUTOHIDE_SUSPEND_MULTI_INSTANCE_MENU_OPEN
+import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext
+import com.android.launcher3.util.TouchController
+import com.android.launcher3.views.ActivityContext
+import com.android.quickstep.RecentsModel
+import com.android.quickstep.SystemUiProxy
+import com.android.quickstep.util.DesktopTask
+import com.android.systemui.shared.recents.model.Task
+import com.android.systemui.shared.recents.model.ThumbnailData
+import com.android.wm.shell.shared.desktopmode.DesktopTaskToFrontReason
+import com.android.wm.shell.shared.multiinstance.ManageWindowsViewContainer
+
+/**
+ * A single menu item shortcut to execute displaying open instances of an app. Default interaction
+ * for [onClick] is to open the menu in a floating window. Touching one of the displayed tasks
+ * launches it.
+ */
+class ManageWindowsTaskbarShortcut> callback) {
- Bundle bundle = buildBundleForPredictionSession(existingWidgets, mUiSurface);
- Predicate
> callback) {
- List