Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5dfa0a5f authored by RoboErik's avatar RoboErik
Browse files

Minor tweaks to MediaBrowser

-A swapped the param order on MediaBrowser.MediaItem constructor
-Added a missing aidl file for MediaItem

bug:17205016
Change-Id: I61538d76f76a993ed5a47b881e0d291fef1d8db3
parent 14f717a5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -489,8 +489,11 @@ aidl_files := \
	frameworks/base/location/java/android/location/FusedBatchOptions.aidl \
	frameworks/base/location/java/com/android/internal/location/ProviderProperties.aidl \
	frameworks/base/location/java/com/android/internal/location/ProviderRequest.aidl \
	frameworks/base/media/java/android/media/AudioAttributes.aidl \
	frameworks/base/media/java/android/media/MediaDescription.aidl \
	frameworks/base/media/java/android/media/MediaMetadata.aidl \
	frameworks/base/media/java/android/media/Rating.aidl \
	frameworks/base/media/java/android/media/browse/MediaBrowser.aidl \
	frameworks/base/media/java/android/media/session/MediaSession.aidl \
	frameworks/base/media/java/android/media/session/PlaybackState.aidl \
	frameworks/base/telephony/java/android/telephony/ServiceState.aidl \
+1 −1
Original line number Diff line number Diff line
@@ -16275,7 +16275,7 @@ package android.media.browse {
  }
  public static class MediaBrowser.MediaItem implements android.os.Parcelable {
    ctor public MediaBrowser.MediaItem(int, android.media.MediaDescription);
    ctor public MediaBrowser.MediaItem(android.media.MediaDescription, int);
    method public int describeContents();
    method public android.media.MediaDescription getDescription();
    method public int getFlags();
+18 −0
Original line number Diff line number Diff line
/* Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/

package android.media.browse;

parcelable MediaBrowser.MediaItem;
 No newline at end of file
+2 −3
Original line number Diff line number Diff line
@@ -544,12 +544,11 @@ public final class MediaBrowser {

        /**
         * Create a new MediaItem for use in browsing media.
         *
         * @param flags The flags for this item.
         * @param description The description of the media, which must include a
         *            media id.
         * @param flags The flags for this item.
         */
        public MediaItem(@Flags int flags, @NonNull MediaDescription description) {
        public MediaItem(@NonNull MediaDescription description, @Flags int flags) {
            if (description == null) {
                throw new IllegalArgumentException("description cannot be null");
            }
+2 −2
Original line number Diff line number Diff line
@@ -134,8 +134,8 @@ public class BrowserService extends MediaBrowserService {
                        bob.setSubtitle("Summary " + i);
                        bob.setMediaId(Uri.withAppendedPath(BASE_URI,
                                Integer.toString(i)).toString());
                        list.add(new MediaBrowser.MediaItem(MediaBrowser.MediaItem.FLAG_BROWSABLE,
                                bob.build()));
                        list.add(new MediaBrowser.MediaItem(bob.build(),
                                MediaBrowser.MediaItem.FLAG_BROWSABLE));
                    }

                    result.sendResult(list);