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

Commit 38c94a3e authored by Clément Julliard's avatar Clément Julliard
Browse files

Improve error message in setDestinationInExternalPublicDir.

Forwarding the RemoteException to the IllegalStateException will give helpful context to users getting this exception.

Bug: 309579395
Change-Id: Ia4a4647bc5a6c78e3c15d8c9555d9755b401500f
parent 17fe3ebe
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -575,8 +575,9 @@ public class DownloadManager {
                    extras.putString(Downloads.DIR_TYPE, dirType);
                    client.call(Downloads.CALL_CREATE_EXTERNAL_PUBLIC_DIR, null, extras);
                } catch (RemoteException e) {
                    throw new IllegalStateException("Unable to create directory: "
                            + file.getAbsolutePath());
                    throw new IllegalStateException(
                        "Unable to create directory: " + file.getAbsolutePath(),
                        e);
                }
            } else {
                if (file.exists()) {