@@ -29,18 +29,19 @@ class SystemMediaControlResolver(val context: Context) {
2929 startSystemMediaControl()
3030 }
3131 }
32- (getOneUIVersionReadable() != null ) -> {
33- val intent = Intent ().apply {
34- flags = Intent .FLAG_ACTIVITY_NEW_TASK
35- setClassName(
36- " com.samsung.android.mdx.quickboard" ,
37- " com.samsung.android.mdx.quickboard.view.MediaActivity"
38- )
39- }
40- if (! startIntent(intent)) {
41- startSystemMediaControl()
42- }
43- }
32+ // zh:临时禁用OneUI MediaActivity调用,等待未来确定不会被删除再添加回去
33+ // (getOneUIVersionReadable() != null) -> {
34+ // val intent = Intent().apply {
35+ // flags = Intent.FLAG_ACTIVITY_NEW_TASK
36+ // setClassName(
37+ // "com.samsung.android.mdx.quickboard",
38+ // "com.samsung.android.mdx.quickboard.view.MediaActivity"
39+ // )
40+ // }
41+ // if (!startIntent(intent)) {
42+ // startSystemMediaControl()
43+ // }
44+ // }
4445
4546 else -> {
4647 startSystemMediaControl()
@@ -133,24 +134,24 @@ class SystemMediaControlResolver(val context: Context) {
133134 }
134135 }
135136
136- /* *
137- * zh: 获取 One UI 版本字符串(如 6.0.0),非三星或无此属性则返回 null
138- * en: Get One UI version string (e.g. 6.0.0), return null if not Samsung or no such property
139- */
140- @SuppressLint(" PrivateApi" )
141- fun getOneUIVersionReadable (): String? {
142- return try {
143- val systemProperties = Class .forName(" android.os.SystemProperties" )
144- val get = systemProperties.getMethod(" get" , String ::class .java)
145- val value = (get.invoke(null , " ro.build.version.oneui" ) as String ).trim()
146- if (value.isEmpty()) return null
147- val code = value.toIntOrNull() ? : return null
148- val major = code / 10000
149- val minor = (code / 100 ) % 100
150- val patch = code % 100
151- " $major .$minor .$patch "
152- } catch (e: Exception ) {
153- null
154- }
155- }
137+ // /**
138+ // * zh: 获取 One UI 版本字符串(如 6.0.0),非三星或无此属性则返回 null
139+ // * en: Get One UI version string (e.g. 6.0.0), return null if not Samsung or no such property
140+ // */
141+ // @SuppressLint("PrivateApi")
142+ // private fun getOneUIVersionReadable(): String? {
143+ // return try {
144+ // val systemProperties = Class.forName("android.os.SystemProperties")
145+ // val get = systemProperties.getMethod("get", String::class.java)
146+ // val value = (get.invoke(null, "ro.build.version.oneui") as String).trim()
147+ // if (value.isEmpty()) return null
148+ // val code = value.toIntOrNull() ?: return null
149+ // val major = code / 10000
150+ // val minor = (code / 100) % 100
151+ // val patch = code % 100
152+ // "$major.$minor.$patch"
153+ // } catch (e: Exception) {
154+ // null
155+ // }
156+ // }
156157}
0 commit comments