|
23 | 23 | import android.support.annotation.Nullable;
|
24 | 24 | import android.support.v4.media.RatingCompat;
|
25 | 25 | import android.support.v4.media.session.MediaControllerCompat;
|
26 |
| -import android.support.v4.media.session.PlaybackStateCompat; |
27 | 26 | import android.text.TextUtils;
|
28 | 27 | import android.util.Log;
|
29 | 28 |
|
@@ -163,17 +162,6 @@ public static List createActions(@NonNull final Context context) {
|
163 | 162 | controller.getTransportControls().skipToPrevious());
|
164 | 163 | actions.add(action);
|
165 | 164 |
|
166 |
| - action = new Action(R.id.action_thumbs_up, context.getString(R.string.action_thumbs_up)); |
167 |
| - action.setMediaControllerAction((controller, id, extras) -> |
168 |
| - controller.getTransportControls().setRating(RatingCompat.newThumbRating(true))); |
169 |
| - actions.add(action); |
170 |
| - |
171 |
| - action = new Action(R.id.action_thumbs_down, |
172 |
| - context.getString(R.string.action_thumbs_down)); |
173 |
| - action.setMediaControllerAction((controller, id, extras) -> |
174 |
| - controller.getTransportControls().setRating(RatingCompat.newThumbRating(false))); |
175 |
| - actions.add(action); |
176 |
| - |
177 | 165 | action = new Action(R.id.action_skip_30s_backward,
|
178 | 166 | context.getString(R.string.action_skip_30s_backward));
|
179 | 167 | action.setMediaControllerAction((controller, id, extras) -> {
|
@@ -202,17 +190,6 @@ public static List createActions(@NonNull final Context context) {
|
202 | 190 | controller.getTransportControls().rewind());
|
203 | 191 | actions.add(action);
|
204 | 192 |
|
205 |
| - action = new Action(R.id.action_toggle_shuffle, |
206 |
| - context.getString(R.string.action_toggle_shuffle)); |
207 |
| - action.setMediaControllerAction((controller, id, extras) -> { |
208 |
| - final int shuffleMode = |
209 |
| - controller.getShuffleMode() != PlaybackStateCompat.SHUFFLE_MODE_ALL |
210 |
| - ? PlaybackStateCompat.SHUFFLE_MODE_ALL |
211 |
| - : PlaybackStateCompat.SHUFFLE_MODE_NONE; |
212 |
| - controller.getTransportControls().setShuffleMode(shuffleMode); |
213 |
| - }); |
214 |
| - actions.add(action); |
215 |
| - |
216 | 193 | return actions;
|
217 | 194 | }
|
218 | 195 |
|
|
0 commit comments