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

Commit d114f841 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 7915fe69 57af4023
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;