Compare commits

..

1 Commits

Author SHA1 Message Date
osm0sis
471d972aac Fix A-only addon.d retaining PREINITDEVICE on 30300+
- broken after 742913ebcb so use get_flags to be more futureproof
2026-01-13 21:47:42 -04:00
2 changed files with 5 additions and 7 deletions

View File

@@ -4,12 +4,9 @@ import android.annotation.SuppressLint
import android.app.LocaleConfig
import android.app.LocaleManager
import android.content.ContextWrapper
import android.content.Intent
import android.content.res.Resources
import android.net.Uri
import android.os.Build
import android.os.LocaleList
import android.provider.Settings
import androidx.annotation.RequiresApi
import com.topjohnwu.magisk.core.AppApkPath
import com.topjohnwu.magisk.core.AppContext
@@ -168,9 +165,8 @@ interface LocaleSetting {
}
val useLocaleManager get() =
(if (isRunningAsStub) Build.VERSION.SDK_INT >= 34 else Build.VERSION.SDK_INT >= 33) &&
Intent(Settings.ACTION_APP_LOCALE_SETTINGS, Uri.fromParts("package", AppContext.packageName, null))
.resolveActivity(AppContext.packageManager) != null
if (isRunningAsStub) Build.VERSION.SDK_INT >= 34
else Build.VERSION.SDK_INT >= 33
val instance: LocaleSetting by lazy {
// Initialize available locale list

View File

@@ -137,7 +137,9 @@ case "$1" in
# Back up PREINITDEVICE from existing partition before OTA on A-only devices
if ! $backuptool_ab; then
initialize
RECOVERYMODE=false
# Suppress ui_print for this stage
ui_print() { return; }
get_flags
find_boot_image
$MAGISKBIN/magiskboot unpack "$BOOTIMAGE"
$MAGISKBIN/magiskboot cpio ramdisk.cpio "extract .backup/.magisk config.orig"