优化
This commit is contained in:
1 parent
cadbec69a3
commit
4ad2944b14
8 files changed
+15
-1
No files matched your search
@@ -36,6 +36,7 @@ class MediaButtonReceiver : BroadcastReceiver() {
|
||||
fun handleIntent(context: Context, intent: Intent): Boolean {
|
||||
val intentAction = intent.action
|
||||
if (Intent.ACTION_MEDIA_BUTTON == intentAction) {
|
||||
@Suppress("DEPRECATION")
|
||||
val keyEvent = intent.getParcelableExtra<KeyEvent>(Intent.EXTRA_KEY_EVENT)
|
||||
?: return false
|
||||
val keycode: Int = keyEvent.keyCode
|
||||
|
||||
Reference in new issue
Block a user