am 4ba2817c: Merge "Avoid NPE when viewing failed legacy download with no local path" into gingerbread
Merge commit '4ba2817c869d4ec6b518a57ea32cc3765b18b0db' into gingerbread-plus-aosp * commit '4ba2817c869d4ec6b518a57ea32cc3765b18b0db': Avoid NPE when viewing failed legacy download with no local path
This commit is contained in:
@@ -923,7 +923,11 @@ public class DownloadManager {
|
||||
|
||||
if (destinationType == Downloads.Impl.DESTINATION_EXTERNAL) {
|
||||
// return stored destination for legacy external download
|
||||
return Uri.fromFile(new File(getUnderlyingString(Downloads.Impl._DATA))).toString();
|
||||
String localPath = getUnderlyingString(Downloads.Impl._DATA);
|
||||
if (localPath == null) {
|
||||
return null;
|
||||
}
|
||||
return Uri.fromFile(new File(localPath)).toString();
|
||||
}
|
||||
|
||||
// return content URI for cache download
|
||||
|
||||
Reference in New Issue
Block a user