diff --git a/app/build.gradle b/app/build.gradle
index 923e203..e89df9e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,13 +13,13 @@ android {
//targetSdkVersion compileSdkVersion
targetSdkVersion 30
// 版本号:发布日期
- versionCode 20201103
+ versionCode 20201104
/*
版本名说明:
R3.0.0
Refactoring 第三次重构+功能更新+缺陷修复
*/
- versionName "R3.3.3"
+ versionName "R3.3.4"
resConfigs "en", "zh-rCN"
// 致用户:可以在这里禁用Firebase,将以下值设为true
final def disableFirebase = false
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e27a57a..1ee67cd 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -28,6 +28,8 @@
val item = it[which]
/* 如果为特权模式且不为锁屏,再次确认 */
@@ -99,10 +95,7 @@ class MainActivity : AppCompatActivity() {
and (item.labelResId != R.string.func_lock_screen_privileged)
) {
setTitle(
- String.format(
- getString(R.string.title_dialog_confirm_op),
- item.label
- )
+ String.format(getString(R.string.title_dialog_confirm_op), item.label)
)
// 再次确认
setAdapter(null, null)
@@ -128,16 +121,14 @@ class MainActivity : AppCompatActivity() {
}
setNeutralButton(null, null)
setPositiveButton(null, null)
- show()
+ show().listView.rootView.hideFromAccessibilityService()
} else {
powerViewModel.call(item.labelResId)
dialog.dismiss()
}
}
if (powerViewModel.rootMode.value == true) {
- setNeutralButton(R.string.btn_dialog_switch_mode) { _, _ ->
- powerViewModel.reverseForceMode()
- }
+ setNeutralButton(R.string.btn_dialog_switch_mode) { _, _ -> powerViewModel.reverseForceMode() }
}
setPositiveButton(R.string.btn_dialog_help) { _, _ ->
/* --- 帮助界面逻辑 ---*/
@@ -153,7 +144,7 @@ class MainActivity : AppCompatActivity() {
finish()
}
- setNeutralButton(getString(R.string.btn_dialog_open_source_lib_dependency)) { _, _ ->
+ setNeutralButton(getString(R.string.open_source_lib_dependency)) { _, _ ->
this@MainActivity.startActivity(
Intent(application, OpenSourceLibDependencyActivity::class.java)
)
@@ -176,7 +167,10 @@ class MainActivity : AppCompatActivity() {
//alertDialogMessageView.setTextIsSelectable(true)
Toasty.normal(
this@MainActivity,
- "${BuildConfig.VERSION_NAME}\n${BuildConfig.VERSION_CODE}",
+ """
+ ${BuildConfig.VERSION_NAME}
+ ${BuildConfig.VERSION_CODE}
+ """.trimIndent(),
Toasty.LENGTH_LONG
).show()
}
diff --git a/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/main/PowerViewModel.kt b/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/main/PowerViewModel.kt
index 5e11b07..2af2f98 100644
--- a/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/main/PowerViewModel.kt
+++ b/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/main/PowerViewModel.kt
@@ -187,10 +187,7 @@ class PowerViewModel : AndroidViewModel(MyApplication.getInstance()) {
if (isOnForceMode(info)) {
val range = 0..forceLabel.length
forceLabel[range] = ForegroundColorSpan(
- ResourcesCompat.getColor(
- app().resources,
- R.color.colorForceModeItem, null
- )
+ ResourcesCompat.getColor(app().resources, R.color.colorForceModeItem, null)
)
forceLabel[range] = StyleSpan(Typeface.BOLD)
}
diff --git a/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/tile/PowerDialogTileService.kt b/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/tile/PowerDialogTileService.kt
index cfed0d7..61f78f8 100644
--- a/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/tile/PowerDialogTileService.kt
+++ b/app/src/main/java/github/ryuunoakaihitomi/powerpanel/ui/tile/PowerDialogTileService.kt
@@ -21,9 +21,7 @@ class PowerDialogTileService : TileService() {
Timber.w("locked!")
qsTile?.run {
updateState(Tile.STATE_UNAVAILABLE)
- unlockAndRun {
- updateState(Tile.STATE_ACTIVE)
- }
+ unlockAndRun { updateState(Tile.STATE_ACTIVE) }
}
} else {
/* 打开电源菜单 */
@@ -38,8 +36,6 @@ class PowerDialogTileService : TileService() {
// 这是一个随时可用的磁贴,因此应该在可见时时刻保持“活跃状态”(对比突出图标),但在锁屏时没有使用的理由
override fun onStartListening() {
- qsTile?.run {
- if (!isLocked) updateState(Tile.STATE_ACTIVE)
- }
+ qsTile?.run { if (!isLocked) updateState(Tile.STATE_ACTIVE) }
}
}
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 56248cb..e9d06f4 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -22,5 +22,5 @@
确认操作 “%s”
已经尝试添加快捷方式
反馈
- 开源库依赖项
+ 开源库依赖项
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 041c52d..cb8ec4d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -23,5 +23,5 @@
Confirm operation \"%s\"
Have tried to add shortcut
Feedback
- Open Source Library Dependency
+ Open Source Library Dependency
\ No newline at end of file