diff options
author | Jeff Sharkey <jsharkey@android.com> | 2011-10-17 07:07:17 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-17 07:07:17 -0700 |
commit | 5daf15ebb799fa78cfe134bbdb7d69e3cb7244d3 (patch) | |
tree | 12745e365b14c47d798b2dfffef72351ae1d2526 /src | |
parent | 255582a7542bc16622369986e1ba0484270b2e8d (diff) | |
parent | c5c30ba14d411b3e23c983912e7fea4f449c9f54 (diff) | |
download | android_packages_providers_DownloadProvider-5daf15ebb799fa78cfe134bbdb7d69e3cb7244d3.tar.gz android_packages_providers_DownloadProvider-5daf15ebb799fa78cfe134bbdb7d69e3cb7244d3.tar.bz2 android_packages_providers_DownloadProvider-5daf15ebb799fa78cfe134bbdb7d69e3cb7244d3.zip |
am c5c30ba1: NPE check before finalizeDestinationFile().
* commit 'c5c30ba14d411b3e23c983912e7fea4f449c9f54':
NPE check before finalizeDestinationFile().
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/providers/downloads/DownloadThread.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index c4b6353e..63a51a8f 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -315,9 +315,11 @@ public class DownloadThread extends Thread { * Called after a successful completion to take any necessary action on the downloaded file. */ private void finalizeDestinationFile(State state) throws StopRequestException { - // make sure the file is readable - FileUtils.setPermissions(state.mFilename, 0644, -1, -1); - syncDestination(state); + if (state.mFilename != null) { + // make sure the file is readable + FileUtils.setPermissions(state.mFilename, 0644, -1, -1); + syncDestination(state); + } } /** |