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

Commit e10330fa authored by Steve Howard's avatar Steve Howard Committed by Android Git Automerger
Browse files

am efb8b427: am 4ba2817c: Merge "Avoid NPE when viewing failed legacy download...

am efb8b427: am 4ba2817c: Merge "Avoid NPE when viewing failed legacy download with no local path" into gingerbread

Merge commit 'efb8b427'

* commit 'efb8b427':
  Avoid NPE when viewing failed legacy download with no local path
parents 980d40b5 efb8b427
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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