Add support for url_bar sanitization on autofill compat mode.

Browsers typically use a standard class (like EditView) to hold the URL of the
page being loaded, and the content of that view is sanitized in the initial
autofill request. So, when running in compat mode, we need a mechanism to let
services tell which view contains the URL, so we can convert its contents to
a sanitized webScheme + webDomain pair or properties.

Test: manual verification
Fixes: 72994424

Change-Id: I8be5f3533d6c31f81f28036dc51d5de10a528079
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 8b64bad..41d05a5 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -1407,7 +1407,8 @@
 
             mSessionId = mService.startSession(client.autofillClientGetActivityToken(),
                     mServiceClient.asBinder(), id, bounds, value, mContext.getUserId(),
-                    mCallback != null, flags, client.autofillClientGetComponentName());
+                    mCallback != null, flags, client.autofillClientGetComponentName(),
+                    isCompatibilityModeEnabledLocked());
             if (mSessionId != NO_SESSION) {
                 mState = STATE_ACTIVE;
             }
@@ -1474,7 +1475,7 @@
                         client.autofillClientGetActivityToken(),
                         mServiceClient.asBinder(), id, bounds, value, mContext.getUserId(),
                         mCallback != null, flags, client.autofillClientGetComponentName(),
-                        mSessionId, action);
+                        mSessionId, action, isCompatibilityModeEnabledLocked());
                 if (newId != mSessionId) {
                     if (sDebug) Log.d(TAG, "Session restarted: " + mSessionId + "=>" + newId);
                     mSessionId = newId;