Remove wearable support library (#6978)

The library is the last one requiring Jetifier
and we only use 3 string constants in that whole library anyway.
This commit is contained in:
ByteHamster 2024-03-10 10:16:13 +01:00 committed by GitHub
parent 095a6b3e9d
commit baa58ac17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 5 additions and 31 deletions

View File

@ -125,8 +125,7 @@ dependencies {
implementation 'com.github.xabaras:RecyclerViewSwipeDecorator:1.3'
// Non-free dependencies:
playImplementation 'com.google.android.play:core:1.8.0'
compileOnly "com.google.android.wearable:wearable:$wearableSupportVersion"
playImplementation "com.google.android.play:review:2.0.1"
androidTestImplementation "org.awaitility:awaitility:$awaitilityVersion"
androidTestImplementation 'com.nanohttpd:nanohttpd:2.1.1'

View File

@ -11,10 +11,10 @@ import android.util.Log;
import java.lang.ref.WeakReference;
import java.util.concurrent.TimeUnit;
import com.google.android.gms.tasks.Task;
import com.google.android.play.core.review.ReviewInfo;
import com.google.android.play.core.review.ReviewManager;
import com.google.android.play.core.review.ReviewManagerFactory;
import com.google.android.play.core.tasks.Task;
import de.danoeh.antennapod.BuildConfig;

View File

@ -33,9 +33,6 @@ project.ext {
rxAndroidVersion = "2.1.1"
rxJavaVersion = "2.2.2"
// Google Play build
wearableSupportVersion = "2.6.0"
//Tests
awaitilityVersion = "3.1.6"
junitVersion = "4.13"

View File

@ -67,10 +67,6 @@ dependencies {
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
// Non-free dependencies:
playApi "com.google.android.support:wearable:$wearableSupportVersion"
compileOnly "com.google.android.wearable:wearable:$wearableSupportVersion"
testImplementation "androidx.test:core:$testCoreVersion"
testImplementation "org.awaitility:awaitility:$awaitilityVersion"
testImplementation "junit:junit:$junitVersion"

View File

@ -1,17 +0,0 @@
package de.danoeh.antennapod.core.service.playback;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.media.session.PlaybackStateCompat;
class WearMediaSession {
/**
* Take a custom action builder and add no extras, because this is not the Play version of the app.
*/
static void addWearExtrasToAction(PlaybackStateCompat.CustomAction.Builder actionBuilder) {
// no-op
}
static void mediaSessionSetExtraForWear(MediaSessionCompat mediaSession) {
// no-op
}
}

View File

@ -3,7 +3,6 @@ package de.danoeh.antennapod.core.service.playback;
import android.os.Bundle;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.media.session.PlaybackStateCompat;
import android.support.wearable.media.MediaControlConstants;
public class WearMediaSession {
/**
@ -12,14 +11,14 @@ public class WearMediaSession {
*/
static void addWearExtrasToAction(PlaybackStateCompat.CustomAction.Builder actionBuilder) {
Bundle actionExtras = new Bundle();
actionExtras.putBoolean(MediaControlConstants.EXTRA_CUSTOM_ACTION_SHOW_ON_WEAR, true);
actionExtras.putBoolean("android.support.wearable.media.extra.CUSTOM_ACTION_SHOW_ON_WEAR", true);
actionBuilder.setExtras(actionExtras);
}
static void mediaSessionSetExtraForWear(MediaSessionCompat mediaSession) {
Bundle sessionExtras = new Bundle();
sessionExtras.putBoolean(MediaControlConstants.EXTRA_RESERVE_SLOT_SKIP_TO_PREVIOUS, false);
sessionExtras.putBoolean(MediaControlConstants.EXTRA_RESERVE_SLOT_SKIP_TO_NEXT, false);
sessionExtras.putBoolean("android.support.wearable.media.extra.RESERVE_SLOT_SKIP_TO_PREVIOUS", false);
sessionExtras.putBoolean("android.support.wearable.media.extra.RESERVE_SLOT_SKIP_TO_NEXT", false);
mediaSession.setExtras(sessionExtras);
}
}