mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-05 10:15:31 +08:00
feat: simple support HyperOS
This commit is contained in:
@@ -26,9 +26,9 @@ import com.fankes.miui.notify.const.PackageName
|
|||||||
import com.fankes.miui.notify.data.ConfigData
|
import com.fankes.miui.notify.data.ConfigData
|
||||||
import com.fankes.miui.notify.hook.entity.SystemUIHooker
|
import com.fankes.miui.notify.hook.entity.SystemUIHooker
|
||||||
import com.fankes.miui.notify.utils.factory.isLowerAndroidP
|
import com.fankes.miui.notify.utils.factory.isLowerAndroidP
|
||||||
import com.fankes.miui.notify.utils.factory.isNotMIUI
|
import com.fankes.miui.notify.utils.factory.isNotMiSystem
|
||||||
import com.fankes.miui.notify.utils.factory.isNotSupportMiuiVersion
|
import com.fankes.miui.notify.utils.factory.isNotSupportMiSystemVersion
|
||||||
import com.fankes.miui.notify.utils.factory.miuiVersion
|
import com.fankes.miui.notify.utils.factory.miSystemVersion
|
||||||
import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed
|
import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed
|
||||||
import com.highcapable.yukihookapi.hook.factory.configs
|
import com.highcapable.yukihookapi.hook.factory.configs
|
||||||
import com.highcapable.yukihookapi.hook.factory.encase
|
import com.highcapable.yukihookapi.hook.factory.encase
|
||||||
@@ -51,9 +51,9 @@ object HookEntry : IYukiHookXposedInit {
|
|||||||
loadApp(PackageName.SYSTEMUI) {
|
loadApp(PackageName.SYSTEMUI) {
|
||||||
ConfigData.init(instance = this)
|
ConfigData.init(instance = this)
|
||||||
when {
|
when {
|
||||||
isNotMIUI -> YLog.warn("Aborted Hook -> This System is not MIUI")
|
isNotMiSystem -> YLog.warn("Aborted Hook -> This System is not MIUI or HyperOS")
|
||||||
isLowerAndroidP -> YLog.warn("Aborted Hook -> This System is lower than Android P")
|
isLowerAndroidP -> YLog.warn("Aborted Hook -> This System is lower than Android P")
|
||||||
isNotSupportMiuiVersion -> YLog.warn("Aborted Hook -> This MIUI Version ${miuiVersion.ifBlank { "unknown" }} not supported")
|
isNotSupportMiSystemVersion -> YLog.warn("Aborted Hook -> This System Version ${miSystemVersion.ifBlank { "unknown" }} not supported")
|
||||||
ConfigData.isEnableModule.not() -> YLog.warn("Aborted Hook -> Hook Closed")
|
ConfigData.isEnableModule.not() -> YLog.warn("Aborted Hook -> Hook Closed")
|
||||||
else -> loadHooker(SystemUIHooker)
|
else -> loadHooker(SystemUIHooker)
|
||||||
}
|
}
|
||||||
|
@@ -39,10 +39,13 @@ import com.fankes.miui.notify.utils.factory.hideOrShowLauncherIcon
|
|||||||
import com.fankes.miui.notify.utils.factory.isLauncherIconShowing
|
import com.fankes.miui.notify.utils.factory.isLauncherIconShowing
|
||||||
import com.fankes.miui.notify.utils.factory.isLowerAndroidP
|
import com.fankes.miui.notify.utils.factory.isLowerAndroidP
|
||||||
import com.fankes.miui.notify.utils.factory.isLowerAndroidR
|
import com.fankes.miui.notify.utils.factory.isLowerAndroidR
|
||||||
import com.fankes.miui.notify.utils.factory.isNotMIUI
|
import com.fankes.miui.notify.utils.factory.isMIOS
|
||||||
|
import com.fankes.miui.notify.utils.factory.isMIUI
|
||||||
|
import com.fankes.miui.notify.utils.factory.isNotMiSystem
|
||||||
import com.fankes.miui.notify.utils.factory.isNotNoificationEnabled
|
import com.fankes.miui.notify.utils.factory.isNotNoificationEnabled
|
||||||
import com.fankes.miui.notify.utils.factory.isNotSupportMiuiVersion
|
import com.fankes.miui.notify.utils.factory.isNotSupportMiSystemVersion
|
||||||
import com.fankes.miui.notify.utils.factory.miuiFullVersion
|
import com.fankes.miui.notify.utils.factory.isUpperOfAndroidU
|
||||||
|
import com.fankes.miui.notify.utils.factory.miSystemVersion
|
||||||
import com.fankes.miui.notify.utils.factory.miuiVersion
|
import com.fankes.miui.notify.utils.factory.miuiVersion
|
||||||
import com.fankes.miui.notify.utils.factory.miuiVersionCode
|
import com.fankes.miui.notify.utils.factory.miuiVersionCode
|
||||||
import com.fankes.miui.notify.utils.factory.navigate
|
import com.fankes.miui.notify.utils.factory.navigate
|
||||||
@@ -51,6 +54,7 @@ import com.fankes.miui.notify.utils.factory.openNotifySetting
|
|||||||
import com.fankes.miui.notify.utils.factory.showDialog
|
import com.fankes.miui.notify.utils.factory.showDialog
|
||||||
import com.fankes.miui.notify.utils.factory.showTimePicker
|
import com.fankes.miui.notify.utils.factory.showTimePicker
|
||||||
import com.fankes.miui.notify.utils.factory.snake
|
import com.fankes.miui.notify.utils.factory.snake
|
||||||
|
import com.fankes.miui.notify.utils.factory.systemFullVersion
|
||||||
import com.fankes.miui.notify.utils.tool.GithubReleaseTool
|
import com.fankes.miui.notify.utils.tool.GithubReleaseTool
|
||||||
import com.fankes.miui.notify.utils.tool.I18nWarnTool
|
import com.fankes.miui.notify.utils.tool.I18nWarnTool
|
||||||
import com.fankes.miui.notify.utils.tool.SystemUITool
|
import com.fankes.miui.notify.utils.tool.SystemUITool
|
||||||
@@ -83,11 +87,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
when {
|
when {
|
||||||
/** 判断是否为 MIUI 系统 */
|
/** 判断是否为小米系统 */
|
||||||
isNotMIUI ->
|
isNotMiSystem ->
|
||||||
showDialog {
|
showDialog {
|
||||||
title = "不是 MIUI 系统"
|
title = "不是 MIUI 或 HyperOS 系统"
|
||||||
msg = "此模块专为 MIUI 系统打造,当前无法识别你的系统为 MIUI,所以模块无法工作。"
|
msg = "此模块专为 MIUI、HyperOS 系统打造,当前无法识别你的系统为其中任意之一,所以模块无法工作。"
|
||||||
confirmButton(text = "查看支持的模块") {
|
confirmButton(text = "查看支持的模块") {
|
||||||
openBrowser(url = "https://github.com/fankes/AndroidNotifyIconAdapt")
|
openBrowser(url = "https://github.com/fankes/AndroidNotifyIconAdapt")
|
||||||
finish()
|
finish()
|
||||||
@@ -108,14 +112,14 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
cancelButton(text = "退出") { finish() }
|
cancelButton(text = "退出") { finish() }
|
||||||
noCancelable()
|
noCancelable()
|
||||||
}
|
}
|
||||||
/** 判断支持的 MIUI 版本 */
|
/** 判断支持的系统版本 */
|
||||||
isNotSupportMiuiVersion ->
|
isNotSupportMiSystemVersion ->
|
||||||
showDialog {
|
showDialog {
|
||||||
title = "不支持的 MIUI 版本"
|
title = "不支持的系统版本"
|
||||||
msg = (if (miuiVersion.isNotBlank())
|
msg = (if (miSystemVersion.isNotBlank())
|
||||||
"此模块目前支持 MIUI 11~14 系统,你的 MIUI 版本为 $miuiVersion,暂不支持。\n\n" +
|
"此模块目前支持 MIUI 11~14 和 HyperOS 1.0 系统,你的系统版本为 $miSystemVersion,暂不支持。\n\n" +
|
||||||
"如果你的 MIUI 版本识别有误,请检查是否有相关插件修改了系统版本。\n\n"
|
"如果你的系统版本识别有误,请检查是否有相关插件修改了系统版本。\n\n"
|
||||||
else "无法获取 MIUI 版本,请检查你是否修改了系统参数或使用非官方系统。\n\n") + "若有其它疑问,你可以点击下方按钮前往项目地址进行反馈。"
|
else "无法获取系统版本,请检查你是否修改了系统参数或使用非官方系统。\n\n") + "若有其它疑问,你可以点击下方按钮前往项目地址进行反馈。"
|
||||||
confirmButton(text = "前往项目地址") {
|
confirmButton(text = "前往项目地址") {
|
||||||
openProjectUrl()
|
openProjectUrl()
|
||||||
finish()
|
finish()
|
||||||
@@ -150,6 +154,17 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
confirmButton(text = "我知道了") { ConfigData.isIgnoredAndroidVersionToLow = true }
|
confirmButton(text = "我知道了") { ConfigData.isIgnoredAndroidVersionToLow = true }
|
||||||
noCancelable()
|
noCancelable()
|
||||||
}
|
}
|
||||||
|
// TODO: 适配 MIUI 14 Android 14 和 HyperOS 1.0
|
||||||
|
if (isMIOS || isMIUI && miuiVersion == "14" && isUpperOfAndroidU)
|
||||||
|
showDialog {
|
||||||
|
title = "暂未适配的系统"
|
||||||
|
msg = "从基于 MIUI 14 的 Android 14 以及 HyperOS 1.0 开始," +
|
||||||
|
"官方对系统界面部分进行了大量重写,模块功能现处于损坏状态,开发者正在努力进行适配," +
|
||||||
|
"可能无法第一时间完成,适配成功后此弹窗将被移除。\n\n" +
|
||||||
|
"你可以订阅 Telegram CI 频道,第一时间获取版本更新。"
|
||||||
|
confirmButton(text = "我知道了")
|
||||||
|
cancelButton(text = "CI 频道") { openBrowser(url = "https://t.me/MIUINativeNotifyIcon_CI") }
|
||||||
|
}
|
||||||
/** 推广、恰饭 */
|
/** 推广、恰饭 */
|
||||||
ProjectPromote.show(activity = this, ModuleVersion.toString())
|
ProjectPromote.show(activity = this, ModuleVersion.toString())
|
||||||
}
|
}
|
||||||
@@ -184,7 +199,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.mainTextMiuiVersion.text = "系统版本:[$androidVersionCodeName] $miuiFullVersion"
|
binding.mainTextMiuiVersion.text = "系统版本:[$androidVersionCodeName] $systemFullVersion"
|
||||||
binding.warnSCountDisTip.isGone = miuiVersionCode > 12.5
|
binding.warnSCountDisTip.isGone = miuiVersionCode > 12.5
|
||||||
binding.warnMiuiNotifyStyleTip.isGone = miuiVersionCode > 11
|
binding.warnMiuiNotifyStyleTip.isGone = miuiVersionCode > 11
|
||||||
binding.statusIconCountText.text = ConfigData.liftedStatusIconCount.toString()
|
binding.statusIconCountText.text = ConfigData.liftedStatusIconCount.toString()
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
package com.fankes.miui.notify.utils.factory
|
package com.fankes.miui.notify.utils.factory
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.app.Service
|
import android.app.Service
|
||||||
@@ -101,17 +102,23 @@ val Context.isSystemInDarkMode get() = (resources.configuration.uiMode and Confi
|
|||||||
*/
|
*/
|
||||||
inline val Context.isNotSystemInDarkMode get() = !isSystemInDarkMode
|
inline val Context.isNotSystemInDarkMode get() = !isSystemInDarkMode
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统版本是否高于或等于 Android 14
|
||||||
|
* @return [Boolean] 是否符合条件
|
||||||
|
*/
|
||||||
|
inline val isUpperOfAndroidU get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统版本是否高于或等于 Android 13
|
* 系统版本是否高于或等于 Android 13
|
||||||
* @return [Boolean] 是否符合条件
|
* @return [Boolean] 是否符合条件
|
||||||
*/
|
*/
|
||||||
inline val isUpperOfAndroidT get() = Build.VERSION.SDK_INT > Build.VERSION_CODES.S
|
inline val isUpperOfAndroidT get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统版本是否高于或等于 Android 12
|
* 系统版本是否高于或等于 Android 12
|
||||||
* @return [Boolean] 是否符合条件
|
* @return [Boolean] 是否符合条件
|
||||||
*/
|
*/
|
||||||
inline val isUpperOfAndroidS get() = Build.VERSION.SDK_INT > Build.VERSION_CODES.R
|
inline val isUpperOfAndroidS get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统版本是否低于 Android 9
|
* 系统版本是否低于 Android 9
|
||||||
@@ -125,12 +132,30 @@ inline val isLowerAndroidP get() = Build.VERSION.SDK_INT < Build.VERSION_CODES.P
|
|||||||
*/
|
*/
|
||||||
inline val isLowerAndroidR get() = Build.VERSION.SDK_INT < Build.VERSION_CODES.R
|
inline val isLowerAndroidR get() = Build.VERSION.SDK_INT < Build.VERSION_CODES.R
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前设备是否是 MIUI、HyperOS 定制 Android 系统
|
||||||
|
* @return [Boolean] 是否符合条件
|
||||||
|
*/
|
||||||
|
val isMiSystem get() = isMIUI || isMIOS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前设备是否不是 MIUI、HyperOS 定制 Android 系统
|
||||||
|
* @return [Boolean] 是否符合条件
|
||||||
|
*/
|
||||||
|
val isNotMiSystem get() = !isMiSystem
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前设备是否是 MIUI 定制 Android 系统
|
* 当前设备是否是 MIUI 定制 Android 系统
|
||||||
* @return [Boolean] 是否符合条件
|
* @return [Boolean] 是否符合条件
|
||||||
*/
|
*/
|
||||||
val isMIUI by lazy { "android.miui.R".hasClass() }
|
val isMIUI by lazy { "android.miui.R".hasClass() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前设备是否是 HyperOS 定制 Android 系统
|
||||||
|
* @return [Boolean] 是否符合条件
|
||||||
|
*/
|
||||||
|
val isMIOS get() = isMIUI && miuiVersion == "816"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前设备是否不是 MIUI 定制 Android 系统
|
* 当前设备是否不是 MIUI 定制 Android 系统
|
||||||
* @return [Boolean] 是否符合条件
|
* @return [Boolean] 是否符合条件
|
||||||
@@ -138,20 +163,33 @@ val isMIUI by lazy { "android.miui.R".hasClass() }
|
|||||||
inline val isNotMIUI get() = !isMIUI
|
inline val isNotMIUI get() = !isMIUI
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否为支持的 MIUI 版本
|
* 当前设备是否不是 HyperOS 定制 Android 系统
|
||||||
|
* @return [Boolean] 是否符合条件
|
||||||
|
*/
|
||||||
|
inline val isNotMIOS get() = !isMIOS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为支持的 MIUI、HyperOS 版本
|
||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
val isSupportMiuiVersion
|
val isSupportMiSystemVersion
|
||||||
get() = when (miuiVersion) {
|
get() = when {
|
||||||
"11", "12", "12.5", "13", "14" -> true
|
isMIOS -> when (miosVersion) {
|
||||||
|
"1.0" -> true
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
isMIUI -> when (miuiVersion) {
|
||||||
|
"11", "12", "12.5", "13", "14" -> true
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否不为支持的 MIUI 版本
|
* 是否不为支持的 MIUI、HyperOS 版本
|
||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
inline val isNotSupportMiuiVersion get() = !isSupportMiuiVersion
|
inline val isNotSupportMiSystemVersion get() = !isSupportMiSystemVersion
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 Android 版本代号
|
* 获取 Android 版本代号
|
||||||
@@ -176,6 +214,28 @@ val androidVersionCodeName
|
|||||||
else -> "?"
|
else -> "?"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 MIUI、HyperOS 版本
|
||||||
|
* @return [String]
|
||||||
|
*/
|
||||||
|
val miSystemVersion
|
||||||
|
get() = when {
|
||||||
|
isMIOS -> miosVersion
|
||||||
|
isMIUI -> miuiVersion
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 MIUI、HyperOS 版本号
|
||||||
|
* @return [Float]
|
||||||
|
*/
|
||||||
|
val miSystemVersionCode
|
||||||
|
get() = when {
|
||||||
|
isMIOS -> miosVersionCode
|
||||||
|
isMIUI -> miuiVersionCode
|
||||||
|
else -> 0f
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 MIUI 版本
|
* 获取 MIUI 版本
|
||||||
* @return [String]
|
* @return [String]
|
||||||
@@ -194,11 +254,28 @@ val miuiVersion
|
|||||||
}.trim()
|
}.trim()
|
||||||
else ""
|
else ""
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 HyperOS 版本
|
||||||
|
* @return [String]
|
||||||
|
*/
|
||||||
|
val miosVersion
|
||||||
|
get() = if (isMIOS)
|
||||||
|
findPropString("ro.mi.os.version.name").let {
|
||||||
|
if (it.startsWith("OS")) it.replaceFirst("OS", "") else it
|
||||||
|
}.trim()
|
||||||
|
else ""
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 MIUI 版本号
|
* 获取 MIUI 版本号
|
||||||
* @return [Float]
|
* @return [Float]
|
||||||
*/
|
*/
|
||||||
val miuiVersionCode get() = safeOf(default = 0f) { miuiVersion.toFloat() }
|
val miuiVersionCode get() = miuiVersion.toFloatOrNull() ?: 0f
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 HyperOS 版本号
|
||||||
|
* @return [Float]
|
||||||
|
*/
|
||||||
|
val miosVersionCode get() = findPropString("ro.mi.os.version.code").toFloatOrNull() ?: 0f
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 MIUI 次版本号
|
* 获取 MIUI 次版本号
|
||||||
@@ -207,18 +284,35 @@ val miuiVersionCode get() = safeOf(default = 0f) { miuiVersion.toFloat() }
|
|||||||
val miuiIncrementalVersion get() = findPropString("ro.system.build.version.incremental").trim()
|
val miuiIncrementalVersion get() = findPropString("ro.system.build.version.incremental").trim()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 MIUI 完全版本
|
* 获取 HyperOS 次版本号
|
||||||
* @return [String]
|
* @return [String]
|
||||||
*/
|
*/
|
||||||
val miuiFullVersion
|
val miosIncrementalVersion get() = findPropString("ro.mi.os.version.incremental").trim()
|
||||||
get() = if (isMIUI) miuiIncrementalVersion.let {
|
|
||||||
if (it.lowercase().endsWith(".dev").not() && it.lowercase().any { e -> e.code in 97..122 })
|
/**
|
||||||
"$it 稳定版"
|
* 获取 MIUI、HyperOS 完全版本
|
||||||
else when {
|
* @return [String]
|
||||||
it.lowercase().endsWith(".dev") -> "$it 开发版"
|
*/
|
||||||
else -> "V$miuiVersion $it 开发版"
|
val systemFullVersion
|
||||||
|
get() = when {
|
||||||
|
isMIOS -> "HyperOS " + miosIncrementalVersion.let {
|
||||||
|
if (it.lowercase().endsWith(".dev").not() && it.lowercase().any { e -> e.code in 97..122 })
|
||||||
|
"${it.replaceFirst("OS", "")} 稳定版"
|
||||||
|
else when {
|
||||||
|
it.lowercase().endsWith(".dev") -> "${it.replaceFirst("OS", "")} 开发版"
|
||||||
|
else -> "$miosVersion $it 开发版"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else "不是 MIUI 系统"
|
isMIUI -> miuiIncrementalVersion.let {
|
||||||
|
if (it.lowercase().endsWith(".dev").not() && it.lowercase().any { e -> e.code in 97..122 })
|
||||||
|
"$it 稳定版"
|
||||||
|
else when {
|
||||||
|
it.lowercase().endsWith(".dev") -> "$it 开发版"
|
||||||
|
else -> "V$miuiVersion $it 开发版"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else -> "不是 MIUI 或 HyperOS 系统"
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 [Drawable]
|
* 获取 [Drawable]
|
||||||
@@ -366,6 +460,7 @@ fun Number.dpFloat(context: Context) = toFloat() * context.resources.displayMetr
|
|||||||
* @return [Int] Android < 12 返回 [wallpaperColor]
|
* @return [Int] Android < 12 返回 [wallpaperColor]
|
||||||
*/
|
*/
|
||||||
val Context.systemAccentColor
|
val Context.systemAccentColor
|
||||||
|
@SuppressLint("InlinedApi")
|
||||||
get() = safeOf(wallpaperColor) {
|
get() = safeOf(wallpaperColor) {
|
||||||
if (isUpperOfAndroidS) resources.colorOf(android.R.color.system_accent1_600) else wallpaperColor
|
if (isUpperOfAndroidS) resources.colorOf(android.R.color.system_accent1_600) else wallpaperColor
|
||||||
}
|
}
|
||||||
|
@@ -34,9 +34,10 @@ import com.fankes.miui.notify.data.ConfigData
|
|||||||
import com.fankes.miui.notify.ui.activity.MainActivity
|
import com.fankes.miui.notify.ui.activity.MainActivity
|
||||||
import com.fankes.miui.notify.utils.factory.delayedRun
|
import com.fankes.miui.notify.utils.factory.delayedRun
|
||||||
import com.fankes.miui.notify.utils.factory.execShell
|
import com.fankes.miui.notify.utils.factory.execShell
|
||||||
import com.fankes.miui.notify.utils.factory.miuiFullVersion
|
import com.fankes.miui.notify.utils.factory.isMIOS
|
||||||
import com.fankes.miui.notify.utils.factory.showDialog
|
import com.fankes.miui.notify.utils.factory.showDialog
|
||||||
import com.fankes.miui.notify.utils.factory.snake
|
import com.fankes.miui.notify.utils.factory.snake
|
||||||
|
import com.fankes.miui.notify.utils.factory.systemFullVersion
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.highcapable.yukihookapi.YukiHookAPI
|
import com.highcapable.yukihookapi.YukiHookAPI
|
||||||
import com.highcapable.yukihookapi.hook.factory.dataChannel
|
import com.highcapable.yukihookapi.hook.factory.dataChannel
|
||||||
@@ -101,7 +102,7 @@ object SystemUITool {
|
|||||||
"[Display]: ${Build.DISPLAY}\n" +
|
"[Display]: ${Build.DISPLAY}\n" +
|
||||||
"[Android Version]: ${Build.VERSION.RELEASE}\n" +
|
"[Android Version]: ${Build.VERSION.RELEASE}\n" +
|
||||||
"[Android API Level]: ${Build.VERSION.SDK_INT}\n" +
|
"[Android API Level]: ${Build.VERSION.SDK_INT}\n" +
|
||||||
"[MIUI Version]: $miuiFullVersion\n" +
|
"[${if (isMIOS) "HyperOS" else "MIUI"} Version]: $systemFullVersion\n" +
|
||||||
"[System Locale]: ${Locale.getDefault()}\n\n" + YLog.contents(debugLogs).trim()
|
"[System Locale]: ${Locale.getDefault()}\n\n" + YLog.contents(debugLogs).trim()
|
||||||
activity.contentResolver?.openOutputStream(e)?.apply { write(content.toByteArray()) }?.close()
|
activity.contentResolver?.openOutputStream(e)?.apply { write(content.toByteArray()) }?.close()
|
||||||
activity.snake(msg = "导出完成")
|
activity.snake(msg = "导出完成")
|
||||||
|
Reference in New Issue
Block a user