chore: Update dependencies
This commit is contained in:
1 parent
4e5719256b
commit
837d8ab791
58 files changed
+203
-38
No files matched your search
@@ -22,6 +22,7 @@ ktlint_code_style = intellij_idea
|
|||||||
ktlint_function_naming_ignore_when_annotated_with = Composable
|
ktlint_function_naming_ignore_when_annotated_with = Composable
|
||||||
ktlint_standard_discouraged-comment-location = disabled
|
ktlint_standard_discouraged-comment-location = disabled
|
||||||
ktlint_standard_function-expression-body = disabled
|
ktlint_standard_function-expression-body = disabled
|
||||||
|
ktlint_standard_mixed-condition-operators = disabled
|
||||||
ktlint_compose_lambda-param-event-trailing = disabled
|
ktlint_compose_lambda-param-event-trailing = disabled
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-java@v5
|
- uses: actions/setup-java@v5
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-java@v5
|
- uses: actions/setup-java@v5
|
||||||
@@ -63,7 +63,7 @@ jobs:
|
|||||||
check-style:
|
check-style:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-java@v5
|
- uses: actions/setup-java@v5
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
if: github.repository_owner == 'LawnchairLauncher'
|
if: github.repository_owner == 'LawnchairLauncher'
|
||||||
needs: build-debug-apk
|
needs: build-debug-apk
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -125,7 +125,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/download-artifact@v6
|
- uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Debug APK
|
name: Debug APK
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Sync Translations
|
- name: Sync Translations
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Download translations
|
- name: Download translations
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Upload Strings
|
- name: Upload Strings
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
id-token: write
|
id-token: write
|
||||||
attestations: write
|
attestations: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-java@v5
|
- uses: actions/setup-java@v5
|
||||||
@@ -66,7 +66,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
@@ -86,7 +86,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-release-apk
|
needs: build-release-apk
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
+27
-5
@@ -71,18 +71,40 @@ This is a developer-focused change log:
|
|||||||
Lawnchair 16 pE Development 3 is here! Contributors are encouraged to target this branch instead of
|
Lawnchair 16 pE Development 3 is here! Contributors are encouraged to target this branch instead of
|
||||||
older (i.e., Lawnchair `15-dev`).
|
older (i.e., Lawnchair `15-dev`).
|
||||||
|
|
||||||
### 🥞 Development 3
|
### 🥞 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
|
Build: BD3.1711
|
||||||
|
|
||||||
The biggest change log ever, this marked the end of Bubble Tea [r2] branch as future development
|
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!
|
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
|
(Again) Originally going to launch D3 if most of the issue on tracker have been resolved, but hit a
|
||||||
stability milestone instead.
|
stability milestone instead.
|
||||||
|
|
||||||
This release includes 4 new features, and 33 bug fixes,
|
This release includes 4 new features, and 33 bug fixes,
|
||||||
Reimplemented some of Lawnchair features, better sizing of home screen, updated README.md screenshot
|
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!
|
and the inclusion of Bubble Tea project into the official Lawnchair repository as 16-dev!
|
||||||
|
|
||||||
This release have been tested with:
|
This release have been tested with:
|
||||||
|
|||||||
+3
-3
@@ -169,7 +169,7 @@ android {
|
|||||||
* Lawnchair Launcher 16.0 Development 4 Release 1
|
* Lawnchair Launcher 16.0 Development 4 Release 1
|
||||||
* see CONTRIBUTING.md#versioning-scheme
|
* see CONTRIBUTING.md#versioning-scheme
|
||||||
*/
|
*/
|
||||||
versionCode 16_00_04_00_01
|
versionCode 16_00_01_04_01
|
||||||
versionName "${versionDisplayName}"
|
versionName "${versionDisplayName}"
|
||||||
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
|
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
|
||||||
buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\""
|
buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\""
|
||||||
@@ -514,8 +514,8 @@ spotless {
|
|||||||
}
|
}
|
||||||
kotlin {
|
kotlin {
|
||||||
target("lawnchair/src/**/*.kt")
|
target("lawnchair/src/**/*.kt")
|
||||||
ktlint().customRuleSets([
|
ktlint("1.8.0").customRuleSets([
|
||||||
"io.nlopez.compose.rules:ktlint:0.4.27",
|
"io.nlopez.compose.rules:ktlint:0.4.28",
|
||||||
]).editorConfigOverride([
|
]).editorConfigOverride([
|
||||||
"ktlint_compose_compositionlocal-allowlist": "disabled",
|
"ktlint_compose_compositionlocal-allowlist": "disabled",
|
||||||
"ktlint_compose_lambda-param-event-trailing": "disabled",
|
"ktlint_compose_lambda-param-event-trailing": "disabled",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 39 KiB |
+13
-12
@@ -16,24 +16,24 @@ mockitoKotlin = "5.4.0"
|
|||||||
opto = "1.0.18"
|
opto = "1.0.18"
|
||||||
protocVersion = "4.33.1"
|
protocVersion = "4.33.1"
|
||||||
retrofit = "3.0.0"
|
retrofit = "3.0.0"
|
||||||
room = "2.8.3"
|
room = "2.8.4"
|
||||||
testRules = "1.7.0"
|
testRules = "1.7.0"
|
||||||
testRunner = "1.7.0"
|
testRunner = "1.7.0"
|
||||||
truth = "1.4.5"
|
truth = "1.4.5"
|
||||||
|
|
||||||
activityCompose = "1.11.0"
|
activityCompose = "1.12.0"
|
||||||
airbnbLottie = "6.7.1"
|
airbnbLottie = "6.7.1"
|
||||||
androidDesugar = "2.1.5"
|
androidDesugar = "2.1.5"
|
||||||
coil = "2.7.0"
|
coil = "2.7.0"
|
||||||
composeBom = "2025.11.00"
|
composeBom = "2025.11.01"
|
||||||
compose = "1.9.4"
|
compose = "1.10.0-rc01"
|
||||||
composeMaterial = "1.9.4"
|
composeMaterial = "1.10.0-rc01"
|
||||||
composeMaterial3 = "1.5.0-alpha08"
|
composeMaterial3 = "1.5.0-alpha09"
|
||||||
composeMaterialIcons = "1.7.8"
|
composeMaterialIcons = "1.7.8"
|
||||||
composeCompiler = "1.5.15"
|
composeCompiler = "1.5.15"
|
||||||
constraintlayout = "2.2.1"
|
constraintlayout = "2.2.1"
|
||||||
dagger = "2.57.2"
|
dagger = "2.57.2"
|
||||||
datastore = "1.1.7"
|
datastore = "1.2.0"
|
||||||
dynamicanimation = "1.1.0"
|
dynamicanimation = "1.1.0"
|
||||||
fuzzywuzzy = "1.4.0"
|
fuzzywuzzy = "1.4.0"
|
||||||
googleMaterial = "1.13.0"
|
googleMaterial = "1.13.0"
|
||||||
@@ -47,10 +47,10 @@ kotlinxCoroutines = "1.10.2"
|
|||||||
kotlinxSerialization = "1.9.0"
|
kotlinxSerialization = "1.9.0"
|
||||||
leakcanaryAndroid = "2.14"
|
leakcanaryAndroid = "2.14"
|
||||||
libsu = "6.0.0"
|
libsu = "6.0.0"
|
||||||
lifecycle = "2.9.4"
|
lifecycle = "2.10.0"
|
||||||
materialMotionCompose = "2.0.1"
|
materialMotionCompose = "2.0.1"
|
||||||
navigationCompose = "2.9.6"
|
navigationCompose = "2.9.6"
|
||||||
okhttp = "5.3.1"
|
okhttp = "5.3.2"
|
||||||
palette = "1.0.0"
|
palette = "1.0.0"
|
||||||
persianDate = "1.7.1"
|
persianDate = "1.7.1"
|
||||||
preference = "1.2.1"
|
preference = "1.2.1"
|
||||||
@@ -61,7 +61,7 @@ restrictionBypass = "2.2"
|
|||||||
slice = "1.1.0-alpha02"
|
slice = "1.1.0-alpha02"
|
||||||
smartspacer = "1.1.2"
|
smartspacer = "1.1.2"
|
||||||
uiautomator = "2.3.0"
|
uiautomator = "2.3.0"
|
||||||
window = "1.5.0"
|
window = "1.5.1"
|
||||||
|
|
||||||
agp = "8.13.1"
|
agp = "8.13.1"
|
||||||
baselineprofile = "1.4.1"
|
baselineprofile = "1.4.1"
|
||||||
@@ -69,7 +69,7 @@ kotlin = "2.2.21"
|
|||||||
protobuf = "0.9.5"
|
protobuf = "0.9.5"
|
||||||
licensee = "1.14.1"
|
licensee = "1.14.1"
|
||||||
refine = "4.4.0"
|
refine = "4.4.0"
|
||||||
spotless = "8.0.0"
|
spotless = "8.1.0"
|
||||||
|
|
||||||
guava = "33.5.0-android"
|
guava = "33.5.0-android"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|||||||
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", 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-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
||||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||||
google-ksp = "com.google.devtools.ksp:2.3.2"
|
google-ksp = "com.google.devtools.ksp:2.3.3"
|
||||||
google-protobuf = { id = "com.google.protobuf", version.ref = "protobuf" }
|
google-protobuf = { id = "com.google.protobuf", version.ref = "protobuf" }
|
||||||
cash-licensee = { id = "app.cash.licensee", version.ref = "licensee" }
|
cash-licensee = { id = "app.cash.licensee", version.ref = "licensee" }
|
||||||
rikka-refine = { id = "dev.rikka.tools.refine", version.ref = "refine" }
|
rikka-refine = { id = "dev.rikka.tools.refine", version.ref = "refine" }
|
||||||
@@ -138,6 +138,7 @@ compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling
|
|||||||
compose-ui-util = { group = "androidx.compose.ui", name = "ui-util", version.ref = "compose" }
|
compose-ui-util = { group = "androidx.compose.ui", name = "ui-util", version.ref = "compose" }
|
||||||
compose-compiler = { group = "androidx.compose.compiler", name = "compose-compiler", version.ref = "composeCompiler"}
|
compose-compiler = { group = "androidx.compose.compiler", name = "compose-compiler", version.ref = "composeCompiler"}
|
||||||
|
|
||||||
|
# Dagger & Hilt
|
||||||
dagger = { group = "com.google.dagger", name = "dagger", version.ref = "dagger" }
|
dagger = { group = "com.google.dagger", name = "dagger", version.ref = "dagger" }
|
||||||
dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "dagger" }
|
dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "dagger" }
|
||||||
dagger-android-processor = { group = "com.google.dagger", name = "dagger-android-processor", version.ref = "dagger" }
|
dagger-android-processor = { group = "com.google.dagger", name = "dagger-android-processor", version.ref = "dagger" }
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
|
distributionSha256Sum=72f44c9f8ebcb1af43838f45ee5c4aa9c5444898b3468ab3f4af7b6076c5bc3f
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class BlankActivity : ComponentActivity() {
|
|||||||
}.launch(requireNotNull(intent.getParcelableExtra("intent")))
|
}.launch(requireNotNull(intent.getParcelableExtra("intent")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ class FeedBridge(private val context: Context) {
|
|||||||
open fun isSigned(): Boolean {
|
open fun isSigned(): Boolean {
|
||||||
when {
|
when {
|
||||||
BuildConfig.DEBUG -> return true
|
BuildConfig.DEBUG -> return true
|
||||||
|
|
||||||
Utilities.ATLEAST_P -> {
|
Utilities.ATLEAST_P -> {
|
||||||
val info =
|
val info =
|
||||||
context.packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNING_CERTIFICATES)
|
context.packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNING_CERTIFICATES)
|
||||||
@@ -115,6 +116,7 @@ class FeedBridge(private val context: Context) {
|
|||||||
if (signingInfo!!.hasMultipleSigners()) return false
|
if (signingInfo!!.hasMultipleSigners()) return false
|
||||||
return signingInfo.signingCertificateHistory.any { it.hashCode() == signatureHash }
|
return signingInfo.signingCertificateHistory.any { it.hashCode() == signatureHash }
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
val info = context.packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES)
|
val info = context.packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES)
|
||||||
return if (info.signatures!!.any { it.hashCode() != signatureHash }) false else info.signatures!!.isNotEmpty()
|
return if (info.signatures!!.any { it.hashCode() != signatureHash }) false else info.signatures!!.isNotEmpty()
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ class LawnchairLauncher : QuickstepLauncher() {
|
|||||||
-> {
|
-> {
|
||||||
LawnchairApp.instance.restoreClockInStatusBar()
|
LawnchairApp.instance.restoreClockInStatusBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
workspace.updateStatusbarClock()
|
workspace.updateStatusbarClock()
|
||||||
}
|
}
|
||||||
@@ -473,6 +474,7 @@ class LawnchairLauncher : QuickstepLauncher() {
|
|||||||
private fun restartIfPending() {
|
private fun restartIfPending() {
|
||||||
when {
|
when {
|
||||||
sRestartFlags and FLAG_RESTART != 0 -> lawnchairApp.restart(false)
|
sRestartFlags and FLAG_RESTART != 0 -> lawnchairApp.restart(false)
|
||||||
|
|
||||||
sRestartFlags and FLAG_RECREATE != 0 -> {
|
sRestartFlags and FLAG_RECREATE != 0 -> {
|
||||||
sRestartFlags = 0
|
sRestartFlags = 0
|
||||||
recreate()
|
recreate()
|
||||||
|
|||||||
@@ -80,10 +80,12 @@ class SearchResultIcon(context: Context, attrs: AttributeSet?) :
|
|||||||
allowLongClick = false
|
allowLongClick = false
|
||||||
bindFromAction(target, iconComponentKey == null)
|
bindFromAction(target, iconComponentKey == null)
|
||||||
}
|
}
|
||||||
|
|
||||||
target.shortcutInfo != null -> {
|
target.shortcutInfo != null -> {
|
||||||
allowLongClick = true
|
allowLongClick = true
|
||||||
bindFromShortcutInfo(target.shortcutInfo)
|
bindFromShortcutInfo(target.shortcutInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
allowLongClick = true
|
allowLongClick = true
|
||||||
val className = extras.getString("class").orEmpty()
|
val className = extras.getString("class").orEmpty()
|
||||||
@@ -208,7 +210,9 @@ class SearchResultIcon(context: Context, attrs: AttributeSet?) :
|
|||||||
info.bitmap = when {
|
info.bitmap = when {
|
||||||
info.hasFlags(SearchActionItemInfo.FLAG_PRIMARY_ICON_FROM_TITLE) ->
|
info.hasFlags(SearchActionItemInfo.FLAG_PRIMARY_ICON_FROM_TITLE) ->
|
||||||
li.createIconBitmap("${info.title}", packageIcon.color)
|
li.createIconBitmap("${info.title}", packageIcon.color)
|
||||||
|
|
||||||
icon == null -> packageIcon
|
icon == null -> packageIcon
|
||||||
|
|
||||||
else -> icon.loadDrawable(context)?.let { li.createBadgedIconBitmap(it, BaseIconFactory.IconOptions().setUser(info.user)) } ?: 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")) {
|
if (info.hasFlags(SearchActionItemInfo.FLAG_BADGE_WITH_COMPONENT_NAME) && target.extras.containsKey("class")) {
|
||||||
|
|||||||
@@ -368,8 +368,10 @@ class PhysicsAnimator<T> private constructor(target: T) {
|
|||||||
flingConfigCopy.startVelocity = when {
|
flingConfigCopy.startVelocity = when {
|
||||||
distanceToDestination > 0f && startVelocity >= 0f ->
|
distanceToDestination > 0f && startVelocity >= 0f ->
|
||||||
max(velocityToReachDestination, startVelocity)
|
max(velocityToReachDestination, startVelocity)
|
||||||
|
|
||||||
distanceToDestination < 0f && startVelocity <= 0f ->
|
distanceToDestination < 0f && startVelocity <= 0f ->
|
||||||
min(velocityToReachDestination, startVelocity)
|
min(velocityToReachDestination, startVelocity)
|
||||||
|
|
||||||
else -> startVelocity
|
else -> startVelocity
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,11 +90,13 @@ fun RestoreBackupScreen(
|
|||||||
) {
|
) {
|
||||||
when (uiState) {
|
when (uiState) {
|
||||||
is RestoreBackupUiState.Success -> RestoreBackupOptions(isPortrait, uiState.backup)
|
is RestoreBackupUiState.Success -> RestoreBackupOptions(isPortrait, uiState.backup)
|
||||||
|
|
||||||
is RestoreBackupUiState.Loading -> {
|
is RestoreBackupUiState.Loading -> {
|
||||||
Box(modifier = Modifier.fillMaxSize()) {
|
Box(modifier = Modifier.fillMaxSize()) {
|
||||||
CircularProgressIndicator(modifier = Modifier.align(Alignment.Center))
|
CircularProgressIndicator(modifier = Modifier.align(Alignment.Center))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is RestoreBackupUiState.Error -> {
|
is RestoreBackupUiState.Error -> {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val backDispatcher = LocalOnBackPressedDispatcherOwner.current?.onBackPressedDispatcher
|
val backDispatcher = LocalOnBackPressedDispatcherOwner.current?.onBackPressedDispatcher
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.UserHandle
|
import android.os.UserHandle
|
||||||
import android.util.Pair
|
import android.util.Pair
|
||||||
|
import com.android.launcher3.InvariantDeviceProfile
|
||||||
import com.android.launcher3.LauncherAppState
|
import com.android.launcher3.LauncherAppState
|
||||||
import com.android.launcher3.LauncherModel
|
import com.android.launcher3.LauncherModel
|
||||||
import com.android.launcher3.LauncherSettings
|
import com.android.launcher3.LauncherSettings
|
||||||
@@ -34,8 +35,8 @@ class AddFoldersWithItemsTask(
|
|||||||
) {
|
) {
|
||||||
val context = taskController.context
|
val context = taskController.context
|
||||||
|
|
||||||
val idp = LauncherAppState.getInstance(context).invariantDeviceProfile
|
val idp = InvariantDeviceProfile.INSTANCE.get(context)
|
||||||
val model = LauncherAppState.getInstance(context).model;
|
val model = LauncherAppState.getInstance(context).model
|
||||||
val itemSpaceFinder = WorkspaceItemSpaceFinder(dataModel, idp, model)
|
val itemSpaceFinder = WorkspaceItemSpaceFinder(dataModel, idp, model)
|
||||||
|
|
||||||
if (folders.isEmpty()) {
|
if (folders.isEmpty()) {
|
||||||
@@ -46,12 +47,13 @@ class AddFoldersWithItemsTask(
|
|||||||
val addedWorkspaceScreensFinal = IntArray()
|
val addedWorkspaceScreensFinal = IntArray()
|
||||||
|
|
||||||
synchronized(dataModel) {
|
synchronized(dataModel) {
|
||||||
|
val workspaceScreens = dataModel.itemsIdMap.collectWorkspaceScreens()
|
||||||
val modelWriter = taskController.getModelWriter()
|
val modelWriter = taskController.getModelWriter()
|
||||||
|
|
||||||
folders.forEach { folderInfo ->
|
folders.forEach { folderInfo ->
|
||||||
// Find space for the folder
|
// Find space for the folder
|
||||||
val coords = itemSpaceFinder.findSpaceForItem(
|
val coords = itemSpaceFinder.findSpaceForItem(
|
||||||
dataModel.itemsIdMap.collectWorkspaceScreens(),
|
workspaceScreens,
|
||||||
addedWorkspaceScreensFinal,
|
addedWorkspaceScreensFinal,
|
||||||
addedItemsFinal,
|
addedItemsFinal,
|
||||||
folderInfo.spanX,
|
folderInfo.spanX,
|
||||||
|
|||||||
@@ -29,12 +29,16 @@ object LineParser {
|
|||||||
return when (line[0]) {
|
return when (line[0]) {
|
||||||
// Comment
|
// Comment
|
||||||
'#' -> Rules.NONE
|
'#' -> Rules.NONE
|
||||||
|
|
||||||
// Version declaration
|
// Version declaration
|
||||||
'$' -> Rules.Version(line.rest.toInt())
|
'$' -> Rules.Version(line.rest.toInt())
|
||||||
|
|
||||||
// Intent action
|
// Intent action
|
||||||
':' -> Rules.IntentAction(line.rest)
|
':' -> Rules.IntentAction(line.rest)
|
||||||
|
|
||||||
// Intent category
|
// Intent category
|
||||||
';' -> Rules.IntentCategory(line.rest)
|
';' -> Rules.IntentCategory(line.rest)
|
||||||
|
|
||||||
// Code rule
|
// Code rule
|
||||||
'&' -> {
|
'&' -> {
|
||||||
val parts = line.rest.split("|")
|
val parts = line.rest.split("|")
|
||||||
@@ -42,6 +46,7 @@ object LineParser {
|
|||||||
val args = if (parts.size > 1) parts.subList(1, parts.size) else emptyList()
|
val args = if (parts.size > 1) parts.subList(1, parts.size) else emptyList()
|
||||||
Rules.CodeRule(ruleName, args.toTypedArray())
|
Rules.CodeRule(ruleName, args.toTypedArray())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Package
|
// Package
|
||||||
else -> if (!line[0].isLetter()) {
|
else -> if (!line[0].isLetter()) {
|
||||||
throw FlowerpotFormatException("Unknown rule identifier '${line[0]}' for version $version")
|
throw FlowerpotFormatException("Unknown rule identifier '${line[0]}' for version $version")
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ abstract class DirectionalGestureListener(ctx: Context?) : OnTouchListener {
|
|||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldReactToSwipe(diffX, velocityX) -> {
|
shouldReactToSwipe(diffX, velocityX) -> {
|
||||||
if (diffX > 0) {
|
if (diffX > 0) {
|
||||||
Log.d("GESTURE_DETECTION", "Swipe Right Detected")
|
Log.d("GESTURE_DETECTION", "Swipe Right Detected")
|
||||||
@@ -59,6 +60,7 @@ abstract class DirectionalGestureListener(ctx: Context?) : OnTouchListener {
|
|||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class OpenAppGestureHandler(
|
|||||||
null,
|
null,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
is OpenAppTarget.Shortcut -> Unit
|
is OpenAppTarget.Shortcut -> Unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ class CustomIconPack(context: Context, packPackageName: String) : IconPack(conte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"dynamic-clock" -> {
|
"dynamic-clock" -> {
|
||||||
val drawableName = parseXml["drawable"]
|
val drawableName = parseXml["drawable"]
|
||||||
if (drawableName != null) {
|
if (drawableName != null) {
|
||||||
@@ -154,6 +155,7 @@ class CustomIconPack(context: Context, packPackageName: String) : IconPack(conte
|
|||||||
endCategory()
|
endCategory()
|
||||||
currentTitle = title
|
currentTitle = title
|
||||||
}
|
}
|
||||||
|
|
||||||
"item" -> {
|
"item" -> {
|
||||||
val drawableName = parser["drawable"] ?: continue
|
val drawableName = parser["drawable"] ?: continue
|
||||||
val resId = getDrawableId(drawableName)
|
val resId = getDrawableId(drawableName)
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ class LawnchairIconProvider @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ACTION_DATE_CHANGED -> {
|
ACTION_DATE_CHANGED -> {
|
||||||
context.getSystemService<UserManager>()?.userProfiles?.forEach { user ->
|
context.getSystemService<UserManager>()?.userProfiles?.forEach { user ->
|
||||||
iconPack.getCalendars().forEach { componentName ->
|
iconPack.getCalendars().forEach { componentName ->
|
||||||
|
|||||||
@@ -73,10 +73,15 @@ class SharedPreferencesMigration(private val context: Context) {
|
|||||||
val newKey = keys[key] ?: key
|
val newKey = keys[key] ?: key
|
||||||
when (value) {
|
when (value) {
|
||||||
is Boolean -> mutablePreferences[booleanPreferencesKey(newKey)] = value
|
is Boolean -> mutablePreferences[booleanPreferencesKey(newKey)] = value
|
||||||
|
|
||||||
is Float -> mutablePreferences[floatPreferencesKey(newKey)] = value
|
is Float -> mutablePreferences[floatPreferencesKey(newKey)] = value
|
||||||
|
|
||||||
is Int -> mutablePreferences[intPreferencesKey(newKey)] = value
|
is Int -> mutablePreferences[intPreferencesKey(newKey)] = value
|
||||||
|
|
||||||
is Long -> mutablePreferences[longPreferencesKey(newKey)] = value
|
is Long -> mutablePreferences[longPreferencesKey(newKey)] = value
|
||||||
|
|
||||||
is String -> mutablePreferences[stringPreferencesKey(newKey)] = value
|
is String -> mutablePreferences[stringPreferencesKey(newKey)] = value
|
||||||
|
|
||||||
is Set<*> -> {
|
is Set<*> -> {
|
||||||
mutablePreferences[stringSetPreferencesKey(newKey)] = value as Set<String>
|
mutablePreferences[stringSetPreferencesKey(newKey)] = value as Set<String>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ class SearchTargetFactory(
|
|||||||
MediaStore.Files.getContentUri("external"),
|
MediaStore.Files.getContentUri("external"),
|
||||||
info.fileId,
|
info.fileId,
|
||||||
)
|
)
|
||||||
|
|
||||||
is FolderInfo -> File(info.path).file2Uri()
|
is FolderInfo -> File(info.path).file2Uri()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ sealed class LawnchairSearchAlgorithm(
|
|||||||
)
|
)
|
||||||
|
|
||||||
searchAlgorithm == LOCAL_SEARCH -> LawnchairLocalSearchAlgorithm(context)
|
searchAlgorithm == LOCAL_SEARCH -> LawnchairLocalSearchAlgorithm(context)
|
||||||
|
|
||||||
else -> LawnchairAppSearchAlgorithm(context)
|
else -> LawnchairAppSearchAlgorithm(context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,12 +59,14 @@ fun Sequence<AppInfo>.filterHiddenApps(
|
|||||||
HiddenAppsInSearch.ALWAYS -> {
|
HiddenAppsInSearch.ALWAYS -> {
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
HiddenAppsInSearch.IF_NAME_TYPED -> {
|
HiddenAppsInSearch.IF_NAME_TYPED -> {
|
||||||
filter {
|
filter {
|
||||||
it.toComponentKey().toString() !in hiddenApps ||
|
it.toComponentKey().toString() !in hiddenApps ||
|
||||||
it.title.toString().lowercase(Locale.getDefault()) == query
|
it.title.toString().lowercase(Locale.getDefault()) == query
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
filter { it.toComponentKey().toString() !in hiddenApps }
|
filter { it.toComponentKey().toString() !in hiddenApps }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,15 @@ data class FileInfo(
|
|||||||
@get:DrawableRes
|
@get:DrawableRes
|
||||||
val iconRes = when (val mime = mimeType.orEmpty()) {
|
val iconRes = when (val mime = mimeType.orEmpty()) {
|
||||||
in imageFileTypes.values -> R.drawable.ic_file_image
|
in imageFileTypes.values -> R.drawable.ic_file_image
|
||||||
|
|
||||||
in videoFileTypes.values -> R.drawable.ic_file_video
|
in videoFileTypes.values -> R.drawable.ic_file_video
|
||||||
|
|
||||||
in audioFileTypes.values -> R.drawable.ic_file_music
|
in audioFileTypes.values -> R.drawable.ic_file_music
|
||||||
|
|
||||||
in androidPkgTypes.values -> R.drawable.ic_file_app
|
in androidPkgTypes.values -> R.drawable.ic_file_app
|
||||||
|
|
||||||
in archiveFileTypes.values -> R.drawable.ic_file_zip
|
in archiveFileTypes.values -> R.drawable.ic_file_zip
|
||||||
|
|
||||||
in documentFileTypes.values -> when {
|
in documentFileTypes.values -> when {
|
||||||
mime.contains("excel") || mime.contains("csv") -> R.drawable.ic_file_excel
|
mime.contains("excel") || mime.contains("csv") -> R.drawable.ic_file_excel
|
||||||
mime.contains("word") -> R.drawable.ic_file_word
|
mime.contains("word") -> R.drawable.ic_file_word
|
||||||
@@ -46,6 +51,7 @@ data class FileInfo(
|
|||||||
mime.contains("srt") -> R.drawable.ic_file_subtitle
|
mime.contains("srt") -> R.drawable.ic_file_subtitle
|
||||||
else -> R.drawable.ic_file_text
|
else -> R.drawable.ic_file_text
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> R.drawable.ic_file_unknown
|
else -> R.drawable.ic_file_unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ internal class Evaluator : ExprVisitor<BigDecimal> {
|
|||||||
|
|
||||||
return when (expr.operator.type) {
|
return when (expr.operator.type) {
|
||||||
BAR_BAR -> left or right
|
BAR_BAR -> left or right
|
||||||
|
|
||||||
AMP_AMP -> left and right
|
AMP_AMP -> left and right
|
||||||
|
|
||||||
else -> throw ExpressionException(
|
else -> throw ExpressionException(
|
||||||
"Invalid logical operator '${expr.operator.lexeme}'",
|
"Invalid logical operator '${expr.operator.lexeme}'",
|
||||||
)
|
)
|
||||||
@@ -75,17 +77,29 @@ internal class Evaluator : ExprVisitor<BigDecimal> {
|
|||||||
|
|
||||||
return when (expr.operator.type) {
|
return when (expr.operator.type) {
|
||||||
PLUS -> left + right
|
PLUS -> left + right
|
||||||
|
|
||||||
MINUS -> left - right
|
MINUS -> left - right
|
||||||
|
|
||||||
STAR -> left * right
|
STAR -> left * right
|
||||||
|
|
||||||
SLASH -> left.divide(right, mathContext)
|
SLASH -> left.divide(right, mathContext)
|
||||||
|
|
||||||
MODULO -> left.remainder(right, mathContext)
|
MODULO -> left.remainder(right, mathContext)
|
||||||
|
|
||||||
EXPONENT -> left pow right
|
EXPONENT -> left pow right
|
||||||
|
|
||||||
EQUAL_EQUAL -> (left == right).toBigDecimal()
|
EQUAL_EQUAL -> (left == right).toBigDecimal()
|
||||||
|
|
||||||
NOT_EQUAL -> (left != right).toBigDecimal()
|
NOT_EQUAL -> (left != right).toBigDecimal()
|
||||||
|
|
||||||
GREATER -> (left > right).toBigDecimal()
|
GREATER -> (left > right).toBigDecimal()
|
||||||
|
|
||||||
GREATER_EQUAL -> (left >= right).toBigDecimal()
|
GREATER_EQUAL -> (left >= right).toBigDecimal()
|
||||||
|
|
||||||
LESS -> (left < right).toBigDecimal()
|
LESS -> (left < right).toBigDecimal()
|
||||||
|
|
||||||
LESS_EQUAL -> (left <= right).toBigDecimal()
|
LESS_EQUAL -> (left <= right).toBigDecimal()
|
||||||
|
|
||||||
else -> throw ExpressionException(
|
else -> throw ExpressionException(
|
||||||
"Invalid binary operator '${expr.operator.lexeme}'",
|
"Invalid binary operator '${expr.operator.lexeme}'",
|
||||||
)
|
)
|
||||||
@@ -99,9 +113,11 @@ internal class Evaluator : ExprVisitor<BigDecimal> {
|
|||||||
MINUS -> {
|
MINUS -> {
|
||||||
right.negate()
|
right.negate()
|
||||||
}
|
}
|
||||||
|
|
||||||
SQUARE_ROOT -> {
|
SQUARE_ROOT -> {
|
||||||
right.pow(BigDecimal(0.5))
|
right.pow(BigDecimal(0.5))
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> throw ExpressionException("Invalid unary operator")
|
else -> throw ExpressionException("Invalid unary operator")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,22 +60,39 @@ internal class Scanner(
|
|||||||
-> {
|
-> {
|
||||||
// Ignore whitespace.
|
// Ignore whitespace.
|
||||||
}
|
}
|
||||||
|
|
||||||
'+' -> addToken(PLUS)
|
'+' -> addToken(PLUS)
|
||||||
|
|
||||||
'-' -> addToken(MINUS)
|
'-' -> addToken(MINUS)
|
||||||
|
|
||||||
'*' -> addToken(STAR)
|
'*' -> addToken(STAR)
|
||||||
|
|
||||||
'/' -> addToken(SLASH)
|
'/' -> addToken(SLASH)
|
||||||
|
|
||||||
'%' -> addToken(MODULO)
|
'%' -> addToken(MODULO)
|
||||||
|
|
||||||
'^' -> addToken(EXPONENT)
|
'^' -> addToken(EXPONENT)
|
||||||
|
|
||||||
'√' -> addToken(SQUARE_ROOT)
|
'√' -> addToken(SQUARE_ROOT)
|
||||||
|
|
||||||
'=' -> if (match('=')) addToken(EQUAL_EQUAL) else addToken(ASSIGN)
|
'=' -> if (match('=')) addToken(EQUAL_EQUAL) else addToken(ASSIGN)
|
||||||
|
|
||||||
'!' -> if (match('=')) addToken(NOT_EQUAL) else invalidToken(c)
|
'!' -> if (match('=')) addToken(NOT_EQUAL) else invalidToken(c)
|
||||||
|
|
||||||
'>' -> if (match('=')) addToken(GREATER_EQUAL) else addToken(GREATER)
|
'>' -> if (match('=')) addToken(GREATER_EQUAL) else addToken(GREATER)
|
||||||
|
|
||||||
'<' -> if (match('=')) addToken(LESS_EQUAL) else addToken(LESS)
|
'<' -> if (match('=')) addToken(LESS_EQUAL) else addToken(LESS)
|
||||||
|
|
||||||
'|' -> if (match('|')) addToken(BAR_BAR) else invalidToken(c)
|
'|' -> if (match('|')) addToken(BAR_BAR) else invalidToken(c)
|
||||||
|
|
||||||
'&' -> if (match('&')) addToken(AMP_AMP) else invalidToken(c)
|
'&' -> if (match('&')) addToken(AMP_AMP) else invalidToken(c)
|
||||||
|
|
||||||
',' -> addToken(COMMA)
|
',' -> addToken(COMMA)
|
||||||
|
|
||||||
'(' -> addToken(LEFT_PAREN)
|
'(' -> addToken(LEFT_PAREN)
|
||||||
|
|
||||||
')' -> addToken(RIGHT_PAREN)
|
')' -> addToken(RIGHT_PAREN)
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
when {
|
when {
|
||||||
c.isDigit() -> number()
|
c.isDigit() -> number()
|
||||||
|
|||||||
@@ -110,9 +110,11 @@ class BcSmartspaceCard @JvmOverloads constructor(
|
|||||||
headerAction.hasIntent -> {
|
headerAction.hasIntent -> {
|
||||||
BcSmartSpaceUtil.setOnClickListener(this, headerAction, null, "BcSmartspaceCard")
|
BcSmartSpaceUtil.setOnClickListener(this, headerAction, null, "BcSmartspaceCard")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseAction.hasIntent -> {
|
baseAction.hasIntent -> {
|
||||||
BcSmartSpaceUtil.setOnClickListener(this, baseAction, null, "BcSmartspaceCard")
|
BcSmartSpaceUtil.setOnClickListener(this, baseAction, null, "BcSmartspaceCard")
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
BcSmartSpaceUtil.setOnClickListener(this, headerAction, null, "BcSmartspaceCard")
|
BcSmartSpaceUtil.setOnClickListener(this, headerAction, null, "BcSmartspaceCard")
|
||||||
}
|
}
|
||||||
@@ -171,11 +173,13 @@ class BcSmartspaceCard @JvmOverloads constructor(
|
|||||||
) {
|
) {
|
||||||
textView.contentDescription = when {
|
textView.contentDescription = when {
|
||||||
title.isNullOrEmpty() -> contentDescription
|
title.isNullOrEmpty() -> contentDescription
|
||||||
|
|
||||||
!contentDescription.isNullOrEmpty() -> context.getString(
|
!contentDescription.isNullOrEmpty() -> context.getString(
|
||||||
R.string.generic_smartspace_concatenated_desc,
|
R.string.generic_smartspace_concatenated_desc,
|
||||||
contentDescription,
|
contentDescription,
|
||||||
title,
|
title,
|
||||||
)
|
)
|
||||||
|
|
||||||
else -> title
|
else -> title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,12 @@ open class DoubleShadowTextView @JvmOverloads constructor(
|
|||||||
paint.clearShadowLayer()
|
paint.clearShadowLayer()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
ambientShadowAlpha > 0 && keyShadowAlpha == 0 -> {
|
ambientShadowAlpha > 0 && keyShadowAlpha == 0 -> {
|
||||||
paint.setShadowLayer(shadowInfo.ambientShadowBlur, 0f, 0f, shadowInfo.ambientShadowColor)
|
paint.setShadowLayer(shadowInfo.ambientShadowBlur, 0f, 0f, shadowInfo.ambientShadowColor)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
keyShadowAlpha > 0 && ambientShadowAlpha == 0 -> {
|
keyShadowAlpha > 0 && ambientShadowAlpha == 0 -> {
|
||||||
paint.setShadowLayer(
|
paint.setShadowLayer(
|
||||||
shadowInfo.keyShadowBlur,
|
shadowInfo.keyShadowBlur,
|
||||||
@@ -47,6 +49,7 @@ open class DoubleShadowTextView @JvmOverloads constructor(
|
|||||||
)
|
)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class InterceptingViewPager @JvmOverloads constructor(
|
|||||||
postDelayed(longPressCallback, ViewConfiguration.getLongPressTimeout().toLong())
|
postDelayed(longPressCallback, ViewConfiguration.getLongPressTimeout().toLong())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||||
cancelScheduledLongPress()
|
cancelScheduledLongPress()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,11 +90,14 @@ class ThemeProvider @Inject constructor(
|
|||||||
|
|
||||||
val colorScheme get() = when (val accentColor = this.accentColor) {
|
val colorScheme get() = when (val accentColor = this.accentColor) {
|
||||||
is ColorOption.SystemAccent -> systemColorScheme
|
is ColorOption.SystemAccent -> systemColorScheme
|
||||||
|
|
||||||
is ColorOption.WallpaperPrimary -> {
|
is ColorOption.WallpaperPrimary -> {
|
||||||
val wallpaperPrimary = wallpaperManager.wallpaperColors?.primaryColor
|
val wallpaperPrimary = wallpaperManager.wallpaperColors?.primaryColor
|
||||||
getColorScheme(wallpaperPrimary ?: ColorOption.LawnchairBlue.color, colorStyle.style)
|
getColorScheme(wallpaperPrimary ?: ColorOption.LawnchairBlue.color, colorStyle.style)
|
||||||
}
|
}
|
||||||
|
|
||||||
is ColorOption.CustomColor -> getColorScheme(accentColor.color, colorStyle.style)
|
is ColorOption.CustomColor -> getColorScheme(accentColor.color, colorStyle.style)
|
||||||
|
|
||||||
else -> getColorScheme(ColorOption.LawnchairBlue.color, colorStyle.style)
|
else -> getColorScheme(ColorOption.LawnchairBlue.color, colorStyle.style)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ private data class Shimmer(
|
|||||||
fraction = progress / progressForMaxAlpha,
|
fraction = progress / progressForMaxAlpha,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// From ProgressForOpaqueAlpha..1f we animate from 1..0
|
// From ProgressForOpaqueAlpha..1f we animate from 1..0
|
||||||
else -> {
|
else -> {
|
||||||
lerp(
|
lerp(
|
||||||
|
|||||||
@@ -149,34 +149,42 @@ object LauncherOptionsPopup {
|
|||||||
icon = R.drawable.ic_wallpaper,
|
icon = R.drawable.ic_wallpaper,
|
||||||
isCarousel = true,
|
isCarousel = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
"lock" -> LauncherOptionMetadata(
|
"lock" -> LauncherOptionMetadata(
|
||||||
label = R.string.home_screen_lock,
|
label = R.string.home_screen_lock,
|
||||||
icon = R.drawable.ic_lock,
|
icon = R.drawable.ic_lock,
|
||||||
)
|
)
|
||||||
|
|
||||||
"sys_settings" -> LauncherOptionMetadata(
|
"sys_settings" -> LauncherOptionMetadata(
|
||||||
label = R.string.system_settings,
|
label = R.string.system_settings,
|
||||||
icon = R.drawable.ic_setting,
|
icon = R.drawable.ic_setting,
|
||||||
)
|
)
|
||||||
|
|
||||||
"edit_mode" -> LauncherOptionMetadata(
|
"edit_mode" -> LauncherOptionMetadata(
|
||||||
label = R.string.edit_home_screen,
|
label = R.string.edit_home_screen,
|
||||||
icon = R.drawable.enter_home_gardening_icon,
|
icon = R.drawable.enter_home_gardening_icon,
|
||||||
)
|
)
|
||||||
|
|
||||||
"wallpaper" -> LauncherOptionMetadata(
|
"wallpaper" -> LauncherOptionMetadata(
|
||||||
label = R.string.styles_wallpaper_button_text,
|
label = R.string.styles_wallpaper_button_text,
|
||||||
icon = R.drawable.ic_palette,
|
icon = R.drawable.ic_palette,
|
||||||
)
|
)
|
||||||
|
|
||||||
"widgets" -> LauncherOptionMetadata(
|
"widgets" -> LauncherOptionMetadata(
|
||||||
label = R.string.widget_button_text,
|
label = R.string.widget_button_text,
|
||||||
icon = R.drawable.ic_widget,
|
icon = R.drawable.ic_widget,
|
||||||
)
|
)
|
||||||
|
|
||||||
"all_apps" -> LauncherOptionMetadata(
|
"all_apps" -> LauncherOptionMetadata(
|
||||||
label = R.string.all_apps_button_label,
|
label = R.string.all_apps_button_label,
|
||||||
icon = R.drawable.ic_apps,
|
icon = R.drawable.ic_apps,
|
||||||
)
|
)
|
||||||
|
|
||||||
"home_settings" -> LauncherOptionMetadata(
|
"home_settings" -> LauncherOptionMetadata(
|
||||||
label = R.string.settings_button_text,
|
label = R.string.settings_button_text,
|
||||||
icon = R.drawable.ic_home_screen,
|
icon = R.drawable.ic_home_screen,
|
||||||
)
|
)
|
||||||
|
|
||||||
else -> throw IllegalArgumentException("invalid popup option")
|
else -> throw IllegalArgumentException("invalid popup option")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ private fun PreferenceScreen(
|
|||||||
displayFeatures = displayFeatures,
|
displayFeatures = displayFeatures,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
isExpandedScreen -> {
|
isExpandedScreen -> {
|
||||||
Surface(
|
Surface(
|
||||||
color = MaterialTheme.colorScheme.surface,
|
color = MaterialTheme.colorScheme.surface,
|
||||||
@@ -166,6 +167,7 @@ private fun PreferenceScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
moveableNavHost()
|
moveableNavHost()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class NightlyBuildsRepository(
|
|||||||
is IOException -> {
|
is IOException -> {
|
||||||
Log.e(TAG, "Network error during update check", e)
|
Log.e(TAG, "Network error during update check", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
Log.e(TAG, "Failed to check for update", e)
|
Log.e(TAG, "Failed to check for update", e)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,9 +32,11 @@ fun UpdateSection(
|
|||||||
) {
|
) {
|
||||||
when (updateState) {
|
when (updateState) {
|
||||||
UpdateState.Hidden -> { /* Render nothing */ }
|
UpdateState.Hidden -> { /* Render nothing */ }
|
||||||
|
|
||||||
UpdateState.Checking -> {
|
UpdateState.Checking -> {
|
||||||
CircularProgressIndicator(modifier = Modifier.padding(top = 8.dp))
|
CircularProgressIndicator(modifier = Modifier.padding(top = 8.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateState.UpToDate -> {
|
UpdateState.UpToDate -> {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pro_updated),
|
text = stringResource(R.string.pro_updated),
|
||||||
@@ -43,6 +45,7 @@ fun UpdateSection(
|
|||||||
modifier = Modifier.padding(top = 8.dp),
|
modifier = Modifier.padding(top = 8.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
is UpdateState.Available -> {
|
is UpdateState.Available -> {
|
||||||
Button(
|
Button(
|
||||||
onClick = onViewChanges,
|
onClick = onViewChanges,
|
||||||
@@ -51,6 +54,7 @@ fun UpdateSection(
|
|||||||
Text(text = stringResource(R.string.download_update))
|
Text(text = stringResource(R.string.download_update))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is UpdateState.Downloading -> {
|
is UpdateState.Downloading -> {
|
||||||
LinearProgressIndicator(
|
LinearProgressIndicator(
|
||||||
progress = { updateState.progress },
|
progress = { updateState.progress },
|
||||||
@@ -63,6 +67,7 @@ fun UpdateSection(
|
|||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
is UpdateState.Downloaded -> {
|
is UpdateState.Downloaded -> {
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
@@ -73,6 +78,7 @@ fun UpdateSection(
|
|||||||
Text(text = stringResource(R.string.install_update))
|
Text(text = stringResource(R.string.install_update))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateState.Failed -> {
|
UpdateState.Failed -> {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.update_check_failed),
|
text = stringResource(R.string.update_check_failed),
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ private fun AnnouncementItemContent(
|
|||||||
}
|
}
|
||||||
|
|
||||||
SwipeToDismissBoxValue.EndToStart -> return@rememberSwipeToDismissBoxState false
|
SwipeToDismissBoxValue.EndToStart -> return@rememberSwipeToDismissBoxState false
|
||||||
|
|
||||||
SwipeToDismissBoxValue.Settled -> return@rememberSwipeToDismissBoxState false
|
SwipeToDismissBoxValue.Settled -> return@rememberSwipeToDismissBoxState false
|
||||||
}
|
}
|
||||||
return@rememberSwipeToDismissBoxState true
|
return@rememberSwipeToDismissBoxState true
|
||||||
@@ -180,7 +181,9 @@ private fun AnnouncementItemContent(
|
|||||||
|
|
||||||
fun calculateAlpha(progress: Float): Float {
|
fun calculateAlpha(progress: Float): Float {
|
||||||
return when {
|
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
|
else -> 1f - (progress - 0.5f) * 2 // Fade out linearly from halfway to the end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ fun wallpaperDrawable(
|
|||||||
) {
|
) {
|
||||||
value = when {
|
value = when {
|
||||||
wallpaperInfo != null -> wallpaperInfo.loadThumbnail(context.packageManager)
|
wallpaperInfo != null -> wallpaperInfo.loadThumbnail(context.packageManager)
|
||||||
|
|
||||||
hasPermission -> {
|
hasPermission -> {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
wallpaperManager.drawable?.let {
|
wallpaperManager.drawable?.let {
|
||||||
@@ -141,6 +142,7 @@ fun wallpaperDrawable(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -144,6 +144,7 @@ fun ColorSelection(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
CustomColorPicker(
|
CustomColorPicker(
|
||||||
selectedColor = selectedColor.intValue,
|
selectedColor = selectedColor.intValue,
|
||||||
|
|||||||
+1
@@ -185,6 +185,7 @@ fun CustomColorPicker(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
RgbColorPicker(
|
RgbColorPicker(
|
||||||
selectedColor = selectedColor,
|
selectedColor = selectedColor,
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ private class NestedScrollStretchConnection(context: Context, invalidate: Runnab
|
|||||||
val availableY = available.y
|
val availableY = available.y
|
||||||
when {
|
when {
|
||||||
source != NestedScrollSource.UserInput || height == 0 -> return Offset.Zero
|
source != NestedScrollSource.UserInput || height == 0 -> return Offset.Zero
|
||||||
|
|
||||||
availableY != 0f -> {
|
availableY != 0f -> {
|
||||||
if (availableY < 0f) {
|
if (availableY < 0f) {
|
||||||
val consumed = topEdgeEffect.onPullDistance(availableY / height, 0f)
|
val consumed = topEdgeEffect.onPullDistance(availableY / height, 0f)
|
||||||
@@ -117,6 +118,7 @@ private class NestedScrollStretchConnection(context: Context, invalidate: Runnab
|
|||||||
val availableY = available.y
|
val availableY = available.y
|
||||||
when {
|
when {
|
||||||
source != NestedScrollSource.UserInput || height == 0 -> return Offset.Zero
|
source != NestedScrollSource.UserInput || height == 0 -> return Offset.Zero
|
||||||
|
|
||||||
availableY != 0f -> {
|
availableY != 0f -> {
|
||||||
if (availableY > 0f) {
|
if (availableY > 0f) {
|
||||||
topEdgeEffect.onPull(availableY / height)
|
topEdgeEffect.onPull(availableY / height)
|
||||||
@@ -125,6 +127,7 @@ private class NestedScrollStretchConnection(context: Context, invalidate: Runnab
|
|||||||
bottomEdgeEffect.onPull(-availableY / height)
|
bottomEdgeEffect.onPull(-availableY / height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
topEdgeEffect.onRelease()
|
topEdgeEffect.onRelease()
|
||||||
bottomEdgeEffect.onRelease()
|
bottomEdgeEffect.onRelease()
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ fun TwoTabPreferenceLayout(
|
|||||||
firstPageContent()
|
firstPageContent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
Column {
|
Column {
|
||||||
secondPageContent()
|
secondPageContent()
|
||||||
|
|||||||
+3
@@ -254,6 +254,7 @@ fun GenericSearchProviderPreference(
|
|||||||
description = stringResource(id = R.string.fuzzy_search_desc),
|
description = stringResource(id = R.string.fuzzy_search_desc),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchProviderId.WEB -> {
|
SearchProviderId.WEB -> {
|
||||||
SliderPreference(
|
SliderPreference(
|
||||||
label = stringResource(id = R.string.max_web_suggestion_delay),
|
label = stringResource(id = R.string.max_web_suggestion_delay),
|
||||||
@@ -269,6 +270,7 @@ fun GenericSearchProviderPreference(
|
|||||||
suggestionsUrlAdapter = prefs2.webSuggestionProviderSuggestionsUrl.getAdapter(),
|
suggestionsUrlAdapter = prefs2.webSuggestionProviderSuggestionsUrl.getAdapter(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchProviderId.HISTORY -> {
|
SearchProviderId.HISTORY -> {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
|
|
||||||
@@ -285,6 +287,7 @@ fun GenericSearchProviderPreference(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {}
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -240,6 +240,7 @@ private fun FontSelectionItem(
|
|||||||
VariantDropdown(adapter = adapter, family = family)
|
VariantDropdown(adapter = adapter, family = family)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete != null -> {
|
onDelete != null -> {
|
||||||
{
|
{
|
||||||
IconButton(
|
IconButton(
|
||||||
@@ -255,6 +256,7 @@ private fun FontSelectionItem(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> null
|
else -> null
|
||||||
},
|
},
|
||||||
applyPaddings = false,
|
applyPaddings = false,
|
||||||
|
|||||||
@@ -238,6 +238,7 @@ private fun NotificationDotColorContrastWarnings(
|
|||||||
is ColorOption.WallpaperPrimary,
|
is ColorOption.WallpaperPrimary,
|
||||||
is ColorOption.Default,
|
is ColorOption.Default,
|
||||||
-> true
|
-> true
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,18 +156,21 @@ private fun LauncherPopupPreview(optionsList: List<LauncherOptionPopupItem>) {
|
|||||||
|
|
||||||
val shape = when {
|
val shape = when {
|
||||||
isSingleItem -> CircleShape
|
isSingleItem -> CircleShape
|
||||||
|
|
||||||
isFirst -> RoundedCornerShape(
|
isFirst -> RoundedCornerShape(
|
||||||
clipRadius.topStart,
|
clipRadius.topStart,
|
||||||
clipRadius.topEnd,
|
clipRadius.topEnd,
|
||||||
defaultCorner,
|
defaultCorner,
|
||||||
defaultCorner,
|
defaultCorner,
|
||||||
)
|
)
|
||||||
|
|
||||||
isLast -> RoundedCornerShape(
|
isLast -> RoundedCornerShape(
|
||||||
defaultCorner,
|
defaultCorner,
|
||||||
defaultCorner,
|
defaultCorner,
|
||||||
clipRadius.bottomStart,
|
clipRadius.bottomStart,
|
||||||
clipRadius.bottomEnd,
|
clipRadius.bottomEnd,
|
||||||
)
|
)
|
||||||
|
|
||||||
else -> RoundedCornerShape(defaultCorner)
|
else -> RoundedCornerShape(defaultCorner)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,9 +81,11 @@ fun SmartspacePreferences(
|
|||||||
LawnchairSmartspace -> {
|
LawnchairSmartspace -> {
|
||||||
LawnchairSmartspaceSettings(smartspaceProvider)
|
LawnchairSmartspaceSettings(smartspaceProvider)
|
||||||
}
|
}
|
||||||
|
|
||||||
Smartspacer -> {
|
Smartspacer -> {
|
||||||
SmartspacerSettings()
|
SmartspacerSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {}
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,11 @@ val isOnePlusStock = checkOnePlusStock()
|
|||||||
private fun checkOnePlusStock(): Boolean = when {
|
private fun checkOnePlusStock(): Boolean = when {
|
||||||
getSystemProperty("ro.rom.version", "")
|
getSystemProperty("ro.rom.version", "")
|
||||||
.contains(Regex("Oxygen OS|Hydrogen OS|O2_BETA|H2_BETA")) -> true
|
.contains(Regex("Oxygen OS|Hydrogen OS|O2_BETA|H2_BETA")) -> true
|
||||||
|
|
||||||
getSystemProperty("ro.oxygen.version", "").isNotEmpty() -> true
|
getSystemProperty("ro.oxygen.version", "").isNotEmpty() -> true
|
||||||
|
|
||||||
getSystemProperty("ro.hydrogen.version", "").isNotEmpty() -> true
|
getSystemProperty("ro.hydrogen.version", "").isNotEmpty() -> true
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,30 +24,37 @@ fun formatShortElapsedTime(context: Context, millis: Long): String? {
|
|||||||
val roundedDays = duration.toDouble(DurationUnit.DAYS).round()
|
val roundedDays = duration.toDouble(DurationUnit.DAYS).round()
|
||||||
measureFormat.format(Measure(roundedDays, MeasureUnit.DAY))
|
measureFormat.format(Measure(roundedDays, MeasureUnit.DAY))
|
||||||
}
|
}
|
||||||
|
|
||||||
days >= 2 || days > 0 && hours == 0 -> {
|
days >= 2 || days > 0 && hours == 0 -> {
|
||||||
val roundedDays = duration.toDouble(DurationUnit.DAYS).round()
|
val roundedDays = duration.toDouble(DurationUnit.DAYS).round()
|
||||||
measureFormat.format(Measure(roundedDays, MeasureUnit.DAY))
|
measureFormat.format(Measure(roundedDays, MeasureUnit.DAY))
|
||||||
}
|
}
|
||||||
|
|
||||||
days > 0 -> measureFormat.formatMeasures(
|
days > 0 -> measureFormat.formatMeasures(
|
||||||
Measure(days, MeasureUnit.DAY),
|
Measure(days, MeasureUnit.DAY),
|
||||||
Measure(hours, MeasureUnit.HOUR),
|
Measure(hours, MeasureUnit.HOUR),
|
||||||
)
|
)
|
||||||
|
|
||||||
hours >= 2 || hours > 0 && minutes == 0 -> {
|
hours >= 2 || hours > 0 && minutes == 0 -> {
|
||||||
val roundedHours = duration.toDouble(DurationUnit.HOURS).round()
|
val roundedHours = duration.toDouble(DurationUnit.HOURS).round()
|
||||||
measureFormat.format(Measure(roundedHours, MeasureUnit.HOUR))
|
measureFormat.format(Measure(roundedHours, MeasureUnit.HOUR))
|
||||||
}
|
}
|
||||||
|
|
||||||
hours > 0 -> measureFormat.formatMeasures(
|
hours > 0 -> measureFormat.formatMeasures(
|
||||||
Measure(hours, MeasureUnit.HOUR),
|
Measure(hours, MeasureUnit.HOUR),
|
||||||
Measure(minutes, MeasureUnit.MINUTE),
|
Measure(minutes, MeasureUnit.MINUTE),
|
||||||
)
|
)
|
||||||
|
|
||||||
minutes >= 2 || minutes > 0 && seconds == 0 -> {
|
minutes >= 2 || minutes > 0 && seconds == 0 -> {
|
||||||
val roundedMinutes = duration.toDouble(DurationUnit.MINUTES).round()
|
val roundedMinutes = duration.toDouble(DurationUnit.MINUTES).round()
|
||||||
measureFormat.format(Measure(roundedMinutes, MeasureUnit.MINUTE))
|
measureFormat.format(Measure(roundedMinutes, MeasureUnit.MINUTE))
|
||||||
}
|
}
|
||||||
|
|
||||||
minutes > 0 -> measureFormat.formatMeasures(
|
minutes > 0 -> measureFormat.formatMeasures(
|
||||||
Measure(minutes, MeasureUnit.MINUTE),
|
Measure(minutes, MeasureUnit.MINUTE),
|
||||||
Measure(seconds, MeasureUnit.SECOND),
|
Measure(seconds, MeasureUnit.SECOND),
|
||||||
)
|
)
|
||||||
|
|
||||||
else -> measureFormat.format(Measure(seconds, MeasureUnit.SECOND))
|
else -> measureFormat.format(Measure(seconds, MeasureUnit.SECOND))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ fun cutOutline(outline: Outline, height: Float, cutTop: Boolean, cutBottom: Bool
|
|||||||
CornerRadius.Zero,
|
CornerRadius.Zero,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
is Outline.Rounded -> Outline.Rounded(
|
is Outline.Rounded -> Outline.Rounded(
|
||||||
RoundRect(
|
RoundRect(
|
||||||
cutRect(outline.roundRect.boundingRect, height, cutTop, cutBottom),
|
cutRect(outline.roundRect.boundingRect, height, cutTop, cutBottom),
|
||||||
@@ -230,6 +231,7 @@ fun cutOutline(outline: Outline, height: Float, cutTop: Boolean, cutBottom: Bool
|
|||||||
outline.roundRect.bottomRightCornerRadius,
|
outline.roundRect.bottomRightCornerRadius,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
else -> outline
|
else -> outline
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,11 +209,13 @@ fun Activity.showFullScreenOverlay(
|
|||||||
overlayView.animateOut(durationOut, onOverlayReady)
|
overlayView.animateOut(durationOut, onOverlayReady)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FullScreenOverlayMode.SUCK_IN -> {
|
FullScreenOverlayMode.SUCK_IN -> {
|
||||||
overlayView.suckAnimation(durationOut) {
|
overlayView.suckAnimation(durationOut) {
|
||||||
onOverlayReady()
|
onOverlayReady()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FullScreenOverlayMode.NONE -> {
|
FullScreenOverlayMode.NONE -> {
|
||||||
targetRootView?.removeView(overlayView)
|
targetRootView?.removeView(overlayView)
|
||||||
onOverlayReady()
|
onOverlayReady()
|
||||||
|
|||||||
@@ -445,9 +445,11 @@ class ColorScheme(
|
|||||||
degrees < 0 -> {
|
degrees < 0 -> {
|
||||||
(degrees % 360) + 360
|
(degrees % 360) + 360
|
||||||
}
|
}
|
||||||
|
|
||||||
degrees >= 360 -> {
|
degrees >= 360 -> {
|
||||||
degrees % 360
|
degrees % 360
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
degrees
|
degrees
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ public class PackageUpdatedTask implements ModelUpdateTask {
|
|||||||
if (PreferenceExtensionsKt.firstBlocking(pref2.getDeckLayout())) {
|
if (PreferenceExtensionsKt.firstBlocking(pref2.getDeckLayout())) {
|
||||||
LawndeckManager deckManager = new LawndeckManager(context);
|
LawndeckManager deckManager = new LawndeckManager(context);
|
||||||
ModelWriter modelWriter = taskController.getModelWriter();
|
ModelWriter modelWriter = taskController.getModelWriter();
|
||||||
for (int i = 0; i < N; i++) {
|
for (int i = 0; i < packageCount; i++) {
|
||||||
deckManager.addNewlyInstalledApp(packages[i], mUser, modelWriter, dataModel);
|
deckManager.addNewlyInstalledApp(packages[i], mUser, modelWriter, dataModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user