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

Commit 78e94560 authored by mtk08122's avatar mtk08122 Committed by android-build-merger
Browse files

Merge "Fix abnormal consumption of mobile data" into qt-dev

am: d114f841

Change-Id: Id9dfcdfd494eea0750d04861ab18457f8a0ee508
parents 1e7ef6c7 d114f841
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ PlaylistFetcher::PlaylistFetcher(
      mPlaylistTimeUs(-1LL),
      mSeqNumber(-1),
      mNumRetries(0),
      mNumRetriesForMonitorQueue(0),
      mStartup(true),
      mIDRFound(false),
      mSeekMode(LiveSession::kSeekModeExactPosition),
@@ -849,7 +850,17 @@ void PlaylistFetcher::onMonitorQueue() {
    // in the middle of an unfinished download, delay
    // playlist refresh as it'll change seq numbers
    if (!mDownloadState->hasSavedState()) {
        refreshPlaylist();
        status_t err = refreshPlaylist();
        if (err != OK) {
            if (mNumRetriesForMonitorQueue < kMaxNumRetries) {
                ++mNumRetriesForMonitorQueue;
            } else {
                notifyError(err);
            }
            return;
        } else {
            mNumRetriesForMonitorQueue = 0;
        }
    }

    int64_t targetDurationUs = kMinBufferedDurationUs;
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ private:
    sp<M3UParser> mPlaylist;
    int32_t mSeqNumber;
    int32_t mNumRetries;
    int32_t mNumRetriesForMonitorQueue;
    bool mStartup;
    bool mIDRFound;
    int32_t mSeekMode;