diff --git a/.editorconfig b/.editorconfig index 87cc9903e4..b5297ead85 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,6 +22,7 @@ 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 2aabcc996f..35bc4fb816 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] +labels: [bug, 'status: needs triage'] 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. 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. + 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. - 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,9 +68,12 @@ 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: | - 14 Beta 3 + 15 Beta 1 validations: required: true @@ -78,7 +81,11 @@ body: id: additional-context attributes: label: Additional context - 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. + 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 validations: required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 87ddd72f5d..5d643e874f 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] +labels: [feature-request, 'status: needs triage'] 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. 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. + 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. - 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,9 +37,11 @@ body: - type: dropdown id: feature-in-version-two attributes: - label: Did the feature exist in Lawnchair v2? (Play Store version) + label: Did the feature exist in Lawnchair Legacy? description: | - 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. + See [this FAQ page](https://lawnchair.app/faq/#what-happened-to-lawnchair-legacy) for more info about Lawnchair Legacy, previously + known as Lawnchair 2. + options: - "Yes" - "No" diff --git a/.github/workflows/build_release_apk.yml b/.github/workflows/build_release_apk.yml index b3696d91c2..414463e03a 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@v5 + - uses: actions/checkout@v6 with: submodules: true - uses: actions/setup-java@v5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d1e68eb1c..4f9311ac5b 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@v5 + - uses: actions/checkout@v6 with: submodules: true - uses: actions/setup-java@v5 @@ -63,7 +63,7 @@ jobs: check-style: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true - uses: actions/setup-java@v5 @@ -78,7 +78,7 @@ jobs: if: github.repository_owner == 'LawnchairLauncher' needs: build-debug-apk steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true fetch-depth: 0 @@ -125,7 +125,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/download-artifact@v6 with: name: Debug APK diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index 4c945dc193..043c6a8bdc 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Sync Translations uses: crowdin/github-action@v2 diff --git a/.github/workflows/crowdin_download.yml b/.github/workflows/crowdin_download.yml index 3e3d61d76d..ac393db7f4 100644 --- a/.github/workflows/crowdin_download.yml +++ b/.github/workflows/crowdin_download.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Download translations uses: crowdin/github-action@v2 diff --git a/.github/workflows/crowdin_upload.yml b/.github/workflows/crowdin_upload.yml index afb14137a5..83091af2a6 100644 --- a/.github/workflows/crowdin_upload.yml +++ b/.github/workflows/crowdin_upload.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Upload Strings uses: crowdin/github-action@v2 diff --git a/.github/workflows/release_update.yml b/.github/workflows/release_update.yml index 6f24e75756..e6684d258d 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@v5 + - uses: actions/checkout@v6 with: submodules: true - uses: actions/setup-java@v5 @@ -66,7 +66,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Download artifact uses: actions/download-artifact@v6 with: @@ -86,7 +86,7 @@ jobs: runs-on: ubuntu-latest needs: build-release-apk steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Download artifact uses: actions/download-artifact@v6 with: diff --git a/GITHUB_CHANGELOG.md b/GITHUB_CHANGELOG.md index 1924b17439..fd5289fdfe 100644 --- a/GITHUB_CHANGELOG.md +++ b/GITHUB_CHANGELOG.md @@ -1,13 +1,48 @@ Lawnchair 16 pE Development 2 is here! Contributors are encouraged to target this branch instead of older (i.e., Lawnchair `15-dev`). -### đŸ—ī¸ Development 3 (Draft) +### đŸĨž Development 3 Release 2 + +Build: BD3.2211 + +Compatibility list: + +| đŸ—ī¸ Crash | đŸ’Ģ Limited features | đŸĨž Fully supported | +|-------------|---------------------|--------------------| +| Android 8.1 | | Android 12.0 | +| Android 9 | | Android 12.1 | +| Android 10 | | Android 13 | +| Android 11 | | Android 14 | +| | | Android 15 | +| | | Android 16 | + +#### Features +* [Lawnchair] Updated screenshots compressions and fastlane screenshot +* [Lawnchair] Features from Lawnchair 15-dev + +#### Fixes +* [Lawnchair] Conflict from Lawnchair 15-dev + +### Development 3 Release 1 + +Build: BD3.1711 + +The biggest change log ever, this marked the end of Bubble Tea [r2] branch as future development +switched to Bubble Tea [QPR1]. See you at Snapshot 7 or Development 4! + +(Again) Originally going to launch D3 if most of the issue on tracker have been resolved, but hit a +stability milestone instead. + +This release includes 4 new features, and 33 bug fixes, +Reimplemented some of Lawnchair features, better sizing of home screen, updated README.md screenshot +and the inclusion of Bubble Tea project into the official Lawnchair repository as 16-dev! This release have been tested with: * â˜ī¸ Pixel 6 (Android 12.0) * 📱 Nothing (3a)-series (Android 15, Android 16.0) * 📱 Vivo Y21 (Android 12.0) * 📱 HTC Wildfire E3 lite (Android 12.0) +* Many more! Unfortunately I only count build from pE Open testing! Compatibility list: @@ -27,6 +62,7 @@ Compatibility list: * [Lawnchair] Complex Clover icon shape * [Lawnchair] Very Sunny icon shape * [Lawnchair/Font] Update Google Fonts listing to 25102025 +* [Lawnchair/Gesture] Allow Open Quick Settings* #### Fixes * Disable OEM override on launcher settings, (reimplement `ENABLE_AUTO_INSTALLS_LAYOUT` | c51b2a221838aefb610b7146fc4ef7cb34e5e495) @@ -47,7 +83,21 @@ Compatibility list: * [SystemUI/Unfold] Crash when getting configuration for foldable-specific resources * [Lawnchair/Iconloaderlib] Don't parse monochrome drawable in Android 12.1 or less * [Launcher3/AllApps] Allow theming of Expressive allapps -* [Lawnchair] Lawnchair can now be compiled in release mode +* ~~[Lawnchair] Lawnchair can now be compiled in release mode~~ + * [Lawnchair] Fix crashes with WM-Shell +* [Lawnchair] Bottom sheet blur will only trigger when your device supported blur* +* [Lawnchair/Lazy] Corner radii of lazy component now matched radius of non-lazy* +* [Lawnchair/Debug] Cleanup the debug menu* +* [Lawnchair/Docs] Warn off danger using 16-dev branch* +* [Launcher3] Crash with predictive back on some device using Android 13/14 +* [Launcher3] WindowInsets crash in Android 11 +* [Launcher3] Widgets crash on some device using Android 12 +* [Launcher3/PrivateSpace] Use custom icons of Private Space lock* +* [Launcher3/Iconloaderlib] App badges for work profile* +* [Lawnchair] Update spacing for dock search settings* +* [Launcher3] Quickstep dispatcher crash on Android 13 +* [Launcher3] Crash due to missing resources for Android 8.0 +* [Lawnchair/Docs] Update screenshot to 16-dev ### đŸĨž Development 2 diff --git a/build.gradle b/build.gradle index 4d91d9d375..5686510a89 100644 --- a/build.gradle +++ b/build.gradle @@ -155,7 +155,7 @@ final def ciRunNumber = System.getenv("GITHUB_RUN_NUMBER") ?: "" final def isReleaseBuild = ciBuild && ciRef.contains("beta") final def devReleaseName = ciBuild ? "Dev.(#${ciRunNumber})" : "Dev.(${buildCommit})" final def version = "16" -final def releaseName = "Development 3 Release 0" +final def releaseName = "Development 3 Release 2" final def versionDisplayName = "${version}.${isReleaseBuild ? releaseName : devReleaseName}" final def majorVersion = versionDisplayName.split("\\.")[0] @@ -166,10 +166,10 @@ android { namespace "com.android.launcher3" defaultConfig { /* - * Lawnchair Launcher 16.0 Development 3 Release 1 + * Lawnchair Launcher 16.0 Development 3 Release 2 * see CONTRIBUTING.md#versioning-scheme */ - versionCode 16_00_01_03_01 + versionCode 16_00_01_03_02 versionName "${versionDisplayName}" buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\"" buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\"" @@ -506,8 +506,8 @@ spotless { } kotlin { target("lawnchair/src/**/*.kt") - ktlint().customRuleSets([ - "io.nlopez.compose.rules:ktlint:0.4.27", + ktlint("1.8.0").customRuleSets([ + "io.nlopez.compose.rules:ktlint:0.4.28", ]).editorConfigOverride([ "ktlint_compose_compositionlocal-allowlist": "disabled", "ktlint_compose_lambda-param-event-trailing": "disabled", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bf690725de..2abf739406 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,26 +6,26 @@ benchmarkMacroJunit4 = "1.4.1" concurrentFutures = "1.3.0" coreAnimation = "1.0.0" coreKtx = "1.17.0" -error_prone_annotations = "2.43.0" +error_prone_annotations = "2.44.0" espressoCore = "3.7.0" junit = "1.3.0" opto = "1.0.18" -protocVersion = "4.33.0" +protocVersion = "4.33.1" retrofit = "3.0.0" -room = "2.8.3" +room = "2.8.4" -activityCompose = "1.11.0" -airbnbLottie = "6.6.10" +activityCompose = "1.12.0" +airbnbLottie = "6.7.1" androidDesugar = "2.1.5" coil = "2.7.0" -composeBom = "2025.10.01" -compose = "1.9.4" -composeMaterial = "1.9.4" +composeBom = "2025.11.01" +compose = "1.9.5" +composeMaterial = "1.9.5" composeMaterial3 = "1.5.0-alpha07" composeMaterialIcons = "1.7.8" constraintlayout = "2.2.1" dagger = "2.57.2" -datastore = "1.1.7" +datastore = "1.2.0" dynamicanimation = "1.1.0" fuzzywuzzy = "1.4.0" googleMaterial = "1.13.0" @@ -39,10 +39,10 @@ kotlinxCoroutines = "1.10.2" kotlinxSerialization = "1.9.0" leakcanaryAndroid = "2.14" libsu = "6.0.0" -lifecycle = "2.9.4" +lifecycle = "2.10.0" materialMotionCompose = "2.0.1" -navigationCompose = "2.9.5" -okhttp = "5.2.1" +navigationCompose = "2.9.6" +okhttp = "5.3.2" palette = "1.0.0" persianDate = "1.7.1" preference = "1.2.1" @@ -53,15 +53,15 @@ restrictionBypass = "2.2" slice = "1.1.0-alpha02" smartspacer = "1.1.2" uiautomator = "2.3.0" -window = "1.5.0" +window = "1.5.1" -agp = "8.13.0" +agp = "8.13.1" baselineprofile = "1.4.1" kotlin = "2.2.21" protobuf = "0.9.5" licensee = "1.14.1" refine = "4.4.0" -spotless = "8.0.0" +spotless = "8.1.0" [plugins] android-application = { id = "com.android.application", version.ref = "agp" } @@ -73,7 +73,7 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -google-ksp = "com.google.devtools.ksp:2.3.0" +google-ksp = "com.google.devtools.ksp:2.3.3" google-protobuf = { id = "com.google.protobuf", version.ref = "protobuf" } cash-licensee = { id = "app.cash.licensee", version.ref = "licensee" } rikka-refine = { id = "dev.rikka.tools.refine", version.ref = "refine" } @@ -120,6 +120,7 @@ compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", versi compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "compose" } compose-ui-util = { group = "androidx.compose.ui", name = "ui-util", version.ref = "compose" } +# Dagger & Hilt dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "dagger" } dagger-hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "dagger" } dagger-hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "dagger" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6a38a8cea6..8a848873f3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806 -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip +distributionSha256Sum=72f44c9f8ebcb1af43838f45ee5c4aa9c5444898b3468ab3f4af7b6076c5bc3f +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/lawnchair/res/values-am-rET/strings.xml b/lawnchair/res/values-am-rET/strings.xml index fc4ebc48ba..f262d8e674 100644 --- a/lawnchair/res/values-am-rET/strings.xml +++ b/lawnchair/res/values-am-rET/strings.xml @@ -21,8 +21,8 @@ Actions and Verbs --> - Preview - Create + ቅá‹ĩመ á‹•á‹­á‰ŗ + ፍጠር Backup Restore Delete diff --git a/lawnchair/res/values-bn-rBD/strings.xml b/lawnchair/res/values-bn-rBD/strings.xml index a0c7efe308..4945e617f1 100644 --- a/lawnchair/res/values-bn-rBD/strings.xml +++ b/lawnchair/res/values-bn-rBD/strings.xml @@ -42,19 +42,19 @@ āϏāĻŦāϗ⧁āϞ⧋ āĻ…āύāĻŋāĻ°ā§āĻŦāĻžāϚāύ āĻ•āϰ⧁āύ āĻŦāĻŋāĻĒāϰ⧀āϤ āύāĻŋāĻ°ā§āĻŦāĻžāϚāύ āϞ⧋āĻĄ āĻšāĻšā§āϛ⧇â€Ļ - Dismiss + āĻ–āĻžāϰāĻŋāϜ āĻ•āϰ⧁āύ āφāĻĒāĻĄā§‡āϟ āĻĄāĻžāωāύāϞ⧋āĻĄ āĻ•āϰ⧁āύ āφāĻĒāĻĄā§‡āϟ āχāύāĻ¸ā§āϟāϞ āĻ•āϰ⧁āύ - View changes + āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāύ āĻĻ⧇āϖ⧁āύ āφāĻĒāύāĻŋ āφāĻĒ-āϟ⧁-āĻĄā§‡āϟ! - Updates - Failed to load changes - No changes found - Build #%1$d → #%2$d - by %1$s â€ĸ %2$s â€ĸ %3$s + āφāĻĒāĻĄā§‡āϟ + āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāύāϗ⧁āϞāĻŋ āϞ⧋āĻĄ āĻ•āϰāϤ⧇ āĻŦā§āϝāĻ°ā§āĻĨ āĻšāϝāĻŧ⧇āϛ⧇ + āϕ⧋āύ āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāύ āĻĒāĻžāĻ“āϝāĻŧāĻž āϝāĻžāϝāĻŧāύāĻŋ + āĻŦāĻŋāĻ˛ā§āĻĄ %1$d %2$d + āĻĻā§āĻŦāĻžāϰāĻž %1$s â€ĸ %2$s â€ĸ %3$s - just now + āĻāĻ–āύāχ %dm %dh %dd @@ -87,11 +87,11 @@ āĻ—ā§āϰāĻŋāĻĄ āĻ—āĻ āύ - Show wallpaper + āĻ“āϝāĻŧāĻžāϞāĻĒ⧇āĻĒāĻžāϰ āĻĻ⧇āϖ⧁āύ āĻ“āϝāĻŧāĻžāϞāĻĒ⧇āĻĒāĻžāϰ āĻ¸ā§āϟāĻžāχāϞ āĻŦā§āϝāĻžāĻ•āĻ—ā§āϰāĻžāωāĻ¨ā§āĻĄā§‡āϰ āĻ…āĻ¸ā§āĻŦāĻšā§āĻ›āϤāĻž - Separated Search bar background + āĻĒ⧃āĻĨāĻ• āϏāĻžāĻ°ā§āϚ āĻŦāĻžāϰ⧇āϰ āĻŦā§āϝāĻžāĻ•āĻ—ā§āϰāĻžāωāĻ¨ā§āĻĄ āĻ•ā§āϞāĻŋāĻĒāĻŦā§‹āĻ°ā§āĻĄā§‡āϰ āĻ…āĻ¸ā§āĻŦāĻšā§āĻ›āϤāĻž āĻĢāϞāĻžāĻĢāϞ āĻ•ā§āϞāĻŋāĻĒāĻŦā§‹āĻ°ā§āĻĄā§‡ āĻ•āĻĒāĻŋ āĻ•āϰāĻž āĻšāϝāĻŧ⧇āϛ⧇ @@ -115,10 +115,10 @@ āĻļ⧁āϧ⧁āĻŽāĻžāĻ¤ā§āϰ āĻ…āύāĻ¨ā§āϝ āĻ…ā§āϝāĻžāĻĒāϗ⧁āϞāĻŋ āĻĻ⧇āĻ–āĻžāύ āφāĻŽāĻžāϰ āĻĢā§‹āĻ˛ā§āĻĄāĻžāϰ - To perform certain actions (such as locking your phone) when performing a gesture, Lawnchair requires accessibility access.\n\nLawnchair doesn\'t watch any user action, though the privilege to do so is required for all accessibility services. Lawnchair discards any event sent by the system.\n\nIn order to lock your phone, or to open the Recents screen, Lawnchair uses the performGlobalAction Accessibility service. + āĻ…āĻ™ā§āĻ—āĻ­āĻ™ā§āĻ—āĻŋ āĻ•āϰāĻžāϰ āϏāĻŽāϝāĻŧ āύāĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āϟ āĻ•āĻŋāϛ⧁ āĻ•āĻžāϜ (āϝ⧇āĻŽāύ āφāĻĒāύāĻžāϰ āĻĢā§‹āύ āϞāĻ• āĻ•āϰāĻž) āĻ•āϰāĻžāϰ āϜāĻ¨ā§āϝ, āϞāύāĻšā§‡āϝāĻŧāĻžāϰ⧇āϰ āĻ…ā§āϝāĻžāĻ•ā§āϏ⧇āϏāĻŋāĻŦāĻŋāϞāĻŋāϟāĻŋ āĻ…ā§āϝāĻžāĻ•ā§āϏ⧇āϏ āĻĒā§āϰāϝāĻŧā§‹āϜāύ. \n\nāϞāύāĻšā§‡āϝāĻŧāĻžāϰ āĻŦā§āϝāĻŦāĻšāĻžāϰāĻ•āĻžāϰ⧀āϰ āϕ⧋āύāĻ“ āĻ•ā§āϰāĻŋāϝāĻŧāĻžāĻ•āϞāĻžāĻĒ āĻĒāĻ°ā§āϝāĻŦ⧇āĻ•ā§āώāĻŖ āĻ•āϰ⧇ āύāĻž, āϝāĻĻāĻŋāĻ“ āϏāĻŽāĻ¸ā§āϤ āĻ…ā§āϝāĻžāĻ•ā§āϏ⧇āϏāĻŋāĻŦāĻŋāϞāĻŋāϟāĻŋ āĻĒāϰāĻŋāώ⧇āĻŦāĻžāϰ āϜāĻ¨ā§āϝ āĻāϟāĻŋ āĻ•āϰāĻžāϰ āĻ…āϧāĻŋāĻ•āĻžāϰ āĻĒā§āϰāϝāĻŧā§‹āϜāύāĨ¤ āϞāύāĻšā§‡āϝāĻŧāĻžāϰ āϏāĻŋāĻ¸ā§āĻŸā§‡āĻŽ āĻĻā§āĻŦāĻžāϰāĻž āĻĒā§āϰ⧇āϰāĻŋāϤ āϝ⧇āϕ⧋āύ⧋ āχāϭ⧇āĻ¨ā§āϟ āĻŦāĻžāϤāĻŋāϞ āĻ•āϰ⧇ āĻĻ⧇āϝāĻŧāĨ¤\n\nāφāĻĒāύāĻžāϰ āĻĢā§‹āύ āϞāĻ• āĻ•āϰāϤ⧇, āĻ…āĻĨāĻŦāĻž Recents āĻ¸ā§āĻ•ā§āϰāĻŋāύ āϖ⧁āϞāϤ⧇, Lawnchair performGlobalAction āĻ…ā§āϝāĻžāĻ•ā§āϏ⧇āϏāĻŋāĻŦāĻŋāϞāĻŋāϟāĻŋ āĻĒāϰāĻŋāώ⧇āĻŦāĻž āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰ⧇āĨ¤. %1$s (%2$d) %1$d x %2$d - %1$s & %2$s + %1$s&%2$s āωāĻ¨ā§āύāϤ āĻĢāĻ¨ā§āϟ āĻ•āĻžāĻ¸ā§āϟāĻŽāĻžāχāĻœā§‡āĻļāύ āĻ•āĻŋāϛ⧁ āϞ⧇āĻ–āĻž āĻ…āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāĻŋāϤ āϰāϝāĻŧ⧇ āϗ⧇āϛ⧇ - At a Glance calendar customization + āĻāĻ• āύāϜāϰ⧇ āĻ•ā§āϝāĻžāϞ⧇āĻ¨ā§āĻĄāĻžāϰ āĻ•āĻžāĻ¸ā§āϟāĻŽāĻžāχāĻœā§‡āĻļāύ Allow showing date in non-Gregorian calendar systems Increase maximum grid size limit Increase maximum allowed home screen grid size from 10 x 10 to 20 x 20 @@ -160,13 +160,13 @@ Deck layout Show a layout option to hide the app drawer and automatically add new apps to the home screen Lock/unlock - Prevent selected app from closing when pressing \"Clear all\" + Fade In Suck In App closing animation Overlay - None + āϕ⧋āύāϟāĻž āύāĻž Icon style - Icon shape - Icon size + āφāχāĻ•āύ⧇āϰ āφāĻ•ā§ƒāϤāĻŋ + āφāχāĻ•āύ⧇āϰ āφāĻ•āĻžāϰ Show labels Label size Use multiple lines @@ -196,7 +196,7 @@ āĻ¸ā§āĻŦāĻšā§āĻ› āφāχāĻ•āύ āĻŦā§āϝāĻžāĻŦāĻšāĻžāϰ āĻ•āϰ⧁āύ āĻĨāĻŋāĻŽ-āϝ⧁āĻ•ā§āϤ āφāχāĻ•āύ āϗ⧁āϞāĻŋāϤ⧇ Auto-adaptive icons For all non-adaptive icons - Show shadow behind icons + āφāχāĻ•āύ⧇āϰ āĻĒāĻŋāĻ›āύ⧇ āĻ›āĻžāϝāĻŧāĻž āĻĻ⧇āĻ–āĻžāĻ“ Background lightness Use 100% background lightness for white Reset custom icons @@ -234,9 +234,9 @@ āĻ—ā§‹āϞ āĻŽāϏ⧃āĻŖ āĻ•āĻžāϟ - Top left - Top right - Bottom left + āωāĻĒāϰ⧇āϰ āĻŦāĻžāĻŽā§‡ + āωāĻĒāϰ⧇āϰ āĻĄāĻžāύ⧇ + āύāĻŋāĻšā§‡āϰ āĻŦāĻžāĻŽā§‡ Bottom right Export to clipboard Import from clipboard @@ -254,7 +254,7 @@ Add fonts OTF and TTF fonts are supported - Font not found + āĻĢāĻ¨ā§āϟ āĻĒāĻžāĻ“āϝāĻŧāĻž āϝāĻžāϝāĻŧāύāĻŋ Font (experimental) āϏāĻžāϧāĻžāϰāĻŖ Headings @@ -288,7 +288,7 @@ Tonal Spot Vibrant Expressive - Rainbow + āϰāĻ‚āϧāύ⧁ Fruit Salad Content Monochromatic @@ -322,19 +322,19 @@ Battery low "%1$d%% — āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻšāĻŦ⧇ %2$s" āφāϟ āĻ āĻ—ā§āϞāĻ¨ā§āϏ - What to show + āϕ⧀ āĻĻ⧇āĻ–āĻžāύ⧋ āĻšāĻŦ⧇ āĻ•ā§āϝāĻžāϞ⧇āĻ¨ā§āĻĄāĻžāϰ - Date and time + āϤāĻžāϰāĻŋāĻ– āĻ“ āϏāĻŽāϝāĻŧ āϤāĻžāϰāĻŋāĻ– āϏāĻŽā§Ÿ - Time format + āϏāĻŽāϝāĻŧ⧇āϰ āĻŦāĻŋāĻ¨ā§āϝāĻžāϏ Follow system - 12-hour format - 24-hour format + ⧧⧍ āϘāĻŖā§āϟāĻžāϰ āĻŦāĻŋāĻ¨ā§āϝāĻžāϏ + ⧍ā§Ē āϘāĻŖā§āϟāĻžāϰ āĻŦāĻŋāĻ¨ā§āϝāĻžāϏ āφāĻŦāĻšāĻžāĻ“ā§ŸāĻž - Battery status + āĻŦā§āϝāĻžāϟāĻžāϰāĻŋāϰ āĻ…āĻŦāĻ¸ā§āĻĨāĻž āĻāĻ–āύ āϚāϞāϛ⧇ Maximum number of targets @@ -347,9 +347,9 @@ Show on home screen At a Glance can be manually added to the home screen by placing the Lawnchair widget - At a Glance provider - Google - Google Search + āĻāĻ• āύāϜāϰ āĻĒā§āϰāĻĻāĻžāύāĻ•āĻžāϰ⧀ + āϗ⧁āĻ—āϞ + āϗ⧁āĻ—āϞ āϏāĻžāĻ°ā§āϚ " — " āĻĒ⧇āϜ %1$d āĻŽā§‹āϟ āĻĒ⧇āϜ %2$d @@ -361,17 +361,17 @@ --> āϏāĻŽāĻ°ā§āĻĨāύ āĻ…āύ⧁āĻŦāĻžāĻĻ āĻ•āϰ⧁āύ - Donate + āĻĻāĻžāύ āĻĒāĻŖā§āϝ Design and development āĻŦāĻŋāĻ•āĻžāĻļ QuickSwitch maintenance āĻĻ⧇āĻ­-āĻ“āĻĒāϏ Support and PR - Community - Telegram + āϏāĻŽā§āĻĒā§āϰāĻĻāĻžāϝāĻŧ + āĻŸā§‡āϞāĻŋāĻ—ā§āϰāĻžāĻŽ āĻ–āĻŦāϰ - Legal + āφāχāύ āĻ¸ā§āĻŦā§€āĻ•ā§ƒāϤāĻŋ Privacy policy Active @@ -381,7 +381,7 @@ Backup and restore --> - Create backup + āĻŦā§āϝāĻžāĻ•āφāĻĒ āϤ⧈āϰāĻŋ What to back up Layout and settings āĻ“āϝāĻŧāĻžāϞāĻĒ⧇āĻĒāĻžāϰ @@ -397,24 +397,24 @@ Gesture settings --> - Double tap - Swipe up - Swipe down - Home button - Back button - Swipe left - Swipe right - Do nothing + āĻĄāĻžāĻŦāϞ āĻŸā§āϝāĻžāĻĒ + āωāĻĒāϰ⧇āϰ āĻĻāĻŋāϕ⧇ āϏ⧋āϝāĻŧāĻžāχāĻĒ + āύāĻŋāĻšā§‡āϰ āĻĻāĻŋāϕ⧇ āϏ⧋āϝāĻŧāĻžāχāĻĒ + āĻšā§‹āĻŽ āĻŦā§‹āϤāĻžāĻŽ + āĻŦā§āϝāĻžāĻ• āĻŦā§‹āϤāĻžāĻŽ + āĻŦāύ āĻĻāĻŋāϕ⧇ āϏ⧋āϝāĻŧāĻžāχāĻĒ + āĻĻāĻžāύ āĻĻāĻŋāϕ⧇ āϏ⧋āϝāĻŧāĻžāχāĻĒ + āĻ•āĻŋāϛ⧁ āĻ•āϰ⧋ āύāĻž āĻŦāĻ¨ā§āϧ Open Recents screen Open notification panel - Open app + āĻ…ā§āϝāĻžāĻĒ āϖ⧁āϞ⧁āύ āϖ⧁āϞ⧁āύ %1$s Open app drawer Open app search - Open search + āϏāĻžāĻ°ā§āϚ āϖ⧁āϞ⧁āύ Open assistant - Pick app + āĻ…ā§āϝāĻžāĻĒ āĻŦ⧇āϛ⧇ āύāĻŋāύ Admin permissions required To use Double-Tap to Sleep, set Lawnchair as a device admin app. Tap \"Open settings\", then tap \"Activate this device admin app.\" āĻĄāĻžāĻŦāϞ-āĻŸā§āϝāĻžāĻĒ⧇ āϞāĻ• āĻšāĻ“ā§ŸāĻž āĻŦāĻ¨ā§āϧ āĻšāϝāĻŧ⧇ āϝāĻžāĻŦ⧇. @@ -458,7 +458,7 @@ Scroll wallpaper Wallpaper depth effect Zoom in and out of the wallpaper when transitioning between areas of the launcher - Top shadow + āωāĻĒāϰ⧇āϰ āĻ›āĻžāϝāĻŧāĻž Home screen grid Lock home screen Unlock home screen @@ -477,7 +477,7 @@ Dark status bar Status bar clock Dynamically hide status bar clock in first screen - Text color + āϞ⧇āĻ–āĻžāϰ āϰāĻ‚ āĻšāĻžāϞāĻ•āĻž āĻ—āĻžā§ Rounded corners @@ -499,10 +499,10 @@ Outline color āϕ⧋āϪ⧇āϰ āĻŦā§āϝāĻžāϏāĻžāĻ°ā§āϧ Apply accent color - Search provider - Show background - Left margin - Right margin + āϏāĻžāĻ°ā§āϚ āĻĒā§āϰāĻĻāĻžāύāĻ•āĻžāϰ⧀ + āĻŦā§āϝāĻžāĻ•āĻ—ā§āϰāĻžāωāĻ¨ā§āĻĄ āĻĻ⧇āĻ–āĻžāĻ“ + āĻŦāĻžāĻŽ āĻŽāĻžāĻ°ā§āϜāĻŋāύ + āĻĄāĻžāύ āĻŽāĻžāĻ°ā§āϜāĻŋāύ Top margin Bottom margin Background color @@ -521,20 +521,20 @@ App search āĻĒāĻ›āĻ¨ā§āĻĻāϏāχ %1$s and Lawnchair have a revenue share agreement.\n\nSearching with %1$s helps support Lawnchair. - App - Website - App required + āĻ…ā§āϝāĻžāĻĒ + āĻ“āϝāĻŧ⧇āĻŦāϏāĻžāχāϟ + āĻ…ā§āϝāĻžāĻĒ āĻĻāϰāĻ•āĻžāϰ āĻ…āύ⧁āϏāĻ¨ā§āϧāĻžāύ āĻ•āϰ⧁āύ āϗ⧁āĻ—āϞ āϞ⧇āĻ¨ā§āϏ āĻ•āĻŖā§āϠ⧇āϰ āϏāĻ¨ā§āϧāĻžāύ - Hidden apps + āϞ⧁āĻ•āĻžāύ⧋ āĻ…ā§āϝāĻžāĻĒ Load apps in bulk Load and display icons in bulk instead of individually Remember position Remember app drawer position after leaving drawer - Show scrollbar + āĻ¸ā§āĻ•ā§āϰ⧋āϞāĻŦāĻžāϰ āĻĻ⧇āĻ–āĻžāĻ“ App drawer columns Row height Horizontal padding diff --git a/lawnchair/res/values-de-rDE/strings.xml b/lawnchair/res/values-de-rDE/strings.xml index edf9611cdf..d06815a704 100644 --- a/lawnchair/res/values-de-rDE/strings.xml +++ b/lawnchair/res/values-de-rDE/strings.xml @@ -225,7 +225,7 @@ Vierseitiges Cookie Siebseitiges Cookie - Arch + Bogen Eigene Symbolform Eigene Symbolform erstellen @@ -646,32 +646,32 @@ Benachrichtigungszugriff erforderlich Um Benachrichtigungspunkte anzuzeigen, aktiviere App-Benachrichtigungen fÃŧr %1$s Kontakte-Berechtigung erforderlich - To search for contacts, grant contacts and phone permissions to %1$s + Um nach Kontakten zu suchen, erteile %1$s Berechtigungen fÃŧr Kontakte und Telefon Musik- und Audio-Berechtigung erforderlich - To search your music and other audio files, %1$s needs permission to access your media library. + Um Musik und andere Audiodateien durchsuchen zu kÃļnnen, benÃļtigt %1$s die Berechtigung, auf Deine Medienbibliothek zuzugreifen. Foto- und Videozugriff benÃļtigt - To search your photos and videos, %1$s needs permission to access your media library. + Zum Durchsuchen Deiner Fotos und Videos benÃļtigt %1$s die Erlaubnis, auf Deine Medienbibliothek zuzugreifen. Auf Deine vollständige Medienbibliothek zugreifen? - To search all your photos and videos, %1$s needs full access to your media library. + Zum Durchsuchen aller Fotos und Videos benÃļtigt %1$s die Erlaubnis, auf Deine Medienbibliothek zuzugreifen. Vollständige Medienberechtigungen gewähren Gewählte Elemente verwalten Externe Speicher-Berechtigung erforderlich - To search your files, %1$s needs permission to access your device\'s external storage. + Um Deine Dateien durchsuchen zu kÃļnnen, benÃļtigt %1$s die Erlaubnis, auf den externen Speicher Deines Geräts zuzugreifen. Speicherzugriff verwalten erforderlich - To display your files in search results, %1$s requires permission to manage all files on your device. This permission is used solely to list files and will not be used to read or change the content of your personal files. - To display wallpaper previews and include them in backups, %1$s requires permission %2$s. This is due to system limitations for accessing wallpaper data. - to read all files on your device - to manage all files on your device - Multiple permissions needed - To display wallpaper previews and include them in backups, %1$s requires the following permissions. This is due to system limitations for accessing wallpaper data. - Manage all files on device - Read photos and videos + Um Deine Dateien in Suchergebnissen anzuzeigen, benÃļtigt %1$s die Erlaubnis, alle Dateien auf Deinem Gerät zu verwalten. Diese Berechtigung wird ausschließlich zur Anzeige von Dateien verwendet und nicht zum Lesen oder Ändern des Inhalts Deiner persÃļnlichen Dateien. + Um Vorschauen fÃŧr Hintergrundbilder anzuzeigen und sie in Backups einzubinden, benÃļtigt %1$s die Berechtigung %2$s. Dies liegt an Systembeschränkungen fÃŧr den Zugriff auf Hintergrunddaten. + um alle Dateien auf Deinem Gerät zu lesen + um alle Dateien auf Deinem Gerät zu verwalten + Mehrere Berechtigungen erforderlich + Um Vorschauen fÃŧr Hintergrundbilder anzuzeigen und sie in Backups einzubinden, benÃļtigt %1$s folgende Berechtigungen. Dies liegt an Systembeschränkungen fÃŧr den Zugriff auf Hintergrunddaten. + Alle Dateien auf dem Gerät verwalten + Fotos und Videos lesen Kann Berechtigung zur Speicherverwaltung nicht aktivieren - Due to Play Store policy, %1$s cannot request full storage access here. To access all files, please download %1$s from GitHub. Alternatively, you can grant access to photos, videos, and audio files individually in settings. + Aufgrund der Play-Store-Richtlinien kann %1$s hier keinen vollständigen Speicherzugriff anfordern. Um auf alle Dateien zuzugreifen, lade %1$s von GitHub herunter. Alternativ kannst Du den Zugriff auf Fotos, Videos und Audiodateien in den Einstellungen einzeln erlauben. Einstellungen Ãļffnen Berechtigungen erteilen Berechtigung benÃļtigt - Tap to grant permissions + Tippen um Berechtigungen zu erteilen diff --git a/lawnchair/res/values-es-rES/strings.xml b/lawnchair/res/values-es-rES/strings.xml index c97f5bf67a..5ba2838ce7 100644 --- a/lawnchair/res/values-es-rES/strings.xml +++ b/lawnchair/res/values-es-rES/strings.xml @@ -49,18 +49,18 @@ ÂĄTienes la Ãēltima versiÃŗn! Actualizaciones - Failed to load changes + Error al cargar cambios No se encontraron cambios - Build #%1$d → #%2$d - by %1$s â€ĸ %2$s â€ĸ %3$s + Compilar #%1$d → #%2$d + por %1$s â€ĸ %2$s â€ĸ %3$s justo ahora - %dm + %dmin %dh %dd - %dw - %dmo - %dy + %ds + %dmes + %daÃąo Gestionado por Lawnchair Preferencias @@ -91,7 +91,7 @@ Fondo de pantalla Estilo Opacidad del fondo - Separated Search bar background + Fondo separado de la barra de bÃēsqueda Copiado al portapapeles Resultado copiado al portapapeles @@ -466,7 +466,7 @@ Evita cambiar sin querer la disposiciÃŗn de la pantalla de inicio Mostrar paginaciÃŗn de puntos Usar puntos en vez de líneas para mostrar el nÃēmero de pÃĄgina - Usar el nuevo estilo del menÃē emergente + Usar nuevo estilo de ventana emergente Usar el estilo de ÂĢMaterial YouÂģ animado y minimalista para los menÃēs emergentes MenÃē emergente Elementos del menÃē emergente @@ -609,9 +609,9 @@ BÃēsqueda global (a travÊs de ASI) Nombre del buscador URL del buscador - Search suggestions URL + URL de sugerencias de bÃēsqueda %s se reemplazarÃĄ con la consulta de bÃēsqueda - %s will be replaced with the search query. Results must be in JSON OpenSearch format. + %s se reemplazarÃĄ con tu bÃēsqueda. Los resultados deben estar en formato JSON OpenSearch. Mostrar en los resultados de bÃēsqueda Aplicaciones y accesos directos @@ -649,30 +649,30 @@ El permiso CONTACTOS es necesario Para buscar contactos, debes otorgar el permiso CONTACTOS Y TELÉFONO a %1$s Se necesita acceso a mÃēsica y audio - To search your music and other audio files, %1$s needs permission to access your media library. + Para buscar su mÃēsica y otros archivos de audio, %1$s necesita permiso para acceder a su biblioteca de medios. - Photos and videos access needed - To search your photos and videos, %1$s needs permission to access your media library. - Access your full media library? - To search all your photos and videos, %1$s needs full access to your media library. - Grant full media permissions - Manage selected items + Acceso de fotos y videos necesario + Para buscar tus fotos y videos, %1$s necesita permiso para acceder a tu biblioteca de medios. + ÂŋAcceder a toda tu biblioteca multimedia? + Para buscar en todas tus fotos y videos, %1$s necesita acceso completo a tu biblioteca de medios. + Otorgar permisos completos de medios + Gestionar elementos seleccionados - External storage access needed - To search your files, %1$s needs permission to access your device\'s external storage. - Manage storage access needed - To display your files in search results, %1$s requires permission to manage all files on your device. This permission is used solely to list files and will not be used to read or change the content of your personal files. - To display wallpaper previews and include them in backups, %1$s requires permission %2$s. This is due to system limitations for accessing wallpaper data. - to read all files on your device - to manage all files on your device - Multiple permissions needed - To display wallpaper previews and include them in backups, %1$s requires the following permissions. This is due to system limitations for accessing wallpaper data. - Manage all files on device - Read photos and videos - Cannot enable manage storage access - Due to Play Store policy, %1$s cannot request full storage access here. To access all files, please download %1$s from GitHub. Alternatively, you can grant access to photos, videos, and audio files individually in settings. + Acceso de almacenamiento externo necesario + Para buscar en tus archivos, %1$s necesita permiso para acceder al almacenamiento externo del dispositivo. + Permiso para gestionar mantenimiento necesario + Para mostrar tus archivos en los resultados de bÃēsqueda, %1$s requiere permiso para administrar todos los archivos de tu dispositivo. Este permiso se utiliza Ãēnicamente para listar archivos y no se utilizarÃĄ para leer o cambiar el contenido de sus archivos personales. + Para mostrar las vistas previas del fondo de pantalla e incluirlas en las copias de seguridad, %1$s requiere permiso %2$s. Esto se debe a limitaciones del sistema para acceder a los datos de fondos de pantalla. + para leer todos los archivos de tu dispositivo + para administrar todos los archivos en tu dispositivo + Se necesitan varios permisos + Para mostrar las vistas previas del fondo de pantalla e incluirlas en las copias de seguridad, %1$s requiere los siguientes permisos. Esto se debe a limitaciones del sistema para acceder a los datos de fondos de pantalla. + Administrar todos los archivos del dispositivo + Leer fotos y videos + No se puede habilitar la gestiÃŗn de acceso de almacenamiento + Debido a la política de Play Store, %1$s no puede solicitar acceso completo de almacenamiento aquí. Para acceder a todos los archivos, descargue %1$s de GitHub. Alternativamente, puede permitir el acceso a fotos, vídeos y archivos de audio individualmente en ajustes. Abrir ajustes Conceder permisos - Permissions needed - Tap to grant permissions + Se necesitan permisos + Pulse para conceder permisos diff --git a/lawnchair/res/values-ko-rKR/strings.xml b/lawnchair/res/values-ko-rKR/strings.xml index 0f44cc7c19..64b7663025 100644 --- a/lawnchair/res/values-ko-rKR/strings.xml +++ b/lawnchair/res/values-ko-rKR/strings.xml @@ -115,7 +115,7 @@ 뤑ëŗĩ ė•ą 눍揰揰 내 폴더 - íŠšė • ė•Ąė…˜ë“¤(íœ´ëŒ€ė „í™” ėž ęˇ¸ę¸° ę°™ė€ ė•Ąė…˜)ė„ ė œėŠ¤ė˛˜ëĄœ ë°œë™ė‹œí‚¤ë ¤ëŠ´, Lawnchair가 ė ‘ęˇŧė„ą 기ëŠĨ뗐 ė ‘ęˇŧ해ė•ŧ 합니다. \n\nLawnchair는 ė ‘ęˇŧė„ą 기ëŠĨė„ í•„ėš”ëĄœ í•˜ė§€ë§Œ ė‚ŦėšŠėžė˜ í™œë™ė„ ę°ė‹œí•˜ė§€ ė•Šėœŧ늰, ė‹œėŠ¤í…œė—ė„œ ë°œė†Ąëœ ëĒ¨ë“  ė´ë˛¤íŠ¸ëŠ” ė‚­ė œëŠë‹ˆë‹¤. \n\nLawnchair는 íœ´ëŒ€ė „í™”ëĨŧ ėž ęˇ¸ęą°ë‚˜ ėĩœęˇŧ ė•ąė„ ëŗ´ę¸° ėœ„í•´ė„œ GlobalActionAccessbility ė„œëš„ėŠ¤ëĨŧ ė‚ŦėšŠí•Šë‹ˆë‹¤. + íŠšė • ė•Ąė…˜ë“¤(íœ´ëŒ€ė „í™” ėž ęˇ¸ę¸° ę°™ė€ ė•Ąė…˜)ė„ ė œėŠ¤ė˛˜ëĄœ ėž‘ë™ė‹œí‚¤ë ¤ëŠ´, Lawnchair가 ė ‘ęˇŧė„ą 기ëŠĨ뗐 ė ‘ęˇŧ해ė•ŧ 합니다. \n\nLawnchair는 ė ‘ęˇŧė„ą 기ëŠĨė„ í•„ėš”ëĄœ í•˜ė§€ë§Œ ė‚ŦėšŠėžė˜ í™œë™ė„ ę°ė‹œí•˜ė§€ ė•Šėœŧ늰, ė‹œėŠ¤í…œė—ė„œ ë°œė†Ąëœ ëĒ¨ë“  ė´ë˛¤íŠ¸ëŠ” ė‚­ė œëŠë‹ˆë‹¤. \n\nLawnchair는 íœ´ëŒ€ė „í™”ëĨŧ ėž ęˇ¸ęą°ë‚˜ ėĩœęˇŧ ė•ąė„ ëŗ´ę¸° ėœ„í•´ė„œ GlobalActionAccessbility ė„œëš„ėŠ¤ëĨŧ ė‚ŦėšŠí•Šë‹ˆë‹¤. %1$s (%2$d) %1$d x %2$d %1$s & %2$s @@ -158,7 +158,7 @@ ė•„ė´ėŊ˜ ėŠ¤ė™€ė´í”„ 렜늤래 홈 í™”ëŠ´ė„ ė›€ė§ė´ëŠ” ëŒ€ė‹  ė•„ė´ėŊ˜ė„ ė™ŧėĒŊė´ë‚˜ 똤ëĨ¸ėĒŊėœŧ로 ėŠ¤ė™€ė´í”„ 할때 ė•Ąė…˜ė„ ė‹¤í–‰í•Šë‹ˆë‹¤ 독 ë ˆė´ė•„ė›ƒ - ė•ą ė„œëžė„ 가ëĻŦęŗ  홈 í™”ëŠ´ė— 냈 ė•ąė„ ėžë™ėœŧ로 ėļ”ę°€í•˜ëŠ” ë ˆė´ė•„ė›ƒ ė˜ĩė…˜ė„ ëŗ´ėž…ë‹ˆë‹¤ + ė•ą ė„œëžė„ 가ëĻŦęŗ  홈 í™”ëŠ´ė— 냈 ė•ąė„ ėžë™ėœŧ로 ėļ”ę°€í•˜ëŠ” ë ˆė´ė•„ė›ƒ ė˜ĩė…˜ė„ í‘œė‹œí•Šë‹ˆë‹¤ ėž ę¸ˆ/ėž ę¸ˆ í•´ė œ \"ëĒ¨ë‘ ė§€ėš°ę¸°\" ė‚ŦėšŠ ė‹œ ė„ íƒí•œ ė•ąė´ ė§€ė›Œė§€ė§€ ė•Šë„ëĄ ë°Šė§€ diff --git a/lawnchair/res/values-no-rNO/strings.xml b/lawnchair/res/values-no-rNO/strings.xml index f549e38e51..6553d58376 100644 --- a/lawnchair/res/values-no-rNO/strings.xml +++ b/lawnchair/res/values-no-rNO/strings.xml @@ -421,7 +421,7 @@ SlÃĨ pÃĨ tilgjengelighetsservice For ÃĨ bruke dobbelt-tapping for ÃĨ sove, slÃĨ pÃĨ tilgjengelighetstjenesten for Lawnchair. Trykk pÃĨ \"Åpne innstillinger\", velg \"Lawnchair\" og slÃĨ pÃĨ \"Bruk Lawnchair.\" \n\nLawnchair bruker tilgjengelighets \'performGlobalAction\'-metode for ÃĨ utføre denne handlingen. Dette er en sensitiv tillatelse som gjør det mulig ÃĨ overvÃĨke andre apper. Lawnchair er imidlertid ikke konfigurert for denne funksjonaliteten og mottar ingen hendelser. Åpne instillinger - + To use Open Recents screen, turn on the Lawnchair accessibility service. Tap \"Open settings\", select \"Lawnchair\" and turn on \"Use Lawnchair.\"\n\nLawnchair uses Accessibility\'s `performGlobalAction` method to perform this action. This is a sensitive permission that allows monitoring other apps. However, Lawnchair is not configured for that functionality and receives no events. Copiado para a ÃĄrea de transferÃĒncia Resultado copiado para a ÃĄrea de transferÃĒncia @@ -609,7 +609,7 @@ Pesquisa global (via ASI) Nome do provedor de pesquisa URL do provedor de pesquisa - Search suggestions URL + SugestÃĩes de busca URL %s serÃĄ trocada pelo termo de pesquisa %s serÃĄ substituído pela consulta de pesquisa. Os resultados precisam estar em formato JSON OpenSearch. diff --git a/lawnchair/res/values-tr-rTR/strings.xml b/lawnchair/res/values-tr-rTR/strings.xml index 511f80727e..135961d3a3 100644 --- a/lawnchair/res/values-tr-rTR/strings.xml +++ b/lawnchair/res/values-tr-rTR/strings.xml @@ -91,7 +91,7 @@ Duvar KağıdÄą Stil Arka plan opaklığı - Separated Search bar background + AyrÄąlmÄąÅŸ Arama çubuğu arka planÄą Panoya kaydedildi Sonuç panoya kopyalandÄą @@ -609,7 +609,7 @@ Genel arama (ASI aracÄąlığıyla) Makine ismi aratÄąn Makine URL\'si aratÄąn - Search suggestions URL + Arama Ãļnerisi URL\'si % arama sorgusu ile değiştirilecek % arama sorgusu ile değiştirilecek. Sonuçlar JSON OpenSearch biçiminde olmalÄą. diff --git a/lawnchair/src/app/lawnchair/BlankActivity.kt b/lawnchair/src/app/lawnchair/BlankActivity.kt index 8138f27115..4a5de49897 100644 --- a/lawnchair/src/app/lawnchair/BlankActivity.kt +++ b/lawnchair/src/app/lawnchair/BlankActivity.kt @@ -105,6 +105,7 @@ class BlankActivity : ComponentActivity() { }.launch(requireNotNull(intent.getParcelableExtra("intent"))) } } + else -> { finish() return diff --git a/lawnchair/src/app/lawnchair/FeedBridge.kt b/lawnchair/src/app/lawnchair/FeedBridge.kt index f722409551..f6ff2a89a9 100644 --- a/lawnchair/src/app/lawnchair/FeedBridge.kt +++ b/lawnchair/src/app/lawnchair/FeedBridge.kt @@ -108,6 +108,7 @@ class FeedBridge(private val context: Context) { open fun isSigned(): Boolean { when { BuildConfig.DEBUG -> return true + Utilities.ATLEAST_P -> { val info = context.packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNING_CERTIFICATES) @@ -115,6 +116,7 @@ class FeedBridge(private val context: Context) { if (signingInfo!!.hasMultipleSigners()) return false return signingInfo.signingCertificateHistory.any { it.hashCode() == signatureHash } } + else -> { val info = context.packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES) return if (info.signatures!!.any { it.hashCode() != signatureHash }) false else info.signatures!!.isNotEmpty() diff --git a/lawnchair/src/app/lawnchair/LawnchairLauncher.kt b/lawnchair/src/app/lawnchair/LawnchairLauncher.kt index 1d080d19fe..e3da079af1 100644 --- a/lawnchair/src/app/lawnchair/LawnchairLauncher.kt +++ b/lawnchair/src/app/lawnchair/LawnchairLauncher.kt @@ -129,6 +129,7 @@ class LawnchairLauncher : QuickstepLauncher() { -> { LawnchairApp.instance.restoreClockInStatusBar() } + else -> { workspace.updateStatusbarClock() } @@ -473,6 +474,7 @@ class LawnchairLauncher : QuickstepLauncher() { private fun restartIfPending() { when { sRestartFlags and FLAG_RESTART != 0 -> lawnchairApp.restart(false) + sRestartFlags and FLAG_RECREATE != 0 -> { sRestartFlags = 0 recreate() diff --git a/lawnchair/src/app/lawnchair/allapps/views/SearchResultIcon.kt b/lawnchair/src/app/lawnchair/allapps/views/SearchResultIcon.kt index c63041c8b3..d7691fcc43 100644 --- a/lawnchair/src/app/lawnchair/allapps/views/SearchResultIcon.kt +++ b/lawnchair/src/app/lawnchair/allapps/views/SearchResultIcon.kt @@ -80,10 +80,12 @@ class SearchResultIcon(context: Context, attrs: AttributeSet?) : allowLongClick = false bindFromAction(target, iconComponentKey == null) } + target.shortcutInfo != null -> { allowLongClick = true bindFromShortcutInfo(target.shortcutInfo) } + else -> { allowLongClick = true val className = extras.getString("class").orEmpty() @@ -208,7 +210,9 @@ class SearchResultIcon(context: Context, attrs: AttributeSet?) : info.bitmap = when { info.hasFlags(SearchActionItemInfo.FLAG_PRIMARY_ICON_FROM_TITLE) -> li.createIconBitmap("${info.title}", packageIcon.color) + icon == null -> packageIcon + else -> icon.loadDrawable(context)?.let { li.createBadgedIconBitmap(it, BaseIconFactory.IconOptions().setUser(info.user)) } ?: packageIcon } if (info.hasFlags(SearchActionItemInfo.FLAG_BADGE_WITH_COMPONENT_NAME) && target.extras.containsKey("class")) { diff --git a/lawnchair/src/app/lawnchair/animation/PhysicsAnimator.kt b/lawnchair/src/app/lawnchair/animation/PhysicsAnimator.kt index 828a536382..9bcf079393 100644 --- a/lawnchair/src/app/lawnchair/animation/PhysicsAnimator.kt +++ b/lawnchair/src/app/lawnchair/animation/PhysicsAnimator.kt @@ -368,8 +368,10 @@ class PhysicsAnimator private constructor(target: T) { flingConfigCopy.startVelocity = when { distanceToDestination > 0f && startVelocity >= 0f -> max(velocityToReachDestination, startVelocity) + distanceToDestination < 0f && startVelocity <= 0f -> min(velocityToReachDestination, startVelocity) + else -> startVelocity } diff --git a/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt b/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt index 75ac6b9369..ac12eff170 100644 --- a/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt +++ b/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt @@ -90,11 +90,13 @@ fun RestoreBackupScreen( ) { when (uiState) { is RestoreBackupUiState.Success -> RestoreBackupOptions(isPortrait, uiState.backup) + is RestoreBackupUiState.Loading -> { Box(modifier = Modifier.fillMaxSize()) { CircularProgressIndicator(modifier = Modifier.align(Alignment.Center)) } } + is RestoreBackupUiState.Error -> { val context = LocalContext.current val backDispatcher = LocalOnBackPressedDispatcherOwner.current?.onBackPressedDispatcher diff --git a/lawnchair/src/app/lawnchair/deck/LawndeckManager.kt b/lawnchair/src/app/lawnchair/deck/LawndeckManager.kt index f6e3e43b21..d7a7c74c3f 100644 --- a/lawnchair/src/app/lawnchair/deck/LawndeckManager.kt +++ b/lawnchair/src/app/lawnchair/deck/LawndeckManager.kt @@ -3,15 +3,23 @@ package app.lawnchair.deck import android.content.Context import android.util.Log import app.lawnchair.LawnchairLauncher +import app.lawnchair.flowerpot.Flowerpot import app.lawnchair.launcher import app.lawnchair.launcherNullable import app.lawnchair.util.restartLauncher import com.android.launcher3.InvariantDeviceProfile +import com.android.launcher3.LauncherAppState +import com.android.launcher3.LauncherSettings import com.android.launcher3.model.ItemInstallQueue import com.android.launcher3.model.ModelDbController +import com.android.launcher3.model.data.AppInfo +import com.android.launcher3.model.data.FolderInfo +import com.android.launcher3.model.data.WorkspaceItemInfo import com.android.launcher3.provider.RestoreDbTask +import com.android.launcher3.util.ComponentKey import java.io.File import java.util.Locale +import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -21,13 +29,24 @@ class LawndeckManager(private val context: Context) { private val launcher = context.launcherNullable ?: LawnchairLauncher.instance?.launcher - suspend fun enableLawndeck() = withContext(Dispatchers.IO) { + suspend fun enableLawndeck( + onProgress: ((String) -> Unit)? = null, + ) = withContext(Dispatchers.IO) { + val completionDeferred = CompletableDeferred() + if (!backupExists("bk")) createBackup("bk") if (backupExists("lawndeck")) { + onProgress?.invoke("Restoring previous layout...") restoreBackup("lawndeck") + completionDeferred.complete(Unit) } else { - addAllAppsToWorkspace() + onProgress?.invoke("Categorizing apps...") + addAllAppsToWorkspace(onProgress) { + completionDeferred.complete(Unit) + } } + + completionDeferred.await() } suspend fun disableLawndeck() = withContext(Dispatchers.IO) { @@ -70,12 +89,171 @@ class LawndeckManager(private val context: Context) { restartLauncher(context) } - private fun addAllAppsToWorkspace() { - launcher?.mAppsView?.appsStore?.apps - ?.sortedBy { it.title?.toString()?.lowercase(Locale.getDefault()) } - ?.forEach { app -> + private fun addAllAppsToWorkspace( + onProgress: ((String) -> Unit)?, + onComplete: (() -> Unit)?, + ) { + val apps = launcher?.mAppsView?.appsStore?.apps ?: return + if (apps.isEmpty()) { + onComplete?.invoke() + return + } + + onProgress?.invoke("Categorizing apps...") + + // Use flowerpot to categorize apps + val potsManager = Flowerpot.Manager.getInstance(context) + val categorizedApps = potsManager.categorizeApps(apps.map { it as? AppInfo }) + + onProgress?.invoke("Adding apps to workspace...") + + val launcher = this.launcher ?: return + val model = launcher.model + + // Collect folders to add and count single apps + val foldersToAdd = mutableListOf() + var singleAppCount = 0 + + // Process each category + categorizedApps.forEach { (category, categoryApps) -> + if (categoryApps.isEmpty()) return@forEach + + if (categoryApps.size == 1) { + // Single app - add directly to workspace + val app = categoryApps.first() ItemInstallQueue.INSTANCE.get(context).queueItem(app.targetPackage, app.user) + singleAppCount++ + } else { + // Multiple apps - create folder + onProgress?.invoke("Creating folder: $category...") + val folderInfo = createFolderInfo(category, categoryApps) + if (folderInfo != null) { + foldersToAdd.add(folderInfo) + } } + } + + // Add all folders with their items to workspace using custom task + if (foldersToAdd.isNotEmpty()) { + // Wait for folder task to complete + model.enqueueModelUpdateTask( + AddFoldersWithItemsTask(foldersToAdd) { + // Callback runs on UI thread from model task + // Also wait for ItemInstallQueue to finish for single apps + // ItemInstallQueue processes asynchronously, so we need to wait a bit + if (singleAppCount > 0) { + // Post to handler to give ItemInstallQueue time to process + android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({ + onComplete?.invoke() + }, 800) // Wait for queue to process + } else { + onComplete?.invoke() + } + }, + ) + } else { + // No folders, but may have single apps + if (singleAppCount > 0) { + // Give ItemInstallQueue time to process + android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({ + onComplete?.invoke() + }, 800) // Wait for queue to process + } else { + onComplete?.invoke() + } + } + } + + /** + * Adds a newly installed app to the workspace with proper categorization. + * This is called when a new app is installed and deck layout is enabled. + * + * @param packageName The package name of the newly installed app + * @param user The user handle for the app + * @param modelWriter The ModelWriter to use for database operations (must be called from model thread) + * @param dataModel The BgDataModel to search for existing folders + */ + fun addNewlyInstalledApp( + packageName: String, + user: android.os.UserHandle, + modelWriter: com.android.launcher3.model.ModelWriter, + dataModel: com.android.launcher3.model.BgDataModel, + ) { + // Get app info from LauncherApps directly (app might not be in all apps list yet) + val launcherApps = context.getSystemService(android.content.pm.LauncherApps::class.java) + ?: return + val activities = launcherApps.getActivityList(packageName, user) + if (activities.isEmpty()) return + + val activityInfo = activities[0] + val appInfo = AppInfo(context, activityInfo, user) + + // Use flowerpot to categorize the app + val potsManager = Flowerpot.Manager.getInstance(context) + val categorizedApps = potsManager.categorizeApps(listOf(appInfo)) + + if (categorizedApps.isEmpty()) { + // No category found, add directly to workspace + ItemInstallQueue.INSTANCE.get(context).queueItem(packageName, user) + return + } + + // Get the category for this app (categorizedApps is a Map>) + val categoryEntry = categorizedApps.entries.firstOrNull() ?: run { + ItemInstallQueue.INSTANCE.get(context).queueItem(packageName, user) + return + } + val category = categoryEntry.key + + // Check if there's already a folder for this category on workspace + val existingFolder = findFolderByCategory(category, dataModel) + + if (existingFolder != null) { + // Add app to existing folder + val workspaceItem = appInfo.makeWorkspaceItem(context) ?: return + existingFolder.add(workspaceItem) + // Update folder in database + modelWriter.addOrMoveItemInDatabase( + workspaceItem, + existingFolder.id, + 0, + existingFolder.getContents().size % 4, + existingFolder.getContents().size / 4, + ) + } else { + // Single app in category, add directly to workspace + // The app will be categorized properly when added + ItemInstallQueue.INSTANCE.get(context).queueItem(packageName, user) + } + } + + private fun findFolderByCategory(category: String, dataModel: com.android.launcher3.model.BgDataModel): FolderInfo? { + // Search through workspace items to find folder with matching category name + synchronized(dataModel) { + dataModel.itemsIdMap.forEach { item -> + if (item is FolderInfo && item.title?.toString() == category) { + return item + } + } + } + return null + } + + private fun createFolderInfo(categoryName: String, apps: List): FolderInfo? { + if (apps.isEmpty()) return null + + val folderInfo = FolderInfo().apply { + title = categoryName + } + + // Create workspace items for each app and add to folder + apps.forEach { app -> + val workspaceItem = app.makeWorkspaceItem(context) ?: return@forEach + folderInfo.add(workspaceItem) + } + + // Only return folder if it has items + return if (folderInfo.getContents().isNotEmpty()) folderInfo else null } private data class DatabaseFiles( diff --git a/lawnchair/src/app/lawnchair/flowerpot/Flowerpot.kt b/lawnchair/src/app/lawnchair/flowerpot/Flowerpot.kt index 1bdc5d2537..0bad9d5943 100644 --- a/lawnchair/src/app/lawnchair/flowerpot/Flowerpot.kt +++ b/lawnchair/src/app/lawnchair/flowerpot/Flowerpot.kt @@ -152,12 +152,24 @@ class Flowerpot(private val context: Context, val name: String, private val load fun categorizeApps(appList: List?): Map> { val categorizedApps = mutableMapOf>() + val categorizedAppKeys = mutableSetOf() + val validAppList = appList?.filterNotNull() ?: emptyList() + pots.values.forEach { pot -> - val potCategories = pot.categorizeApps(appList) - potCategories.forEach { (category, apps) -> - categorizedApps.getOrPut(category) { mutableListOf() }.addAll(apps) + pot.categorizeApps(appList).forEach { (category, apps) -> + apps.forEach { app -> + app.toComponentKey().toString().takeIf { it !in categorizedAppKeys }?.let { key -> + categorizedApps.getOrPut(category) { mutableListOf() }.add(app) + categorizedAppKeys.add(key) + } + } } } + + validAppList.filter { it.toComponentKey().toString() !in categorizedAppKeys } + .takeIf { it.isNotEmpty() } + ?.let { categorizedApps["Other"] = it.toMutableList() } + return categorizedApps.toSortedMap() } diff --git a/lawnchair/src/app/lawnchair/flowerpot/FlowerpotApps.kt b/lawnchair/src/app/lawnchair/flowerpot/FlowerpotApps.kt index 08489014df..e79a5cf308 100644 --- a/lawnchair/src/app/lawnchair/flowerpot/FlowerpotApps.kt +++ b/lawnchair/src/app/lawnchair/flowerpot/FlowerpotApps.kt @@ -19,15 +19,19 @@ package app.lawnchair.flowerpot import android.content.Context import android.content.Intent +import android.content.pm.ApplicationInfo +import app.lawnchair.flowerpot.rules.CodeRules import app.lawnchair.flowerpot.rules.Rules import com.android.launcher3.model.data.AppInfo class FlowerpotApps(private val context: Context, private val pot: Flowerpot) { private val intentMatches = mutableSetOf() + private val codeRules = mutableListOf() val categorizedApps = mutableMapOf>() init { populateIntentMatches() + populateCodeRules() } fun updateAppList(appList: List?) { @@ -41,7 +45,7 @@ class FlowerpotApps(private val context: Context, private val pot: Flowerpot) { .toMap() val validPackages = appInfoMap.keys.filter { packageName -> - packageName in intentMatches || pot.rules.contains(Rules.Package(packageName)) + matchesRules(packageName, appInfoMap[packageName]!!) } validPackages.forEach { packageName -> @@ -50,6 +54,11 @@ class FlowerpotApps(private val context: Context, private val pot: Flowerpot) { } } + private fun matchesRules(packageName: String, appInfo: AppInfo): Boolean = packageName in intentMatches || pot.rules.contains(Rules.Package(packageName)) || + codeRules.isNotEmpty() && runCatching { + codeRules.any { it.matches(context.packageManager.getApplicationInfo(packageName, 0)) } + }.getOrDefault(false) + private fun populateIntentMatches() { intentMatches.clear() @@ -64,4 +73,11 @@ class FlowerpotApps(private val context: Context, private val pot: Flowerpot) { .mapNotNullTo(intentMatches) { it.activityInfo?.packageName } } } + + private fun populateCodeRules() { + codeRules.clear() + pot.rules.filterIsInstance() + .mapNotNull { runCatching { CodeRules.get(it.rule, *it.args) }.getOrNull() } + .forEach { codeRules.add(it) } + } } diff --git a/lawnchair/src/app/lawnchair/flowerpot/parser/LineParser.kt b/lawnchair/src/app/lawnchair/flowerpot/parser/LineParser.kt index 4a4057dd04..acb2382cf1 100644 --- a/lawnchair/src/app/lawnchair/flowerpot/parser/LineParser.kt +++ b/lawnchair/src/app/lawnchair/flowerpot/parser/LineParser.kt @@ -29,12 +29,16 @@ object LineParser { return when (line[0]) { // Comment '#' -> Rules.NONE + // Version declaration '$' -> Rules.Version(line.rest.toInt()) + // Intent action ':' -> Rules.IntentAction(line.rest) + // Intent category ';' -> Rules.IntentCategory(line.rest) + // Code rule '&' -> { val parts = line.rest.split("|") @@ -42,6 +46,7 @@ object LineParser { val args = if (parts.size > 1) parts.subList(1, parts.size) else emptyList() Rules.CodeRule(ruleName, args.toTypedArray()) } + // Package else -> if (!line[0].isLetter()) { throw FlowerpotFormatException("Unknown rule identifier '${line[0]}' for version $version") diff --git a/lawnchair/src/app/lawnchair/gestures/DirectionalGestureListener.kt b/lawnchair/src/app/lawnchair/gestures/DirectionalGestureListener.kt index 94eb65ddad..4a01c8daf9 100644 --- a/lawnchair/src/app/lawnchair/gestures/DirectionalGestureListener.kt +++ b/lawnchair/src/app/lawnchair/gestures/DirectionalGestureListener.kt @@ -49,6 +49,7 @@ abstract class DirectionalGestureListener(ctx: Context?) : OnTouchListener { } true } + shouldReactToSwipe(diffX, velocityX) -> { if (diffX > 0) { Log.d("GESTURE_DETECTION", "Swipe Right Detected") @@ -59,6 +60,7 @@ abstract class DirectionalGestureListener(ctx: Context?) : OnTouchListener { } true } + else -> false } } diff --git a/lawnchair/src/app/lawnchair/gestures/handlers/OpenAppGestureHandler.kt b/lawnchair/src/app/lawnchair/gestures/handlers/OpenAppGestureHandler.kt index 9a2dfda3c0..2caaed1090 100644 --- a/lawnchair/src/app/lawnchair/gestures/handlers/OpenAppGestureHandler.kt +++ b/lawnchair/src/app/lawnchair/gestures/handlers/OpenAppGestureHandler.kt @@ -29,6 +29,7 @@ class OpenAppGestureHandler( null, ) } + is OpenAppTarget.Shortcut -> Unit } } diff --git a/lawnchair/src/app/lawnchair/icons/CustomIconPack.kt b/lawnchair/src/app/lawnchair/icons/CustomIconPack.kt index 7e5bd76fd4..327fa8ca66 100644 --- a/lawnchair/src/app/lawnchair/icons/CustomIconPack.kt +++ b/lawnchair/src/app/lawnchair/icons/CustomIconPack.kt @@ -95,6 +95,7 @@ class CustomIconPack(context: Context, packPackageName: String) : IconPack(conte } } } + "dynamic-clock" -> { val drawableName = parseXml["drawable"] if (drawableName != null) { @@ -154,6 +155,7 @@ class CustomIconPack(context: Context, packPackageName: String) : IconPack(conte endCategory() currentTitle = title } + "item" -> { val drawableName = parser["drawable"] ?: continue val resId = getDrawableId(drawableName) diff --git a/lawnchair/src/app/lawnchair/icons/LawnchairIconProvider.kt b/lawnchair/src/app/lawnchair/icons/LawnchairIconProvider.kt index af7a949750..c42149cc3f 100644 --- a/lawnchair/src/app/lawnchair/icons/LawnchairIconProvider.kt +++ b/lawnchair/src/app/lawnchair/icons/LawnchairIconProvider.kt @@ -288,6 +288,7 @@ class LawnchairIconProvider @JvmOverloads constructor( } } } + ACTION_DATE_CHANGED -> { context.getSystemService()?.userProfiles?.forEach { user -> iconPack.getCalendars().forEach { componentName -> diff --git a/lawnchair/src/app/lawnchair/preferences2/SharedPreferencesMigration.kt b/lawnchair/src/app/lawnchair/preferences2/SharedPreferencesMigration.kt index 7e9d3312c3..0767d1ab9d 100644 --- a/lawnchair/src/app/lawnchair/preferences2/SharedPreferencesMigration.kt +++ b/lawnchair/src/app/lawnchair/preferences2/SharedPreferencesMigration.kt @@ -73,10 +73,15 @@ class SharedPreferencesMigration(private val context: Context) { val newKey = keys[key] ?: key when (value) { is Boolean -> mutablePreferences[booleanPreferencesKey(newKey)] = value + is Float -> mutablePreferences[floatPreferencesKey(newKey)] = value + is Int -> mutablePreferences[intPreferencesKey(newKey)] = value + is Long -> mutablePreferences[longPreferencesKey(newKey)] = value + is String -> mutablePreferences[stringPreferencesKey(newKey)] = value + is Set<*> -> { mutablePreferences[stringSetPreferencesKey(newKey)] = value as Set } diff --git a/lawnchair/src/app/lawnchair/search/adapter/SearchTargetFactory.kt b/lawnchair/src/app/lawnchair/search/adapter/SearchTargetFactory.kt index 0bfd357bfc..bab72d47b7 100644 --- a/lawnchair/src/app/lawnchair/search/adapter/SearchTargetFactory.kt +++ b/lawnchair/src/app/lawnchair/search/adapter/SearchTargetFactory.kt @@ -294,6 +294,7 @@ class SearchTargetFactory( MediaStore.Files.getContentUri("external"), info.fileId, ) + is FolderInfo -> File(info.path).file2Uri() } diff --git a/lawnchair/src/app/lawnchair/search/algorithms/LawnchairSearchAlgorithm.kt b/lawnchair/src/app/lawnchair/search/algorithms/LawnchairSearchAlgorithm.kt index 9c334ab93f..82cbe113f9 100644 --- a/lawnchair/src/app/lawnchair/search/algorithms/LawnchairSearchAlgorithm.kt +++ b/lawnchair/src/app/lawnchair/search/algorithms/LawnchairSearchAlgorithm.kt @@ -226,6 +226,7 @@ sealed class LawnchairSearchAlgorithm( ) searchAlgorithm == LOCAL_SEARCH -> LawnchairLocalSearchAlgorithm(context) + else -> LawnchairAppSearchAlgorithm(context) } } diff --git a/lawnchair/src/app/lawnchair/search/algorithms/SearchUtils.kt b/lawnchair/src/app/lawnchair/search/algorithms/SearchUtils.kt index 8d18a3f032..8e6231a6b5 100644 --- a/lawnchair/src/app/lawnchair/search/algorithms/SearchUtils.kt +++ b/lawnchair/src/app/lawnchair/search/algorithms/SearchUtils.kt @@ -59,12 +59,14 @@ fun Sequence.filterHiddenApps( HiddenAppsInSearch.ALWAYS -> { this } + HiddenAppsInSearch.IF_NAME_TYPED -> { filter { it.toComponentKey().toString() !in hiddenApps || it.title.toString().lowercase(Locale.getDefault()) == query } } + else -> { filter { it.toComponentKey().toString() !in hiddenApps } } diff --git a/lawnchair/src/app/lawnchair/search/algorithms/data/IFileInfo.kt b/lawnchair/src/app/lawnchair/search/algorithms/data/IFileInfo.kt index 22bb95cb27..054790878f 100644 --- a/lawnchair/src/app/lawnchair/search/algorithms/data/IFileInfo.kt +++ b/lawnchair/src/app/lawnchair/search/algorithms/data/IFileInfo.kt @@ -34,10 +34,15 @@ data class FileInfo( @get:DrawableRes val iconRes = when (val mime = mimeType.orEmpty()) { in imageFileTypes.values -> R.drawable.ic_file_image + in videoFileTypes.values -> R.drawable.ic_file_video + in audioFileTypes.values -> R.drawable.ic_file_music + in androidPkgTypes.values -> R.drawable.ic_file_app + in archiveFileTypes.values -> R.drawable.ic_file_zip + in documentFileTypes.values -> when { mime.contains("excel") || mime.contains("csv") -> R.drawable.ic_file_excel mime.contains("word") -> R.drawable.ic_file_word @@ -46,6 +51,7 @@ data class FileInfo( mime.contains("srt") -> R.drawable.ic_file_subtitle else -> R.drawable.ic_file_text } + else -> R.drawable.ic_file_unknown } diff --git a/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Evaluator.kt b/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Evaluator.kt index 8e9ff478ae..4fe735781b 100644 --- a/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Evaluator.kt +++ b/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Evaluator.kt @@ -62,7 +62,9 @@ internal class Evaluator : ExprVisitor { return when (expr.operator.type) { BAR_BAR -> left or right + AMP_AMP -> left and right + else -> throw ExpressionException( "Invalid logical operator '${expr.operator.lexeme}'", ) @@ -75,17 +77,29 @@ internal class Evaluator : ExprVisitor { return when (expr.operator.type) { PLUS -> left + right + MINUS -> left - right + STAR -> left * right + SLASH -> left.divide(right, mathContext) + MODULO -> left.remainder(right, mathContext) + EXPONENT -> left pow right + EQUAL_EQUAL -> (left == right).toBigDecimal() + NOT_EQUAL -> (left != right).toBigDecimal() + GREATER -> (left > right).toBigDecimal() + GREATER_EQUAL -> (left >= right).toBigDecimal() + LESS -> (left < right).toBigDecimal() + LESS_EQUAL -> (left <= right).toBigDecimal() + else -> throw ExpressionException( "Invalid binary operator '${expr.operator.lexeme}'", ) @@ -99,9 +113,11 @@ internal class Evaluator : ExprVisitor { MINUS -> { right.negate() } + SQUARE_ROOT -> { right.pow(BigDecimal(0.5)) } + else -> throw ExpressionException("Invalid unary operator") } } diff --git a/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Scanner.kt b/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Scanner.kt index 5190cce396..216c1c783a 100644 --- a/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Scanner.kt +++ b/lawnchair/src/app/lawnchair/search/algorithms/data/calculator/internal/Scanner.kt @@ -60,22 +60,39 @@ internal class Scanner( -> { // Ignore whitespace. } + '+' -> addToken(PLUS) + '-' -> addToken(MINUS) + '*' -> addToken(STAR) + '/' -> addToken(SLASH) + '%' -> addToken(MODULO) + '^' -> addToken(EXPONENT) + '√' -> addToken(SQUARE_ROOT) + '=' -> if (match('=')) addToken(EQUAL_EQUAL) else addToken(ASSIGN) + '!' -> if (match('=')) addToken(NOT_EQUAL) else invalidToken(c) + '>' -> if (match('=')) addToken(GREATER_EQUAL) else addToken(GREATER) + '<' -> if (match('=')) addToken(LESS_EQUAL) else addToken(LESS) + '|' -> if (match('|')) addToken(BAR_BAR) else invalidToken(c) + '&' -> if (match('&')) addToken(AMP_AMP) else invalidToken(c) + ',' -> addToken(COMMA) + '(' -> addToken(LEFT_PAREN) + ')' -> addToken(RIGHT_PAREN) + else -> { when { c.isDigit() -> number() diff --git a/lawnchair/src/app/lawnchair/smartspace/BcSmartspaceCard.kt b/lawnchair/src/app/lawnchair/smartspace/BcSmartspaceCard.kt index 1803406878..405b61ad55 100644 --- a/lawnchair/src/app/lawnchair/smartspace/BcSmartspaceCard.kt +++ b/lawnchair/src/app/lawnchair/smartspace/BcSmartspaceCard.kt @@ -110,9 +110,11 @@ class BcSmartspaceCard @JvmOverloads constructor( headerAction.hasIntent -> { BcSmartSpaceUtil.setOnClickListener(this, headerAction, null, "BcSmartspaceCard") } + baseAction.hasIntent -> { BcSmartSpaceUtil.setOnClickListener(this, baseAction, null, "BcSmartspaceCard") } + else -> { BcSmartSpaceUtil.setOnClickListener(this, headerAction, null, "BcSmartspaceCard") } @@ -171,11 +173,13 @@ class BcSmartspaceCard @JvmOverloads constructor( ) { textView.contentDescription = when { title.isNullOrEmpty() -> contentDescription + !contentDescription.isNullOrEmpty() -> context.getString( R.string.generic_smartspace_concatenated_desc, contentDescription, title, ) + else -> title } } diff --git a/lawnchair/src/app/lawnchair/smartspace/DoubleShadowTextView.kt b/lawnchair/src/app/lawnchair/smartspace/DoubleShadowTextView.kt index f0ce098122..eeaf020632 100644 --- a/lawnchair/src/app/lawnchair/smartspace/DoubleShadowTextView.kt +++ b/lawnchair/src/app/lawnchair/smartspace/DoubleShadowTextView.kt @@ -34,10 +34,12 @@ open class DoubleShadowTextView @JvmOverloads constructor( paint.clearShadowLayer() return true } + ambientShadowAlpha > 0 && keyShadowAlpha == 0 -> { paint.setShadowLayer(shadowInfo.ambientShadowBlur, 0f, 0f, shadowInfo.ambientShadowColor) return true } + keyShadowAlpha > 0 && ambientShadowAlpha == 0 -> { paint.setShadowLayer( shadowInfo.keyShadowBlur, @@ -47,6 +49,7 @@ open class DoubleShadowTextView @JvmOverloads constructor( ) return true } + else -> { return false } diff --git a/lawnchair/src/app/lawnchair/smartspace/InterceptingViewPager.kt b/lawnchair/src/app/lawnchair/smartspace/InterceptingViewPager.kt index 5c8e488cd5..c093c906ab 100644 --- a/lawnchair/src/app/lawnchair/smartspace/InterceptingViewPager.kt +++ b/lawnchair/src/app/lawnchair/smartspace/InterceptingViewPager.kt @@ -30,6 +30,7 @@ class InterceptingViewPager @JvmOverloads constructor( postDelayed(longPressCallback, ViewConfiguration.getLongPressTimeout().toLong()) } } + MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> { cancelScheduledLongPress() } diff --git a/lawnchair/src/app/lawnchair/theme/ThemeProvider.kt b/lawnchair/src/app/lawnchair/theme/ThemeProvider.kt index 0cfb2ade2c..b738a859d9 100644 --- a/lawnchair/src/app/lawnchair/theme/ThemeProvider.kt +++ b/lawnchair/src/app/lawnchair/theme/ThemeProvider.kt @@ -90,11 +90,14 @@ class ThemeProvider @Inject constructor( val colorScheme get() = when (val accentColor = this.accentColor) { is ColorOption.SystemAccent -> systemColorScheme + is ColorOption.WallpaperPrimary -> { val wallpaperPrimary = wallpaperManager.wallpaperColors?.primaryColor getColorScheme(wallpaperPrimary ?: ColorOption.LawnchairBlue.color, colorStyle.style) } + is ColorOption.CustomColor -> getColorScheme(accentColor.color, colorStyle.style) + else -> getColorScheme(ColorOption.LawnchairBlue.color, colorStyle.style) } diff --git a/lawnchair/src/app/lawnchair/ui/placeholder/PlaceholderHighlight.kt b/lawnchair/src/app/lawnchair/ui/placeholder/PlaceholderHighlight.kt index fdc560fedd..2da4bcbb5f 100644 --- a/lawnchair/src/app/lawnchair/ui/placeholder/PlaceholderHighlight.kt +++ b/lawnchair/src/app/lawnchair/ui/placeholder/PlaceholderHighlight.kt @@ -150,6 +150,7 @@ private data class Shimmer( fraction = progress / progressForMaxAlpha, ) } + // From ProgressForOpaqueAlpha..1f we animate from 1..0 else -> { lerp( diff --git a/lawnchair/src/app/lawnchair/ui/popup/LauncherOptionsPopup.kt b/lawnchair/src/app/lawnchair/ui/popup/LauncherOptionsPopup.kt index 83388a345c..1509f31f94 100644 --- a/lawnchair/src/app/lawnchair/ui/popup/LauncherOptionsPopup.kt +++ b/lawnchair/src/app/lawnchair/ui/popup/LauncherOptionsPopup.kt @@ -149,34 +149,42 @@ object LauncherOptionsPopup { icon = R.drawable.ic_wallpaper, isCarousel = true, ) + "lock" -> LauncherOptionMetadata( label = R.string.home_screen_lock, icon = R.drawable.ic_lock, ) + "sys_settings" -> LauncherOptionMetadata( label = R.string.system_settings, icon = R.drawable.ic_setting, ) + "edit_mode" -> LauncherOptionMetadata( label = R.string.edit_home_screen, icon = R.drawable.enter_home_gardening_icon, ) + "wallpaper" -> LauncherOptionMetadata( label = R.string.styles_wallpaper_button_text, icon = R.drawable.ic_palette, ) + "widgets" -> LauncherOptionMetadata( label = R.string.widget_button_text, icon = R.drawable.ic_widget, ) + "all_apps" -> LauncherOptionMetadata( label = R.string.all_apps_button_label, icon = R.drawable.ic_apps, ) + "home_settings" -> LauncherOptionMetadata( label = R.string.settings_button_text, icon = R.drawable.ic_home_screen, ) + else -> throw IllegalArgumentException("invalid popup option") } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/Preferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/Preferences.kt index 82e06abcfd..5ccbdc9fa8 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/Preferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/Preferences.kt @@ -153,6 +153,7 @@ private fun PreferenceScreen( displayFeatures = displayFeatures, ) } + isExpandedScreen -> { Surface( color = MaterialTheme.colorScheme.surface, @@ -166,6 +167,7 @@ private fun PreferenceScreen( } } } + else -> { moveableNavHost() } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/about/NightlyBuildsRepository.kt b/lawnchair/src/app/lawnchair/ui/preferences/about/NightlyBuildsRepository.kt index 4403ebe981..0b756f341e 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/about/NightlyBuildsRepository.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/about/NightlyBuildsRepository.kt @@ -79,6 +79,7 @@ class NightlyBuildsRepository( is IOException -> { Log.e(TAG, "Network error during update check", e) } + else -> { Log.e(TAG, "Failed to check for update", e) } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/about/UpdateSection.kt b/lawnchair/src/app/lawnchair/ui/preferences/about/UpdateSection.kt index 848e47d433..3c81ec3bc1 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/about/UpdateSection.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/about/UpdateSection.kt @@ -32,9 +32,11 @@ fun UpdateSection( ) { when (updateState) { UpdateState.Hidden -> { /* Render nothing */ } + UpdateState.Checking -> { CircularProgressIndicator(modifier = Modifier.padding(top = 8.dp)) } + UpdateState.UpToDate -> { Text( text = stringResource(R.string.pro_updated), @@ -43,6 +45,7 @@ fun UpdateSection( modifier = Modifier.padding(top = 8.dp), ) } + is UpdateState.Available -> { Button( onClick = onViewChanges, @@ -51,6 +54,7 @@ fun UpdateSection( Text(text = stringResource(R.string.download_update)) } } + is UpdateState.Downloading -> { LinearProgressIndicator( progress = { updateState.progress }, @@ -63,6 +67,7 @@ fun UpdateSection( style = MaterialTheme.typography.bodySmall, ) } + is UpdateState.Downloaded -> { Button( onClick = { @@ -73,6 +78,7 @@ fun UpdateSection( Text(text = stringResource(R.string.install_update)) } } + UpdateState.Failed -> { Text( text = stringResource(R.string.update_check_failed), diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/AnnouncementPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/AnnouncementPreference.kt index 0eb6548567..7cf80a044e 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/AnnouncementPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/AnnouncementPreference.kt @@ -131,6 +131,7 @@ private fun AnnouncementItemContent( } SwipeToDismissBoxValue.EndToStart -> return@rememberSwipeToDismissBoxState false + SwipeToDismissBoxValue.Settled -> return@rememberSwipeToDismissBoxState false } return@rememberSwipeToDismissBoxState true @@ -180,7 +181,9 @@ private fun AnnouncementItemContent( fun calculateAlpha(progress: Float): Float { return when { - progress < 0.5f -> 1f // Fully opaque until halfway + progress < 0.5f -> 1f + + // Fully opaque until halfway else -> 1f - (progress - 0.5f) * 2 // Fade out linearly from halfway to the end } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/HomeLayoutPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/HomeLayoutPreferences.kt index d6ff670f12..d82021cf7d 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/HomeLayoutPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/HomeLayoutPreferences.kt @@ -9,12 +9,15 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.movableContentOf @@ -26,6 +29,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import app.lawnchair.deck.LawndeckManager @@ -34,6 +38,7 @@ import app.lawnchair.preferences.getAdapter import app.lawnchair.preferences.preferenceManager import app.lawnchair.preferences2.preferenceManager2 import app.lawnchair.ui.preferences.components.controls.SwitchPreferenceWithPreview +import app.lawnchair.util.BackHandler import com.android.launcher3.R import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -55,21 +60,76 @@ fun HomeLayoutSettings( val coroutineScope = rememberCoroutineScope() var isLoading by remember { mutableStateOf(false) } + var loadingMessage by remember { mutableStateOf("") } + + // Block back button when loading + if (isLoading) { + BackHandler { + // Prevent back button during loading - do nothing + } + } + + // Show blocking loading dialog + if (isLoading) { + AlertDialog( + onDismissRequest = { + // Prevent dismissal during loading + }, + title = { + Text( + text = stringResource(R.string.home_lawn_deck_label_beta), + textAlign = TextAlign.Center, + ) + }, + text = { + Column( + modifier = Modifier.fillMaxWidth(), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + CircularProgressIndicator( + modifier = Modifier.padding(bottom = 16.dp), + ) + if (loadingMessage.isNotEmpty()) { + Text( + text = loadingMessage, + textAlign = TextAlign.Center, + style = MaterialTheme.typography.bodyMedium, + ) + } else { + Text( + text = "Please wait...", + textAlign = TextAlign.Center, + style = MaterialTheme.typography.bodyMedium, + ) + } + } + }, + confirmButton = {}, + dismissButton = {}, + ) + } SwitchPreferenceWithPreview( label = stringResource(R.string.layout), checked = deskLayout.state.value, onCheckedChange = { newValue -> isLoading = true + loadingMessage = "" deskLayout.onChange(newValue) if (newValue) { coroutineScope.launch { swipeUpGesture.onChange(GestureHandlerConfig.NoOp) addNewAppToHome.onChange(true) withContext(Dispatchers.IO) { - deckManager.enableLawndeck() - isLoading = false + deckManager.enableLawndeck { message -> + // Update on main thread using coroutine scope + coroutineScope.launch(Dispatchers.Main) { + loadingMessage = message + } + } } + isLoading = false + loadingMessage = "" } } else { coroutineScope.launch { @@ -77,6 +137,7 @@ fun HomeLayoutSettings( withContext(Dispatchers.IO) { deckManager.disableLawndeck() isLoading = false + loadingMessage = "" } } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/WallpaperPreview.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/WallpaperPreview.kt index f221cd23b4..fd79abbb3f 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/WallpaperPreview.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/WallpaperPreview.kt @@ -132,6 +132,7 @@ fun wallpaperDrawable( ) { value = when { wallpaperInfo != null -> wallpaperInfo.loadThumbnail(context.packageManager) + hasPermission -> { withContext(Dispatchers.IO) { wallpaperManager.drawable?.let { @@ -141,6 +142,7 @@ fun wallpaperDrawable( } } } + else -> null } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt index 51836f4a82..e7063c228f 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt @@ -144,6 +144,7 @@ fun ColorSelection( ) } } + 1 -> { CustomColorPicker( selectedColor = selectedColor.intValue, diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/pickers/CustomColorPicker.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/pickers/CustomColorPicker.kt index feb5dfb780..1d7cc17d07 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/pickers/CustomColorPicker.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/pickers/CustomColorPicker.kt @@ -185,6 +185,7 @@ fun CustomColorPicker( }, ) } + 1 -> { RgbColorPicker( selectedColor = selectedColor, diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/layout/NestedScrollStretch.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/layout/NestedScrollStretch.kt index 09c5fd933d..f83d7103b0 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/layout/NestedScrollStretch.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/layout/NestedScrollStretch.kt @@ -93,6 +93,7 @@ private class NestedScrollStretchConnection(context: Context, invalidate: Runnab val availableY = available.y when { source != NestedScrollSource.UserInput || height == 0 -> return Offset.Zero + availableY != 0f -> { if (availableY < 0f) { val consumed = topEdgeEffect.onPullDistance(availableY / height, 0f) @@ -117,6 +118,7 @@ private class NestedScrollStretchConnection(context: Context, invalidate: Runnab val availableY = available.y when { source != NestedScrollSource.UserInput || height == 0 -> return Offset.Zero + availableY != 0f -> { if (availableY > 0f) { topEdgeEffect.onPull(availableY / height) @@ -125,6 +127,7 @@ private class NestedScrollStretchConnection(context: Context, invalidate: Runnab bottomEdgeEffect.onPull(-availableY / height) } } + else -> { topEdgeEffect.onRelease() bottomEdgeEffect.onRelease() diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/layout/TwoTabPreferenceLayout.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/layout/TwoTabPreferenceLayout.kt index 84b06af97a..3e4bff3ef7 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/layout/TwoTabPreferenceLayout.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/layout/TwoTabPreferenceLayout.kt @@ -88,6 +88,7 @@ fun TwoTabPreferenceLayout( firstPageContent() } } + 1 -> { Column { secondPageContent() diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/search/SearchProviderPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/search/SearchProviderPreference.kt index 757e764383..998bb374cb 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/search/SearchProviderPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/search/SearchProviderPreference.kt @@ -254,6 +254,7 @@ fun GenericSearchProviderPreference( description = stringResource(id = R.string.fuzzy_search_desc), ) } + SearchProviderId.WEB -> { SliderPreference( label = stringResource(id = R.string.max_web_suggestion_delay), @@ -269,6 +270,7 @@ fun GenericSearchProviderPreference( suggestionsUrlAdapter = prefs2.webSuggestionProviderSuggestionsUrl.getAdapter(), ) } + SearchProviderId.HISTORY -> { val context = LocalContext.current @@ -285,6 +287,7 @@ fun GenericSearchProviderPreference( }, ) } + else -> {} } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt index 41e4240980..a719f0660f 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt @@ -240,6 +240,7 @@ private fun FontSelectionItem( VariantDropdown(adapter = adapter, family = family) } } + onDelete != null -> { { IconButton( @@ -255,6 +256,7 @@ private fun FontSelectionItem( } } } + else -> null }, applyPaddings = false, diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt index c096dd80b9..fb061f458f 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt @@ -238,6 +238,7 @@ private fun NotificationDotColorContrastWarnings( is ColorOption.WallpaperPrimary, is ColorOption.Default, -> true + else -> false } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt index 97d0ca3396..513bd98589 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt @@ -78,7 +78,7 @@ fun HomeScreenPreferences( val isDeckLayoutAdapter = prefs2.deckLayout.getAdapter() ExpandAndShrink(visible = !isDeckLayoutAdapter.state.value) { SwitchPreference( - checked = !lockHomeScreenAdapter.state.value && addIconToHomeAdapter.state.value, + checked = (!lockHomeScreenAdapter.state.value && addIconToHomeAdapter.state.value) || isDeckLayoutAdapter.state.value, onCheckedChange = addIconToHomeAdapter::onChange, label = stringResource(id = R.string.auto_add_shortcuts_label), description = if (lockHomeScreenAdapter.state.value) stringResource(id = R.string.home_screen_locked) else null, diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/LauncherPopupPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/LauncherPopupPreference.kt index 21ce51cd70..295fc7d13a 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/LauncherPopupPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/LauncherPopupPreference.kt @@ -156,18 +156,21 @@ private fun LauncherPopupPreview(optionsList: List) { val shape = when { isSingleItem -> CircleShape + isFirst -> RoundedCornerShape( clipRadius.topStart, clipRadius.topEnd, defaultCorner, defaultCorner, ) + isLast -> RoundedCornerShape( defaultCorner, defaultCorner, clipRadius.bottomStart, clipRadius.bottomEnd, ) + else -> RoundedCornerShape(defaultCorner) } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/SmartspacePreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/SmartspacePreferences.kt index 9d0e2a29ee..e19a2680ce 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/SmartspacePreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/SmartspacePreferences.kt @@ -81,9 +81,11 @@ fun SmartspacePreferences( LawnchairSmartspace -> { LawnchairSmartspaceSettings(smartspaceProvider) } + Smartspacer -> { SmartspacerSettings() } + else -> {} } } diff --git a/lawnchair/src/app/lawnchair/util/Compatibility.kt b/lawnchair/src/app/lawnchair/util/Compatibility.kt index 4052a92006..253651c1eb 100644 --- a/lawnchair/src/app/lawnchair/util/Compatibility.kt +++ b/lawnchair/src/app/lawnchair/util/Compatibility.kt @@ -10,8 +10,11 @@ val isOnePlusStock = checkOnePlusStock() private fun checkOnePlusStock(): Boolean = when { getSystemProperty("ro.rom.version", "") .contains(Regex("Oxygen OS|Hydrogen OS|O2_BETA|H2_BETA")) -> true + getSystemProperty("ro.oxygen.version", "").isNotEmpty() -> true + getSystemProperty("ro.hydrogen.version", "").isNotEmpty() -> true + else -> false } diff --git a/lawnchair/src/app/lawnchair/util/FormatterUtils.kt b/lawnchair/src/app/lawnchair/util/FormatterUtils.kt index c384e6c04d..87081311ee 100644 --- a/lawnchair/src/app/lawnchair/util/FormatterUtils.kt +++ b/lawnchair/src/app/lawnchair/util/FormatterUtils.kt @@ -24,30 +24,37 @@ fun formatShortElapsedTime(context: Context, millis: Long): String? { val roundedDays = duration.toDouble(DurationUnit.DAYS).round() measureFormat.format(Measure(roundedDays, MeasureUnit.DAY)) } + days >= 2 || days > 0 && hours == 0 -> { val roundedDays = duration.toDouble(DurationUnit.DAYS).round() measureFormat.format(Measure(roundedDays, MeasureUnit.DAY)) } + days > 0 -> measureFormat.formatMeasures( Measure(days, MeasureUnit.DAY), Measure(hours, MeasureUnit.HOUR), ) + hours >= 2 || hours > 0 && minutes == 0 -> { val roundedHours = duration.toDouble(DurationUnit.HOURS).round() measureFormat.format(Measure(roundedHours, MeasureUnit.HOUR)) } + hours > 0 -> measureFormat.formatMeasures( Measure(hours, MeasureUnit.HOUR), Measure(minutes, MeasureUnit.MINUTE), ) + minutes >= 2 || minutes > 0 && seconds == 0 -> { val roundedMinutes = duration.toDouble(DurationUnit.MINUTES).round() measureFormat.format(Measure(roundedMinutes, MeasureUnit.MINUTE)) } + minutes > 0 -> measureFormat.formatMeasures( Measure(minutes, MeasureUnit.MINUTE), Measure(seconds, MeasureUnit.SECOND), ) + else -> measureFormat.format(Measure(seconds, MeasureUnit.SECOND)) } } diff --git a/lawnchair/src/app/lawnchair/util/SmartBorder.kt b/lawnchair/src/app/lawnchair/util/SmartBorder.kt index 3944d0e64b..6ad708315b 100644 --- a/lawnchair/src/app/lawnchair/util/SmartBorder.kt +++ b/lawnchair/src/app/lawnchair/util/SmartBorder.kt @@ -221,6 +221,7 @@ fun cutOutline(outline: Outline, height: Float, cutTop: Boolean, cutBottom: Bool CornerRadius.Zero, ), ) + is Outline.Rounded -> Outline.Rounded( RoundRect( cutRect(outline.roundRect.boundingRect, height, cutTop, cutBottom), @@ -230,6 +231,7 @@ fun cutOutline(outline: Outline, height: Float, cutTop: Boolean, cutBottom: Bool outline.roundRect.bottomRightCornerRadius, ), ) + else -> outline } } diff --git a/lawnchair/src/app/lawnchair/views/FullScreenOverlayView.kt b/lawnchair/src/app/lawnchair/views/FullScreenOverlayView.kt index f11151035b..16584167d0 100644 --- a/lawnchair/src/app/lawnchair/views/FullScreenOverlayView.kt +++ b/lawnchair/src/app/lawnchair/views/FullScreenOverlayView.kt @@ -209,11 +209,13 @@ fun Activity.showFullScreenOverlay( overlayView.animateOut(durationOut, onOverlayReady) } } + FullScreenOverlayMode.SUCK_IN -> { overlayView.suckAnimation(durationOut) { onOverlayReady() } } + FullScreenOverlayMode.NONE -> { targetRootView?.removeView(overlayView) onOverlayReady() diff --git a/lawnchair/src/com/android/systemui/monet/ColorScheme.kt b/lawnchair/src/com/android/systemui/monet/ColorScheme.kt index 1484729506..3a53c60708 100644 --- a/lawnchair/src/com/android/systemui/monet/ColorScheme.kt +++ b/lawnchair/src/com/android/systemui/monet/ColorScheme.kt @@ -445,9 +445,11 @@ class ColorScheme( degrees < 0 -> { (degrees % 360) + 360 } + degrees >= 360 -> { degrees % 360 } + else -> { degrees } diff --git a/src/com/android/launcher3/model/PackageUpdatedTask.java b/src/com/android/launcher3/model/PackageUpdatedTask.java index 467e6aaf22..10666c8a9c 100644 --- a/src/com/android/launcher3/model/PackageUpdatedTask.java +++ b/src/com/android/launcher3/model/PackageUpdatedTask.java @@ -70,7 +70,10 @@ import java.util.Objects; import java.util.function.Predicate; import java.util.stream.Collectors; +import app.lawnchair.deck.LawndeckManager; import app.lawnchair.preferences.PreferenceManager; +import app.lawnchair.preferences2.PreferenceManager2; +import com.patrykmichalik.opto.core.PreferenceExtensionsKt; /** * Handles updates due to changes in package manager (app installed/updated/removed) @@ -466,6 +469,16 @@ public class PackageUpdatedTask implements ModelUpdateTask { dataModel.widgetsModel.update(new PackageUserKey(packages[i], mUser)); } taskController.bindUpdatedWidgets(dataModel); + + // If deck layout is enabled, add newly installed apps to workspace with categorization + PreferenceManager2 pref2 = PreferenceManager2.INSTANCE.get(context); + if (PreferenceExtensionsKt.firstBlocking(pref2.getDeckLayout())) { + LawndeckManager deckManager = new LawndeckManager(context); + ModelWriter modelWriter = taskController.getModelWriter(); + for (int i = 0; i < packageCount; i++) { + deckManager.addNewlyInstalledApp(packages[i], mUser, modelWriter, dataModel); + } + } } }