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

Commit 54781207 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Define failed connections column, and reset.

When retrying a download, always reset the failed connections count.

Bug: 8022478
Change-Id: I0d799d82dc7a04fe788b8c5faee0045d1e1a9c60
parent 9e57c414
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1085,6 +1085,7 @@ public class DownloadManager {
        values.put(Downloads.Impl.COLUMN_TOTAL_BYTES, -1);
        values.putNull(Downloads.Impl._DATA);
        values.put(Downloads.Impl.COLUMN_STATUS, Downloads.Impl.STATUS_PENDING);
        values.put(Downloads.Impl.COLUMN_FAILED_CONNECTIONS, 0);
        mResolver.update(mBaseUri, values, getWhereClauseForIds(ids), getWhereArgsForIds(ids));
    }

+3 −0
Original line number Diff line number Diff line
@@ -407,6 +407,9 @@ public final class Downloads {
         */
        public static final String COLUMN_LAST_UPDATESRC = "lastUpdateSrc";

        /** The column that is used to count retries */
        public static final String COLUMN_FAILED_CONNECTIONS = "numfailed";

        /**
         * default value for {@link #COLUMN_LAST_UPDATESRC}.
         * This value is used when this column's value is not relevant.