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

Commit 6fd87f58 authored by Romain Hunault's avatar Romain Hunault
Browse files

Change default user-agent

parent 5f07e1a4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,11 @@ public class HttpURLConnectionClient implements DownloadClient {
            DownloadClient.DownloadCallback callback,
            boolean useDuplicateLinks) throws IOException {
        mClient = (HttpURLConnection) new URL(url).openConnection();

        String defaultUserAgent = mClient.getRequestProperty("User-Agent");
        String newUserAgent = defaultUserAgent+" ota_007_eels";
        mClient.setRequestProperty("User-Agent", newUserAgent);

        mDestination = destination;
        mProgressListener = progressListener;
        mCallback = callback;