From 0d7cdd98bca4827a650180bc7fd5c68ac0cea7c9 Mon Sep 17 00:00:00 2001 From: segler-alex Date: Thu, 28 Jul 2016 00:15:27 +0200 Subject: [PATCH] deprecation fix --- .../java/net/programmierecke/radiodroid2/PlayerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/programmierecke/radiodroid2/PlayerService.java b/app/src/main/java/net/programmierecke/radiodroid2/PlayerService.java index 5a6ae19a0..b146786c1 100644 --- a/app/src/main/java/net/programmierecke/radiodroid2/PlayerService.java +++ b/app/src/main/java/net/programmierecke/radiodroid2/PlayerService.java @@ -19,6 +19,7 @@ import android.os.PowerManager; import android.os.RemoteException; import android.support.v4.app.NotificationCompat; +import android.support.v4.content.res.ResourcesCompat; import android.text.TextUtils; import android.util.Log; import android.widget.Toast; @@ -288,7 +289,7 @@ public void SendMessage(String theTitle, String theMessage, String theTicker) { .setOngoing(true) .setUsesChronometer(true) .setSmallIcon(R.drawable.ic_play_arrow_24dp) - .setLargeIcon((((BitmapDrawable) getResources().getDrawable(R.drawable.ic_launcher)).getBitmap())) + .setLargeIcon((((BitmapDrawable) ResourcesCompat.getDrawable(getResources(), R.drawable.ic_launcher, null)).getBitmap())) .addAction(R.drawable.ic_stop_24dp,"Stop",pendingIntentStop) .build();