Allow to finish session when all views are gone

An service can option to finish the session once all views that it
declared as important. Views that are important are all autofillable
views of any partition and the saveable fields of the last partition.

Test: CtsAutoFillServiceTestCases
Fixes: 35708237
Change-Id: I0ccade8ebb427e5d8928697ef0007c75d3f83df0
diff --git a/core/java/android/view/autofill/IAutoFillManagerClient.aidl b/core/java/android/view/autofill/IAutoFillManagerClient.aidl
index 56f91ed..1a6bad2 100644
--- a/core/java/android/view/autofill/IAutoFillManagerClient.aidl
+++ b/core/java/android/view/autofill/IAutoFillManagerClient.aidl
@@ -49,6 +49,13 @@
     void authenticate(int sessionId, in IntentSender intent, in Intent fillInIntent);
 
     /**
+      * Sets the views to track. If saveOnAllViewsInvisible is set and all these view are invisible
+      * the session is finished automatically.
+      */
+    void setTrackedViews(int sessionId, in List<AutofillId> ids,
+            boolean saveOnAllViewsInvisible);
+
+    /**
      * Requests showing the fill UI.
      */
     void requestShowFillUi(int sessionId, in IBinder windowToken, in AutofillId id, int width,