summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2019-09-29 13:25:59 +0200
committerByteHamster <info@bytehamster.com>2019-10-04 11:24:27 +0200
commit933790b0d3068532bdbd6b5b4856e6d49d3dfbdd (patch)
tree4d69e905205cdd49a457d452f4dbd3d4a08c98b9
parent393d1fd64696d3ac707053f0114b33f9ed19608e (diff)
downloadAntennaPod-933790b0d3068532bdbd6b5b4856e6d49d3dfbdd.zip
Fixed compilation
-rw-r--r--app/build.gradle1
-rw-r--r--app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java22
-rw-r--r--core/build.gradle1
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java3
4 files changed, 11 insertions, 16 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 707ab6188..fa9bfeea8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -136,6 +136,7 @@ dependencies {
implementation "androidx.gridlayout:gridlayout:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.0.0"
implementation "com.google.android.material:material:1.0.0"
+ annotationProcessor "androidx.annotation:annotation:1.1.0"
compileOnly "com.google.android.wearable:wearable:$wearableSupportVersion"
implementation "org.apache.commons:commons-lang3:$commonslangVersion"
implementation "commons-io:commons-io:$commonsioVersion"
diff --git a/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java b/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java
index 5152f3c70..bf5b85c82 100644
--- a/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java
+++ b/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java
@@ -311,9 +311,7 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog {
AccessibilityEventCompat.TYPE_ANNOUNCEMENT);
event.setPackageName(getContext().getPackageName());
event.setClassName(getClass().getName());
- int resId = isPlaying ?
- androidx.appcompat.mediarouter.R.string.mr_controller_pause :
- androidx.appcompat.mediarouter.R.string.mr_controller_play;
+ int resId = isPlaying ? R.string.mr_controller_pause : R.string.mr_controller_play;
event.getText().add(getContext().getString(resId));
accessibilityManager.sendAccessibilityEvent(event);
}
@@ -359,17 +357,17 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog {
if (route.getPresentationDisplay() != null &&
route.getPresentationDisplay().getDisplayId() != MediaRouter.RouteInfo.PRESENTATION_DISPLAY_ID_NONE) {
// The user is currently casting screen.
- titleView.setText(androidx.appcompat.mediarouter.R.string.mr_controller_casting_screen);
+ titleView.setText(R.string.mr_controller_casting_screen);
showTitle = true;
} else if (state == null || state.getState() == PlaybackStateCompat.STATE_NONE) {
// Show "No media selected" as we don't yet know the playback state.
// (Only exception is bluetooth where we don't show anything.)
if (!route.isBluetooth()) {
- titleView.setText(androidx.appcompat.mediarouter.R.string.mr_controller_no_media_selected);
+ titleView.setText(R.string.mr_controller_no_media_selected);
showTitle = true;
}
} else if (!hasTitle && !hasSubtitle) {
- titleView.setText(androidx.appcompat.mediarouter.R.string.mr_controller_no_info_available);
+ titleView.setText(R.string.mr_controller_no_info_available);
showTitle = true;
} else {
if (hasTitle) {
@@ -435,16 +433,12 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog {
| PlaybackStateCompat.ACTION_PLAY_PAUSE)) != 0;
if (isPlaying && supportsPause) {
playPauseButton.setVisibility(View.VISIBLE);
- playPauseButton.setImageResource(getThemeResource(getContext(),
- androidx.appcompat.mediarouter.R.attr.mediaRoutePauseDrawable));
- playPauseButton.setContentDescription(getContext().getResources()
- .getText(androidx.appcompat.mediarouter.R.string.mr_controller_pause));
+ playPauseButton.setImageResource(getThemeResource(getContext(), R.attr.mediaRoutePauseDrawable));
+ playPauseButton.setContentDescription(getContext().getResources().getText(R.string.mr_controller_pause));
} else if (!isPlaying && supportsPlay) {
playPauseButton.setVisibility(View.VISIBLE);
- playPauseButton.setImageResource(getThemeResource(getContext(),
- androidx.appcompat.mediarouter.R.attr.mediaRoutePlayDrawable));
- playPauseButton.setContentDescription(getContext().getResources()
- .getText(androidx.appcompat.mediarouter.R.string.mr_controller_play));
+ playPauseButton.setImageResource(getThemeResource(getContext(), R.attr.mediaRoutePlayDrawable));
+ playPauseButton.setContentDescription(getContext().getResources().getText(R.string.mr_controller_play));
} else {
playPauseButton.setVisibility(View.GONE);
}
diff --git a/core/build.gradle b/core/build.gradle
index 9a724c59f..8e449a379 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -58,6 +58,7 @@ android {
dependencies {
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.preference:preference:1.1.0"
+ annotationProcessor "androidx.annotation:annotation:1.1.0"
implementation "android.arch.work:work-runtime:$workManagerVersion"
implementation "org.apache.commons:commons-lang3:$commonslangVersion"
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
index 79a447c2d..b809ad659 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
@@ -16,7 +16,6 @@ import androidx.core.content.ContextCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.util.Log;
import android.view.KeyEvent;
-import androidx.media.app.NotificationCompat;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import de.danoeh.antennapod.core.ClientConfig;
@@ -195,7 +194,7 @@ public class PlaybackServiceNotificationBuilder extends NotificationCompat.Build
PendingIntent stopButtonPendingIntent = getPendingIntentForMediaAction(
KeyEvent.KEYCODE_MEDIA_STOP, numActions);
- setStyle(new NotificationCompat.MediaStyle()
+ setStyle(new androidx.media.app.NotificationCompat.MediaStyle()
.setMediaSession(mediaSessionToken)
.setShowActionsInCompactView(compactActionList.toArray())
.setShowCancelButton(true)