blob: 2b924fbaadc422733cef023a7895674af774ff56 [file] [log] [blame]
Felipe Lemee348dc32018-11-05 12:35:29 -08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.service.intelligence;
18
Felipe Leme284ad1c2018-11-15 18:16:12 -080019import android.os.IBinder;
Felipe Lemeecb08be2018-11-27 15:48:47 -080020import android.service.intelligence.ContentCaptureEventsRequest;
Felipe Lemee348dc32018-11-05 12:35:29 -080021import android.service.intelligence.InteractionSessionId;
22import android.service.intelligence.InteractionContext;
Winson Chungfbbb1582018-11-13 16:09:01 -080023import android.service.intelligence.SnapshotData;
Felipe Lemee348dc32018-11-05 12:35:29 -080024
Felipe Leme284ad1c2018-11-15 18:16:12 -080025import android.view.autofill.AutofillId;
Felipe Lemebf93cdc2018-12-03 12:05:58 -080026import android.view.autofill.AutofillValue;
Felipe Leme7a534082018-11-05 15:03:04 -080027import android.view.intelligence.ContentCaptureEvent;
28
29import java.util.List;
30
Felipe Lemee348dc32018-11-05 12:35:29 -080031/**
32 * Interface from the system to an intelligence service.
33 *
34 * @hide
35 */
Felipe Lemeecb08be2018-11-27 15:48:47 -080036 // TODO(b/111276913): rename / update javadoc (once the final name is defined)
Felipe Lemee348dc32018-11-05 12:35:29 -080037oneway interface IIntelligenceService {
38
39 // Called when session is created (context not null) or destroyed (context null)
40 void onSessionLifecycle(in InteractionContext context, in InteractionSessionId sessionId);
Felipe Leme7a534082018-11-05 15:03:04 -080041
Felipe Lemeecb08be2018-11-27 15:48:47 -080042 void onContentCaptureEventsRequest(in InteractionSessionId sessionId,
43 in ContentCaptureEventsRequest request);
Winson Chungfbbb1582018-11-13 16:09:01 -080044
45 void onActivitySnapshot(in InteractionSessionId sessionId,
46 in SnapshotData snapshotData);
Felipe Leme284ad1c2018-11-15 18:16:12 -080047
48 void onAutofillRequest(in InteractionSessionId sessionId, in IBinder autofillManagerClient,
Felipe Lemebf93cdc2018-12-03 12:05:58 -080049 int autofilSessionId, in AutofillId focusedId,
50 in AutofillValue focusedValue, long requestTime);
Felipe Leme284ad1c2018-11-15 18:16:12 -080051
52 void onDestroyAutofillWindowsRequest(in InteractionSessionId sessionId);
Felipe Lemee348dc32018-11-05 12:35:29 -080053}