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_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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Sync Translations
|
||||
uses: crowdin/github-action@v2
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Download translations
|
||||
uses: crowdin/github-action@v2
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Upload Strings
|
||||
uses: crowdin/github-action@v2
|
||||
|
||||
@@ -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:
|
||||
|
||||
+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
|
||||
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
|
||||
|
||||
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!
|
||||
|
||||
(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.
|
||||
|
||||
This release includes 4 new features, and 33 bug fixes,
|
||||
Reimplemented some of Lawnchair features, better sizing of home screen, updated README.md screenshot
|
||||
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:
|
||||
|
||||
+3
-3
@@ -169,7 +169,7 @@ android {
|
||||
* Lawnchair Launcher 16.0 Development 4 Release 1
|
||||
* see CONTRIBUTING.md#versioning-scheme
|
||||
*/
|
||||
versionCode 16_00_04_00_01
|
||||
versionCode 16_00_01_04_01
|
||||
versionName "${versionDisplayName}"
|
||||
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
|
||||
buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\""
|
||||
@@ -514,8 +514,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",
|
||||
|
||||
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"
|
||||
protocVersion = "4.33.1"
|
||||
retrofit = "3.0.0"
|
||||
room = "2.8.3"
|
||||
room = "2.8.4"
|
||||
testRules = "1.7.0"
|
||||
testRunner = "1.7.0"
|
||||
truth = "1.4.5"
|
||||
|
||||
activityCompose = "1.11.0"
|
||||
activityCompose = "1.12.0"
|
||||
airbnbLottie = "6.7.1"
|
||||
androidDesugar = "2.1.5"
|
||||
coil = "2.7.0"
|
||||
composeBom = "2025.11.00"
|
||||
compose = "1.9.4"
|
||||
composeMaterial = "1.9.4"
|
||||
composeMaterial3 = "1.5.0-alpha08"
|
||||
composeBom = "2025.11.01"
|
||||
compose = "1.10.0-rc01"
|
||||
composeMaterial = "1.10.0-rc01"
|
||||
composeMaterial3 = "1.5.0-alpha09"
|
||||
composeMaterialIcons = "1.7.8"
|
||||
composeCompiler = "1.5.15"
|
||||
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"
|
||||
@@ -47,10 +47,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.6"
|
||||
okhttp = "5.3.1"
|
||||
okhttp = "5.3.2"
|
||||
palette = "1.0.0"
|
||||
persianDate = "1.7.1"
|
||||
preference = "1.2.1"
|
||||
@@ -61,7 +61,7 @@ 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.1"
|
||||
baselineprofile = "1.4.1"
|
||||
@@ -69,7 +69,7 @@ kotlin = "2.2.21"
|
||||
protobuf = "0.9.5"
|
||||
licensee = "1.14.1"
|
||||
refine = "4.4.0"
|
||||
spotless = "8.0.0"
|
||||
spotless = "8.1.0"
|
||||
|
||||
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-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.2"
|
||||
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" }
|
||||
@@ -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-compiler = { group = "androidx.compose.compiler", name = "compose-compiler", version.ref = "composeCompiler"}
|
||||
|
||||
# Dagger & Hilt
|
||||
dagger = { group = "com.google.dagger", name = "dagger", 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" }
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.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
|
||||
|
||||
@@ -105,6 +105,7 @@ class BlankActivity : ComponentActivity() {
|
||||
}.launch(requireNotNull(intent.getParcelableExtra("intent")))
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
finish()
|
||||
return
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
@@ -368,8 +368,10 @@ class PhysicsAnimator<T> private constructor(target: T) {
|
||||
flingConfigCopy.startVelocity = when {
|
||||
distanceToDestination > 0f && startVelocity >= 0f ->
|
||||
max(velocityToReachDestination, startVelocity)
|
||||
|
||||
distanceToDestination < 0f && startVelocity <= 0f ->
|
||||
min(velocityToReachDestination, startVelocity)
|
||||
|
||||
else -> startVelocity
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.UserHandle
|
||||
import android.util.Pair
|
||||
import com.android.launcher3.InvariantDeviceProfile
|
||||
import com.android.launcher3.LauncherAppState
|
||||
import com.android.launcher3.LauncherModel
|
||||
import com.android.launcher3.LauncherSettings
|
||||
@@ -34,8 +35,8 @@ class AddFoldersWithItemsTask(
|
||||
) {
|
||||
val context = taskController.context
|
||||
|
||||
val idp = LauncherAppState.getInstance(context).invariantDeviceProfile
|
||||
val model = LauncherAppState.getInstance(context).model;
|
||||
val idp = InvariantDeviceProfile.INSTANCE.get(context)
|
||||
val model = LauncherAppState.getInstance(context).model
|
||||
val itemSpaceFinder = WorkspaceItemSpaceFinder(dataModel, idp, model)
|
||||
|
||||
if (folders.isEmpty()) {
|
||||
@@ -46,12 +47,13 @@ class AddFoldersWithItemsTask(
|
||||
val addedWorkspaceScreensFinal = IntArray()
|
||||
|
||||
synchronized(dataModel) {
|
||||
val workspaceScreens = dataModel.itemsIdMap.collectWorkspaceScreens()
|
||||
val modelWriter = taskController.getModelWriter()
|
||||
|
||||
folders.forEach { folderInfo ->
|
||||
// Find space for the folder
|
||||
val coords = itemSpaceFinder.findSpaceForItem(
|
||||
dataModel.itemsIdMap.collectWorkspaceScreens(),
|
||||
workspaceScreens,
|
||||
addedWorkspaceScreensFinal,
|
||||
addedItemsFinal,
|
||||
folderInfo.spanX,
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ class OpenAppGestureHandler(
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
is OpenAppTarget.Shortcut -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -288,6 +288,7 @@ class LawnchairIconProvider @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ACTION_DATE_CHANGED -> {
|
||||
context.getSystemService<UserManager>()?.userProfiles?.forEach { user ->
|
||||
iconPack.getCalendars().forEach { componentName ->
|
||||
|
||||
@@ -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<String>
|
||||
}
|
||||
|
||||
@@ -294,6 +294,7 @@ class SearchTargetFactory(
|
||||
MediaStore.Files.getContentUri("external"),
|
||||
info.fileId,
|
||||
)
|
||||
|
||||
is FolderInfo -> File(info.path).file2Uri()
|
||||
}
|
||||
|
||||
|
||||
@@ -230,6 +230,7 @@ sealed class LawnchairSearchAlgorithm(
|
||||
)
|
||||
|
||||
searchAlgorithm == LOCAL_SEARCH -> LawnchairLocalSearchAlgorithm(context)
|
||||
|
||||
else -> LawnchairAppSearchAlgorithm(context)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,12 +59,14 @@ fun Sequence<AppInfo>.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 }
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,9 @@ internal class Evaluator : ExprVisitor<BigDecimal> {
|
||||
|
||||
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<BigDecimal> {
|
||||
|
||||
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<BigDecimal> {
|
||||
MINUS -> {
|
||||
right.negate()
|
||||
}
|
||||
|
||||
SQUARE_ROOT -> {
|
||||
right.pow(BigDecimal(0.5))
|
||||
}
|
||||
|
||||
else -> throw ExpressionException("Invalid unary operator")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class InterceptingViewPager @JvmOverloads constructor(
|
||||
postDelayed(longPressCallback, ViewConfiguration.getLongPressTimeout().toLong())
|
||||
}
|
||||
}
|
||||
|
||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||
cancelScheduledLongPress()
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ private data class Shimmer(
|
||||
fraction = progress / progressForMaxAlpha,
|
||||
)
|
||||
}
|
||||
|
||||
// From ProgressForOpaqueAlpha..1f we animate from 1..0
|
||||
else -> {
|
||||
lerp(
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ private fun PreferenceScreen(
|
||||
displayFeatures = displayFeatures,
|
||||
)
|
||||
}
|
||||
|
||||
isExpandedScreen -> {
|
||||
Surface(
|
||||
color = MaterialTheme.colorScheme.surface,
|
||||
@@ -166,6 +167,7 @@ private fun PreferenceScreen(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
moveableNavHost()
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -144,6 +144,7 @@ fun ColorSelection(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
1 -> {
|
||||
CustomColorPicker(
|
||||
selectedColor = selectedColor.intValue,
|
||||
|
||||
+1
@@ -185,6 +185,7 @@ fun CustomColorPicker(
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
1 -> {
|
||||
RgbColorPicker(
|
||||
selectedColor = selectedColor,
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -88,6 +88,7 @@ fun TwoTabPreferenceLayout(
|
||||
firstPageContent()
|
||||
}
|
||||
}
|
||||
|
||||
1 -> {
|
||||
Column {
|
||||
secondPageContent()
|
||||
|
||||
+3
@@ -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 -> {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -238,6 +238,7 @@ private fun NotificationDotColorContrastWarnings(
|
||||
is ColorOption.WallpaperPrimary,
|
||||
is ColorOption.Default,
|
||||
-> true
|
||||
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
||||
@@ -156,18 +156,21 @@ private fun LauncherPopupPreview(optionsList: List<LauncherOptionPopupItem>) {
|
||||
|
||||
val shape = when {
|
||||
isSingleItem -> CircleShape
|
||||
|
||||
isFirst -> RoundedCornerShape(
|
||||
clipRadius.topStart,
|
||||
clipRadius.topEnd,
|
||||
defaultCorner,
|
||||
defaultCorner,
|
||||
)
|
||||
|
||||
isLast -> RoundedCornerShape(
|
||||
defaultCorner,
|
||||
defaultCorner,
|
||||
clipRadius.bottomStart,
|
||||
clipRadius.bottomEnd,
|
||||
)
|
||||
|
||||
else -> RoundedCornerShape(defaultCorner)
|
||||
}
|
||||
|
||||
|
||||
@@ -81,9 +81,11 @@ fun SmartspacePreferences(
|
||||
LawnchairSmartspace -> {
|
||||
LawnchairSmartspaceSettings(smartspaceProvider)
|
||||
}
|
||||
|
||||
Smartspacer -> {
|
||||
SmartspacerSettings()
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,11 +209,13 @@ fun Activity.showFullScreenOverlay(
|
||||
overlayView.animateOut(durationOut, onOverlayReady)
|
||||
}
|
||||
}
|
||||
|
||||
FullScreenOverlayMode.SUCK_IN -> {
|
||||
overlayView.suckAnimation(durationOut) {
|
||||
onOverlayReady()
|
||||
}
|
||||
}
|
||||
|
||||
FullScreenOverlayMode.NONE -> {
|
||||
targetRootView?.removeView(overlayView)
|
||||
onOverlayReady()
|
||||
|
||||
@@ -445,9 +445,11 @@ class ColorScheme(
|
||||
degrees < 0 -> {
|
||||
(degrees % 360) + 360
|
||||
}
|
||||
|
||||
degrees >= 360 -> {
|
||||
degrees % 360
|
||||
}
|
||||
|
||||
else -> {
|
||||
degrees
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ public class PackageUpdatedTask implements ModelUpdateTask {
|
||||
if (PreferenceExtensionsKt.firstBlocking(pref2.getDeckLayout())) {
|
||||
LawndeckManager deckManager = new LawndeckManager(context);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user