10 Commits
2.97 ... 2.101

7 changed files with 58 additions and 40 deletions

View File

@@ -2,7 +2,7 @@
[![Blank](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/fankes/MIUINativeNotifyIcon) [![Blank](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/fankes/MIUINativeNotifyIcon)
[![Blank](https://img.shields.io/badge/license-AGPL3.0-blue)](https://github.com/fankes/MIUINativeNotifyIcon/blob/master/LICENSE) [![Blank](https://img.shields.io/badge/license-AGPL3.0-blue)](https://github.com/fankes/MIUINativeNotifyIcon/blob/master/LICENSE)
[![Blank](https://img.shields.io/badge/version-v2.97-green)](https://github.com/fankes/MIUINativeNotifyIcon/releases) [![Blank](https://img.shields.io/badge/version-v2.101-green)](https://github.com/fankes/MIUINativeNotifyIcon/releases)
[![Blank](https://img.shields.io/github/downloads/fankes/MIUINativeNotifyIcon/total?label=Release)](https://github.com/fankes/MIUINativeNotifyIcon/releases) [![Blank](https://img.shields.io/github/downloads/fankes/MIUINativeNotifyIcon/total?label=Release)](https://github.com/fankes/MIUINativeNotifyIcon/releases)
[![Blank](https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.fankes.miui.notify/total?label=LSPosed%20Repo&logo=Android&style=flat&labelColor=F48FB1&logoColor=ffffff)](https://github.com/Xposed-Modules-Repo/com.fankes.miui.notify/releases) [![Blank](https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.fankes.miui.notify/total?label=LSPosed%20Repo&logo=Android&style=flat&labelColor=F48FB1&logoColor=ffffff)](https://github.com/Xposed-Modules-Repo/com.fankes.miui.notify/releases)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/XiaofangInternet) [![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/XiaofangInternet)

View File

@@ -72,8 +72,8 @@ android {
dependencies { dependencies {
compileOnly 'de.robv.android.xposed:api:82' compileOnly 'de.robv.android.xposed:api:82'
implementation 'com.highcapable.yukihookapi:api:1.1.9' implementation 'com.highcapable.yukihookapi:api:1.1.11'
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.9' ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.11'
implementation 'com.github.duanhong169:drawabletoolbox:1.0.7' implementation 'com.github.duanhong169:drawabletoolbox:1.0.7'
implementation "com.github.topjohnwu.libsu:core:5.0.4" implementation "com.github.topjohnwu.libsu:core:5.0.4"
implementation 'androidx.annotation:annotation:1.6.0' implementation 'androidx.annotation:annotation:1.6.0'

View File

@@ -735,7 +735,6 @@ object SystemUIHooker : YukiBaseHooker() {
/** 获取可读写状态 */ /** 获取可读写状态 */
return prefs.isPreferencesAvailable.also { return prefs.isPreferencesAvailable.also {
isUsingCachingMethod = true isUsingCachingMethod = true
prefs.clearCache()
cachingIconDatas() cachingIconDatas()
if (isRefreshCacheOnly) return@also if (isRefreshCacheOnly) return@also
refreshStatusBarIcons() refreshStatusBarIcons()
@@ -753,9 +752,9 @@ object SystemUIHooker : YukiBaseHooker() {
/** 强制回写系统的状态栏图标样式为原生 */ /** 强制回写系统的状态栏图标样式为原生 */
injectMember { injectMember {
method { method {
name = "shouldSubstituteSmallIcon" name { it == "shouldSubstituteSmallIcon" || it == "shouldSubstituteSmallIconForStatusBarNotification" }
param(ExpandedNotificationClass) param { it[0] extends StatusBarNotificationClass }
} }.all()
replaceToFalse() replaceToFalse()
} }
/** 强制回写系统的状态栏图标样式为原生 */ /** 强制回写系统的状态栏图标样式为原生 */
@@ -763,7 +762,7 @@ object SystemUIHooker : YukiBaseHooker() {
var isUseLegacy = false var isUseLegacy = false
method { method {
name = "getSmallIcon" name = "getSmallIcon"
param(ExpandedNotificationClass, IntType) param { it[0] extends StatusBarNotificationClass && it[1] == IntType }
}.remedys { }.remedys {
method { method {
name = "getSmallIcon" name = "getSmallIcon"

View File

@@ -47,7 +47,7 @@ class IconPackParams(private val context: Context? = null, private val param: Pa
* 已存储的 JSON 数据 * 已存储的 JSON 数据
* @return [String] * @return [String]
*/ */
internal val storageDataJson get() = (context?.prefs() ?: param?.prefs)?.direct()?.get(ConfigData.NOTIFY_ICONS_DATA) internal val storageDataJson get() = (context?.prefs() ?: param?.prefs)?.get(ConfigData.NOTIFY_ICONS_DATA)
/** /**
* 获取图标数据 * 获取图标数据

View File

@@ -163,8 +163,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
binding.notifyIconAutoSyncText.text = ConfigData.notifyIconFixAutoTime binding.notifyIconAutoSyncText.text = ConfigData.notifyIconFixAutoTime
binding.moduleEnableSwitch.bind(ConfigData.ENABLE_MODULE) { binding.moduleEnableSwitch.bind(ConfigData.ENABLE_MODULE) {
onInitialize { onInitialize {
binding.moduleEnableLogSwitch.isVisible = it binding.moduleEnableLogItem.isVisible = it
binding.expAllDebugLogButton.isVisible = it && ConfigData.isEnableModuleLog
binding.colorIconHookItem.isVisible = it binding.colorIconHookItem.isVisible = it
binding.statusIconCountItem.isVisible = isLowerAndroidR.not() && it binding.statusIconCountItem.isVisible = isLowerAndroidR.not() && it
binding.notifyStyleConfigItem.isVisible = it binding.notifyStyleConfigItem.isVisible = it
@@ -177,7 +176,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
} }
} }
binding.moduleEnableLogSwitch.bind(ConfigData.ENABLE_MODULE_LOG) { binding.moduleEnableLogSwitch.bind(ConfigData.ENABLE_MODULE_LOG) {
onInitialize { binding.expAllDebugLogButton.isVisible = it && ConfigData.isEnableModule } onInitialize { binding.expAllDebugLogButton.isVisible = it }
onChanged { onChanged {
reinitialize() reinitialize()
SystemUITool.refreshSystemUI(context = this@MainActivity, isRefreshCacheOnly = true) SystemUITool.refreshSystemUI(context = this@MainActivity, isRefreshCacheOnly = true)

View File

@@ -253,33 +253,8 @@
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:text="启用模块"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<com.fankes.miui.notify.ui.widget.MaterialSwitch
android:id="@+id/module_enable_log_switch"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="启用调试日志" android:text="启用模块"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView
android:id="@+id/exp_all_debug_log_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round"
android:gravity="center"
android:padding="10dp"
android:singleLine="true"
android:text="导出全部调试日志"
android:textColor="@color/colorTextGray" android:textColor="@color/colorTextGray"
android:textSize="15sp" /> android:textSize="15sp" />
@@ -294,6 +269,51 @@
android:text="模块关闭后一切功能都将彻底停止工作。" android:text="模块关闭后一切功能都将彻底停止工作。"
android:textColor="@color/colorTextDark" android:textColor="@color/colorTextDark"
android:textSize="12sp" /> android:textSize="12sp" />
<LinearLayout
android:id="@+id/module_enable_log_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<com.fankes.miui.notify.ui.widget.MaterialSwitch
android:id="@+id/module_enable_log_switch"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="10dp"
android:text="启用调试日志"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView
android:id="@+id/exp_all_debug_log_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round"
android:gravity="center"
android:padding="10dp"
android:singleLine="true"
android:text="导出全部调试日志"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:alpha="0.6"
android:lineSpacingExtra="6dp"
android:text="默认情况下不建议开启此选项,仅在模块故障时开启,此时你可以发送调试日志给开发者帮助我们快速定位问题。"
android:textColor="@color/colorTextDark"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout

View File

@@ -12,8 +12,8 @@ ext {
targetSdk : 33 targetSdk : 33
] ]
app = [ app = [
versionName : '2.97', versionName : '2.101',
versionCode : 37, versionCode : 41,
signingConfigs: [ signingConfigs: [
secretConfigsDirPath : "${projectDir.getAbsolutePath()}/.secret", secretConfigsDirPath : "${projectDir.getAbsolutePath()}/.secret",
secretConfigsFileName: "key_store_secret.json" secretConfigsFileName: "key_store_secret.json"