Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
R3.12.3
Browse files Browse the repository at this point in the history
更新ReToast,修复部分华为设备上的问题。这个bug原本不准备修,但是看到这部分改进可能贡献给了AOSP所以决定修复。
  • Loading branch information
ryuunoakaihitomi committed Sep 22, 2021
1 parent 91cf8ec commit e6084b2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ android {
//targetSdkVersion compileSdkVersion
targetSdkVersion 31
// 版本号:发布日期
versionCode 20210912
versionCode 20210922
// 版本名说明: R3.x.y.z (R3:Refactoring 第三次重构,z:Quick Fix序号)
versionName 'R3.12.2'
versionName 'R3.12.3'
resConfigs "en", "zh-rCN"

buildConfigField 'String', 'BUILD_TIME', '\"' + new Date() + '\"'
Expand Down Expand Up @@ -122,7 +122,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"

normalImplementation platform('com.google.firebase:firebase-bom:28.3.1')
normalImplementation platform('com.google.firebase:firebase-bom:28.4.1')
normalImplementation 'com.google.firebase:firebase-analytics-ktx'
normalImplementation 'com.google.firebase:firebase-crashlytics-ktx'

Expand All @@ -140,7 +140,7 @@ dependencies {
implementation "dev.rikka.shizuku:provider:$shizuku_version"

implementation 'github.ryuunoakaihitomi.poweract:poweract:1.5.3'
runtimeOnly 'github.ryuunoakaihitomi.retoast:retoast:1.7.4'
runtimeOnly 'github.ryuunoakaihitomi.retoast:retoast:1.8.0'
implementation 'com.google.code.gson:gson:2.8.8'
implementation 'com.github.GrenderG:Toasty:1.5.2'
implementation 'com.github.topjohnwu.libsu:core:3.1.2'
Expand Down
4 changes: 3 additions & 1 deletion app/src/floss/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application tools:remove="android:manageSpaceActivity,android:fullBackupOnly" />
<application
tools:ignore="AllowBackup,MissingApplicationIcon"
tools:remove="android:manageSpaceActivity,android:fullBackupOnly" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ class MainActivity : AppCompatActivity() {
val isCompatible =
// KitKat无法长期维护,这次只不过是临时接触了这类设备才给稍微适配
Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
// Wear OS存在界面元素无法显示问题
!isWatch() &&
// Android TV部分功能无法使用
!packageManager.hasSystemFeature(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
PackageManager.FEATURE_LEANBACK else PackageManager.FEATURE_TELEVISION
) &&
// 工作资料之类的
getSystemService<UserManager>()!!.userProfiles[0].equals(Process.myUserHandle())
// Wear OS存在界面元素无法显示问题
!isWatch() &&
// Android TV部分功能无法使用
!packageManager.hasSystemFeature(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
PackageManager.FEATURE_LEANBACK else PackageManager.FEATURE_TELEVISION
) &&
// 工作资料之类的
getSystemService<UserManager>()!!.userProfiles[0].equals(Process.myUserHandle())
if (!isCompatible) {
Timber.i("show unsupported env hint")
Toasty.error(this, R.string.toast_unsupported_env, Toasty.LENGTH_LONG).show()
Expand Down Expand Up @@ -286,6 +286,8 @@ class MainActivity : AppCompatActivity() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
setHideOverlayWindows(true)
}
// 这里不继续在旧版本检测是否有覆盖层,解决方案可能不可用
// https://stackoverflow.com/questions/63152374/flag-window-is-obscured-not-working-on-newer-android
}
}
lifecycle.addObserver(LifecycleEventObserver { _, event ->
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.5.30'
ext.kotlin_version = '1.5.31'
repositories {
google()
mavenCentral()
Expand Down

0 comments on commit e6084b2

Please sign in to comment.