Skip to content

Commit

Permalink
快速打开极暗和原生的通知设置
Browse files Browse the repository at this point in the history
  • Loading branch information
hosizoraru committed May 23, 2023
1 parent e8ad96b commit 61bbf48
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,40 @@ class PowerKeeperPage : BasePage() {
tipsId = R.string.dc_fps_summary
), SwitchV("dc_fps")
)
TextSummaryWithArrow(
TextSummaryV(
textId = R.string.exported,
tipsId = R.string.exported_summary,
onClickListener = {
try {
val intent = Intent()
val comp = ComponentName(
"com.android.settings",
"com.android.settings.Settings\$ReduceBrightColorsSettingsActivity"
)
intent.component = comp
activity.startActivity(intent)
} catch (e: Exception) {
Toast.makeText(activity, "启动失败,可能是不支持", Toast.LENGTH_LONG).show()
}
})
)
TextSummaryWithArrow(
TextSummaryV(
textId = R.string.original_notification,
onClickListener = {
try {
val intent = Intent()
val comp = ComponentName(
"com.android.settings",
"com.android.settings.Settings\$ConfigureNotificationSettingsActivity"
)
intent.component = comp
activity.startActivity(intent)
} catch (e: Exception) {
Toast.makeText(activity, "启动失败,可能是不支持", Toast.LENGTH_LONG).show()
}
})
)
}
}
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@
<string name="prevent_recovery_of_battery_optimization_white_list">防止恢复电池优化白名单</string>
<string name="battery_optimization">电池优化</string>
<string name="battery_optimization_summary">快速打开被MIUI隐藏的电池优化功能</string>
<string name="exported">极暗</string>
<string name="exported_summary">快速打开极暗</string>
<string name="original_notification">原生的通知设置</string>

<string name="skip_waiting_time">跳过 5/10 秒警告时间</string>
<string name="skip_waiting_time_summary">开启后可忽略MIUI在开启USB调试、\n未知来源、无障碍时的冻结时间</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@
<string name="prevent_recovery_of_battery_optimization_white_list">Prevent recovery of battery optimization whitelist</string>
<string name="battery_optimization">Battery optimization</string>
<string name="battery_optimization_summary">Quickly open the battery optimization menu hidden by MIUI</string>
<string name="exported">Exported</string>
<string name="exported_summary">Quickly open the Exported</string>
<string name="original_notification">Original Notification</string>

<string name="skip_waiting_time">Skip 5/10 seconds warning time</string>
<string name="skip_waiting_time_summary">Ignore the waiting time by MIUI when eanbling USB debugging, unknown sources and accessibility</string>
Expand Down

0 comments on commit 61bbf48

Please sign in to comment.