diff --git a/app/src/main/java/phone/vishnu/dialogmusicplayer/MainActivity.java b/app/src/main/java/phone/vishnu/dialogmusicplayer/MainActivity.java index b509353..1f2958b 100644 --- a/app/src/main/java/phone/vishnu/dialogmusicplayer/MainActivity.java +++ b/app/src/main/java/phone/vishnu/dialogmusicplayer/MainActivity.java @@ -166,8 +166,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) registerReceiver(killReceiver, new IntentFilter(KILL_APP_KEY), RECEIVER_NOT_EXPORTED); - else - registerReceiver(killReceiver, new IntentFilter(KILL_APP_KEY)); + else registerReceiver(killReceiver, new IntentFilter(KILL_APP_KEY)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (checkSelfPermission(Manifest.permission.READ_MEDIA_AUDIO) diff --git a/app/src/main/java/phone/vishnu/dialogmusicplayer/MediaPlaybackService.java b/app/src/main/java/phone/vishnu/dialogmusicplayer/MediaPlaybackService.java index 3333235..55a676b 100644 --- a/app/src/main/java/phone/vishnu/dialogmusicplayer/MediaPlaybackService.java +++ b/app/src/main/java/phone/vishnu/dialogmusicplayer/MediaPlaybackService.java @@ -139,36 +139,41 @@ public void onPlayFromUri(Uri uri, Bundle extras) { notificationFilter.addAction(ACTION_REWIND); notificationFilter.addAction(ACTION_SEEK); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + if (Build.VERSION.SDK_INT + >= Build.VERSION_CODES.TIRAMISU) { registerReceiver( - becomingNoisyReceiver, - new IntentFilter( - AudioManager - .ACTION_AUDIO_BECOMING_NOISY), + becomingNoisyReceiver, + new IntentFilter( + AudioManager + .ACTION_AUDIO_BECOMING_NOISY), RECEIVER_NOT_EXPORTED); registerReceiver( mediaButtonActionReceiver, - new IntentFilter(Intent.ACTION_MEDIA_BUTTON), + new IntentFilter( + Intent.ACTION_MEDIA_BUTTON), RECEIVER_NOT_EXPORTED); registerReceiver( - notificationReceiver, notificationFilter, RECEIVER_NOT_EXPORTED); + notificationReceiver, + notificationFilter, + RECEIVER_NOT_EXPORTED); } else { registerReceiver( - becomingNoisyReceiver, - new IntentFilter( - AudioManager - .ACTION_AUDIO_BECOMING_NOISY)); + becomingNoisyReceiver, + new IntentFilter( + AudioManager + .ACTION_AUDIO_BECOMING_NOISY)); registerReceiver( mediaButtonActionReceiver, - new IntentFilter(Intent.ACTION_MEDIA_BUTTON)); + new IntentFilter( + Intent.ACTION_MEDIA_BUTTON)); registerReceiver( - notificationReceiver, notificationFilter); + notificationReceiver, notificationFilter); } audio =