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

Commit 98f4c694 authored by Felipe Leme's avatar Felipe Leme
Browse files

Sanity check to avoice NPE if an app-provided URI is invalid.

Test: atest VirtualContainerActivityCompatModeTest#testAutofillSync

Fixes: 73790788

Change-Id: Ic73eb800f4532425effb03396f0ab455142ab6dc
parent 82409585
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1309,6 +1309,11 @@ public class AssistStructure implements Parcelable {
            if (domain == null) return;

            final Uri uri = Uri.parse(domain);
            if (uri == null) {
                // Cannot log domain because it could contain PII;
                Log.w(TAG, "Failed to parse web domain");
                return;
            }
            mWebScheme = uri.getScheme();
            mWebDomain = uri.getHost();
        }