File tree Expand file tree Collapse file tree
app/src/main/java/org/akanework/gramophone/logic/utils/exoplayer/oem Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,19 +66,9 @@ class SystemMediaControlResolver(val context: Context) {
6666 if (! tag) {
6767 Toast .makeText(context, R .string.media_control_text_error, Toast .LENGTH_SHORT ).show()
6868 }
69- } else if (Build .VERSION .SDK_INT == 30 ) {
70- // Android 11
71- val tag = startNativeMediaDialogForAndroid11(context)
72- if (! tag) {
73- Toast .makeText(context, R .string.media_control_text_error, Toast .LENGTH_SHORT ).show()
74- }
7569 } else {
76- val intent = Intent ().apply {
77- flags = Intent .FLAG_ACTIVITY_NEW_TASK
78- action = " com.android.settings.panel.action.MEDIA_OUTPUT"
79- putExtra(" com.android.settings.panel.extra.PACKAGE_NAME" , context.packageName)
80- }
81- val tag = startNativeMediaDialog(intent)
70+ // zh: Android 11 及以下
71+ val tag = startNativeMediaDialogForAndroid11(context)
8272 if (! tag) {
8373 Toast .makeText(context, R .string.media_control_text_error, Toast .LENGTH_SHORT ).show()
8474 }
You can’t perform that action at this time.
0 commit comments