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

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

Merge "AppOps: add null pointer check for isMmsRequest"

parents 9862390e 8ab9b1e7
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -257,8 +257,15 @@ public final class AndroidHttpClient implements HttpClient {

    private boolean isMmsRequest()
    {
        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;
    }