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

Commit c60df506 authored by Gloria Wang's avatar Gloria Wang Committed by Android Git Automerger
Browse files

am 3e18dfab: am 4da48ec8: Merge "Notify the playback status to DRM agents...

am 3e18dfab: am 4da48ec8: Merge "Notify the playback status to DRM agents before the playback starts"

* commit '3e18dfab':
  Notify the playback status to DRM agents before the playback starts
parents 35f2d399 3e18dfab
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -707,6 +707,13 @@ status_t AwesomePlayer::play_l() {

    bool deferredAudioSeek = false;

    if (mDecryptHandle != NULL) {
        int64_t position;
        getPosition(&position);
        mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
                Playback::START, position / 1000);
    }

    if (mAudioSource != NULL) {
        if (mAudioPlayer == NULL) {
            if (mAudioSink != NULL) {
@@ -724,6 +731,11 @@ status_t AwesomePlayer::play_l() {

                    mFlags &= ~(PLAYING | FIRST_FRAME);

                    if (mDecryptHandle != NULL) {
                        mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
                                 Playback::STOP, 0);
                    }

                    return err;
                }

@@ -760,13 +772,6 @@ status_t AwesomePlayer::play_l() {
        seekTo_l(0);
    }

    if (mDecryptHandle != NULL) {
        int64_t position;
        getPosition(&position);
        mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
                Playback::START, position / 1000);
    }

    return OK;
}