Target SDK 34 (#7075)
This commit is contained in:
parent
bd4e9e19d7
commit
d9e84f8c38
|
@ -28,9 +28,6 @@
|
|||
android:name="android.hardware.touchscreen"
|
||||
android:required="false"/>
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
|
||||
<application
|
||||
android:name="de.danoeh.antennapod.PodcastApp"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
buildscript {
|
||||
ext.agpVersion = "8.0.2"
|
||||
ext.agpVersion = "8.1.1"
|
||||
}
|
||||
plugins {
|
||||
id 'com.android.application' version "$agpVersion" apply false
|
||||
|
@ -36,7 +36,7 @@ project.ext {
|
|||
//Tests
|
||||
awaitilityVersion = "3.1.6"
|
||||
junitVersion = "4.13"
|
||||
robolectricVersion = "4.9"
|
||||
robolectricVersion = "4.11"
|
||||
espressoVersion = "3.5.0"
|
||||
runnerVersion = "1.5.0"
|
||||
rulesVersion = "1.5.0"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
android {
|
||||
compileSdk 33
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 33
|
||||
targetSdk 34
|
||||
|
||||
vectorDrawables.useSupportLibrary true
|
||||
vectorDrawables.generatedDensities = []
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.util.Log;
|
|||
import android.util.Pair;
|
||||
import android.view.SurfaceHolder;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import de.danoeh.antennapod.storage.database.DBReader;
|
||||
import de.danoeh.antennapod.storage.database.DBWriter;
|
||||
import de.danoeh.antennapod.event.playback.PlaybackPositionEvent;
|
||||
|
@ -83,10 +84,10 @@ public abstract class PlaybackController {
|
|||
}
|
||||
initialized = true;
|
||||
|
||||
activity.registerReceiver(statusUpdate, new IntentFilter(
|
||||
PlaybackService.ACTION_PLAYER_STATUS_CHANGED));
|
||||
activity.registerReceiver(notificationReceiver, new IntentFilter(
|
||||
PlaybackServiceInterface.ACTION_PLAYER_NOTIFICATION));
|
||||
ContextCompat.registerReceiver(activity, statusUpdate, new IntentFilter(
|
||||
PlaybackService.ACTION_PLAYER_STATUS_CHANGED), ContextCompat.RECEIVER_NOT_EXPORTED);
|
||||
ContextCompat.registerReceiver(activity, notificationReceiver, new IntentFilter(
|
||||
PlaybackServiceInterface.ACTION_PLAYER_NOTIFICATION), ContextCompat.RECEIVER_NOT_EXPORTED);
|
||||
|
||||
if (!released) {
|
||||
bindToService();
|
||||
|
|
|
@ -228,9 +228,12 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||
stateManager = new PlaybackServiceStateManager(this);
|
||||
notificationBuilder = new PlaybackServiceNotificationBuilder(this);
|
||||
|
||||
registerReceiver(autoStateUpdated, new IntentFilter("com.google.android.gms.car.media.STATUS"));
|
||||
ContextCompat.registerReceiver(this, autoStateUpdated,
|
||||
new IntentFilter("com.google.android.gms.car.media.STATUS"), ContextCompat.RECEIVER_EXPORTED);
|
||||
ContextCompat.registerReceiver(this, shutdownReceiver,
|
||||
new IntentFilter(PlaybackServiceInterface.ACTION_SHUTDOWN_PLAYBACK_SERVICE),
|
||||
ContextCompat.RECEIVER_NOT_EXPORTED);
|
||||
registerReceiver(headsetDisconnected, new IntentFilter(Intent.ACTION_HEADSET_PLUG));
|
||||
registerReceiver(shutdownReceiver, new IntentFilter(PlaybackServiceInterface.ACTION_SHUTDOWN_PLAYBACK_SERVICE));
|
||||
registerReceiver(bluetoothStateUpdated, new IntentFilter(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED));
|
||||
registerReceiver(audioBecomingNoisy, new IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY));
|
||||
EventBus.getDefault().register(this);
|
||||
|
@ -1609,8 +1612,10 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (TextUtils.equals(intent.getAction(), PlaybackServiceInterface.ACTION_SHUTDOWN_PLAYBACK_SERVICE)) {
|
||||
EventBus.getDefault().post(new PlaybackServiceEvent(PlaybackServiceEvent.Action.SERVICE_SHUT_DOWN));
|
||||
stateManager.stopService();
|
||||
PlaybackPreferences.writeNoMediaPlaying();
|
||||
EventBus.getDefault().post(new PlaybackServiceEvent(PlaybackServiceEvent.Action.SERVICE_SHUT_DOWN));
|
||||
EventBus.getDefault().post(new PlayerStatusEvent());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ android {
|
|||
namespace "de.danoeh.antennapod.ui.echo"
|
||||
|
||||
lint {
|
||||
disable "AppBundleLocaleChanges"
|
||||
disable "AppBundleLocaleChanges", "MissingQuantity"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue