mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-15 22:33:05 -08:00
Compare commits
1 Commits
fix/addond
...
aviraxp-pa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b25cb4a4e |
@@ -4,9 +4,12 @@ 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
|
||||
@@ -165,8 +168,9 @@ interface LocaleSetting {
|
||||
}
|
||||
|
||||
val useLocaleManager get() =
|
||||
if (isRunningAsStub) Build.VERSION.SDK_INT >= 34
|
||||
else Build.VERSION.SDK_INT >= 33
|
||||
(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
|
||||
|
||||
val instance: LocaleSetting by lazy {
|
||||
// Initialize available locale list
|
||||
|
||||
@@ -137,9 +137,7 @@ case "$1" in
|
||||
# Back up PREINITDEVICE from existing partition before OTA on A-only devices
|
||||
if ! $backuptool_ab; then
|
||||
initialize
|
||||
# Suppress ui_print for this stage
|
||||
ui_print() { return; }
|
||||
get_flags
|
||||
RECOVERYMODE=false
|
||||
find_boot_image
|
||||
$MAGISKBIN/magiskboot unpack "$BOOTIMAGE"
|
||||
$MAGISKBIN/magiskboot cpio ramdisk.cpio "extract .backup/.magisk config.orig"
|
||||
|
||||
Reference in New Issue
Block a user