From 292f9bffb4d4055db57b6e6419591f14e00bfc74 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 14 Feb 2013 10:07:16 -0800 Subject: Update database before sending broadcast. This was moved to to solve a race condition around service shutdown, but ended up causing another race with remote apps. Bug: 8200919 Change-Id: Ief470e9454e9be8ec43ca3ec11e3b3440fa5852d --- src/com/android/providers/downloads/DownloadThread.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index c60b02a0..d19f71be 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -823,10 +823,10 @@ public class DownloadThread implements Runnable { */ private void notifyDownloadCompleted( State state, int finalStatus, String errorMsg, int numFailed) { + notifyThroughDatabase(state, finalStatus, errorMsg, numFailed); if (Downloads.Impl.isStatusCompleted(finalStatus)) { mInfo.sendIntentIfRequested(); } - notifyThroughDatabase(state, finalStatus, errorMsg, numFailed); } private void notifyThroughDatabase( -- cgit v1.2.3