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

Commit 193d4db2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Network: Check parameter for NULL in isMmsRequest method"

parents 355eb0a2 aeade6dc
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -254,14 +254,15 @@ public final class AndroidHttpClient implements HttpClient {

    private boolean isMmsRequest()
    {
        if(delegate.getParams() == null ||
                delegate.getParams().getParameter(CoreProtocolPNames.USER_AGENT) == null) {
            return false;
        }

        if(delegate.getParams().getParameter(CoreProtocolPNames.USER_AGENT).toString().contains("Android-Mms"))
        if (delegate != null) {
            HttpParams httpParams = delegate.getParams();
            if (httpParams != null) {
                Object parameter = httpParams.getParameter(CoreProtocolPNames.USER_AGENT);
                if (parameter != null && parameter.toString().contains("Android-Mms")) {
                    return true;

                }
            }
        }
        return false;
    }