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

Commit 7bf786f5 authored by Gyumin Sim's avatar Gyumin Sim
Browse files

Remove obsolete method in IMediaBrowserServiceCallbacks

It removes onLoadChildren because onLoadChildren is not used anymore
that is identical to onLoadChildrenWithOptions with null options. It
also renames onLoadChildrenWithOptions to onLoadChildren for simpler
name.

Test: atest CtsMediaTestCases:android.media.cts.MediaBrowserTest \
  CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest
Change-Id: I6aebd812249cd3a717aa6d2f48e4a40601ef1063
parent 9d211b74
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -1106,13 +1106,7 @@ public final class MediaBrowser {
        }

        @Override
        public void onLoadChildren(String parentId, ParceledListSlice list) {
            onLoadChildrenWithOptions(parentId, list, null);
        }

        @Override
        public void onLoadChildrenWithOptions(String parentId, ParceledListSlice list,
                final Bundle options) {
        public void onLoadChildren(String parentId, ParceledListSlice list, Bundle options) {
            MediaBrowser mediaBrowser = mMediaBrowser.get();
            if (mediaBrowser != null) {
                mediaBrowser.onLoadChildren(this, parentId, list, options);
+1 −3
Original line number Diff line number Diff line
@@ -23,7 +23,5 @@ oneway interface IMediaBrowserServiceCallbacks {
    void onConnect(String root, in MediaSession.Token session, in Bundle extras);
    @UnsupportedAppUsage
    void onConnectFailed();
    void onLoadChildren(String mediaId, in ParceledListSlice list);
    void onLoadChildrenWithOptions(String mediaId, in ParceledListSlice list,
            in Bundle options);
    void onLoadChildren(String mediaId, in ParceledListSlice list, in Bundle options);
}
+1 −1
Original line number Diff line number Diff line
@@ -687,7 +687,7 @@ public abstract class MediaBrowserService extends Service {
                final ParceledListSlice<MediaBrowser.MediaItem> pls =
                        filteredList == null ? null : new ParceledListSlice<>(filteredList);
                try {
                    connection.callbacks.onLoadChildrenWithOptions(parentId, pls, options);
                    connection.callbacks.onLoadChildren(parentId, pls, options);
                } catch (RemoteException ex) {
                    // The other side is in the process of crashing.
                    Log.w(TAG, "Calling onLoadChildren() failed for id=" + parentId