-
Notifications
You must be signed in to change notification settings - Fork 596
feat(updater): add in-app download and install for updates #3147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b0cc326
9652fe9
371dd5a
89c82d6
cb9cbf3
57fe9df
9a3ee3a
a71d96a
9c0a8d2
63c109e
3e36136
4aa37c8
179d697
207d856
06125e5
11aa068
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,27 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Remove testOnly flag in Izzy build since Dhizuku is not available and builds must be distributable --> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:tools="http://schemas.android.com/tools"> | ||
| xmlns:tools="http://schemas.android.com/tools" | ||
| tools:remove="android:testOnly"> | ||
|
|
||
| <!-- Remove updater permission in Izzy build since updater is not available --> | ||
| <uses-permission | ||
| android:name="android.permission.REQUEST_INSTALL_PACKAGES" | ||
| tools:node="remove" /> | ||
|
|
||
| <application> | ||
| <!-- Remove Cast provider in Izzy build since GMS is not available --> | ||
| <meta-data | ||
| android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" | ||
| tools:node="remove" /> | ||
|
|
||
| <!-- Remove updater components in Izzy build since updater is not available --> | ||
| <receiver | ||
| android:name=".utils.updater.InstallReceiver" | ||
| tools:node="remove" /> | ||
|
|
||
| <provider | ||
| android:name="rikka.shizuku.ShizukuProvider" | ||
| tools:node="remove" /> | ||
| </application> | ||
| </manifest> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,7 @@ val SelectedYtmPlaylistsKey = stringPreferencesKey("selectedYtmPlaylists") | |
| val CheckForUpdatesKey = booleanPreferencesKey("checkForUpdates") | ||
| val UpdateNotificationsEnabledKey = booleanPreferencesKey("updateNotifications") | ||
| val LastUpdateCheckTimeKey = longPreferencesKey("lastUpdateCheckTime") | ||
| val InstallerTypeKey = intPreferencesKey("installerType") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C3 '\bInstallerTypeKey\b' app/src/main/kotlin
rg -n -C3 '\.ordinal\b|entries\[[^]]+\]|valueOf\s*\(' app/src/main/kotlinRepository: MetrolistGroup/Metrolist Length of output: 17461 🏁 Script executed: fd -n "Installer.kt" app/src/main/kotlin --exec cat -n {} \;Repository: MetrolistGroup/Metrolist Length of output: 298 🏁 Script executed: fd "Installer.kt" app/src/main/kotlin --exec cat -n {} \;Repository: MetrolistGroup/Metrolist Length of output: 20260 Persist installer choice with a stable identifier. An 🛠️ Suggested direction-val InstallerTypeKey = intPreferencesKey("installerType")
+val InstallerTypeKey = stringPreferencesKey("installerType")Store 🤖 Prompt for AI Agents |
||
|
|
||
| val AudioQualityKey = stringPreferencesKey("audioQuality") | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: MetrolistGroup/Metrolist
Length of output: 1343
🏁 Script executed:
Repository: MetrolistGroup/Metrolist
Length of output: 2551
Scope updater installer dependencies to updater-enabled flavors only.
Lines 287-297 add privileged updater dependencies unconditionally, but the
izzyflavor at Line 74 setsUPDATER_AVAILABLE = false. This causes izzy builds to unnecessarily package updater libraries (Dhizuku, Shizuku, libsu, HiddenApiBypass, Refine) despite disabling the updater feature. Updater-specific APIs are actively imported insrc/main/kotlin/com/metrolist/music/utils/updater/AppInstaller.ktandUpdaterSettings.kt, so these dependencies have real usage. The codebase already uses flavor-scoped dependencies for similar cases (seegmsImplementationfor Google Cast libs), establishing a precedent for this pattern.Suggested fix
🤖 Prompt for AI Agents