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

Commit 9c330821 authored by Wei Jia's avatar Wei Jia
Browse files

MediaPlayer2: MEDIA2_INFO_DATA_SOURCE_START is sent by native code

Test: cts
Bug: 109928575
Change-Id: Ia9a1a4cb60e563ae44a4c97ff47360c9a0143283
parent 3830374a
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -210,22 +210,6 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
            @Override
            void process() {
                stayAwake(true);

                // TODO: remove this block when native code sends MEDIA_INFO_DATA_SOURCE_START
                // when pipeline is created.
                if (getState() == PLAYER_STATE_PREPARED) {
                    final DataSourceDesc dsd;
                    synchronized (mSrcLock) {
                        dsd = mCurrentDSD;
                    }
                    synchronized (mEventCbLock) {
                        for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
                            cb.first.execute(() -> cb.second.onInfo(
                                    MediaPlayer2Impl.this, dsd, MEDIA_INFO_DATA_SOURCE_START, 0));
                        }
                    }
                }

                _start();
            }
        });