Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_providers_DownloadProvider
Commits
7a305029
Commit
7a305029
authored
13 years ago
by
Jeff Sharkey
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Download
Plain Diff
Merge "Sanity check only after updating from file size." into ics-mr0
parents
3074179d
3e1f6ff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/com/android/providers/downloads/DownloadThread.java
src/com/android/providers/downloads/DownloadThread.java
+7
-7
No files found.
src/com/android/providers/downloads/DownloadThread.java
View file @
7a305029
...
...
@@ -162,13 +162,6 @@ public class DownloadThread extends Thread {
boolean
finished
=
false
;
while
(!
finished
)
{
if
(
state
.
mCurrentBytes
==
state
.
mTotalBytes
)
{
Log
.
i
(
Constants
.
TAG
,
"Skipping initiating request for download "
+
mInfo
.
mId
+
"; already completed"
);
finished
=
true
;
break
;
}
Log
.
i
(
Constants
.
TAG
,
"Initiating request for download "
+
mInfo
.
mId
);
// Set or unset proxy, which may have changed since last GET request.
// setDefaultProxy() supports null as proxy parameter.
...
...
@@ -243,6 +236,13 @@ public class DownloadThread extends Thread {
setupDestinationFile
(
state
,
innerState
);
addRequestHeaders
(
state
,
request
);
// skip when already finished; remove after fixing race in 5217390
if
(
state
.
mCurrentBytes
==
state
.
mTotalBytes
)
{
Log
.
i
(
Constants
.
TAG
,
"Skipping initiating request for download "
+
mInfo
.
mId
+
"; already completed"
);
return
;
}
// check just before sending the request to avoid using an invalid connection at all
checkConnectivity
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment