Felipe Leme | e348dc3 | 2018-11-05 12:35:29 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.view.intelligence; |
| 18 | |
| 19 | import android.content.ComponentName; |
| 20 | import android.os.IBinder; |
Felipe Leme | a7bdb14 | 2018-11-05 16:29:29 -0800 | [diff] [blame] | 21 | import android.service.intelligence.InteractionSessionId; |
Felipe Leme | 7a53408 | 2018-11-05 15:03:04 -0800 | [diff] [blame] | 22 | import android.view.intelligence.ContentCaptureEvent; |
| 23 | |
Felipe Leme | e348dc3 | 2018-11-05 12:35:29 -0800 | [diff] [blame] | 24 | import com.android.internal.os.IResultReceiver; |
| 25 | |
Felipe Leme | 7a53408 | 2018-11-05 15:03:04 -0800 | [diff] [blame] | 26 | import java.util.List; |
| 27 | |
Felipe Leme | e348dc3 | 2018-11-05 12:35:29 -0800 | [diff] [blame] | 28 | /** |
| 29 | * {@hide} |
| 30 | */ |
Felipe Leme | ecb08be | 2018-11-27 15:48:47 -0800 | [diff] [blame] | 31 | // TODO(b/111276913): rename once the final name is defined |
Felipe Leme | e348dc3 | 2018-11-05 12:35:29 -0800 | [diff] [blame] | 32 | oneway interface IIntelligenceManager { |
| 33 | /** |
| 34 | * Starts a session, sending the "remote" sessionId to the receiver. |
| 35 | */ |
| 36 | void startSession(int userId, IBinder activityToken, in ComponentName componentName, |
Felipe Leme | a7bdb14 | 2018-11-05 16:29:29 -0800 | [diff] [blame] | 37 | in InteractionSessionId sessionId, int flags, in IResultReceiver result); |
Felipe Leme | e348dc3 | 2018-11-05 12:35:29 -0800 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Finishes a session. |
| 41 | */ |
Felipe Leme | b18e317 | 2018-11-27 10:33:41 -0800 | [diff] [blame] | 42 | void finishSession(int userId, in InteractionSessionId sessionId, |
| 43 | in List<ContentCaptureEvent> events); |
Felipe Leme | 7a53408 | 2018-11-05 15:03:04 -0800 | [diff] [blame] | 44 | |
| 45 | /** |
| 46 | * Sends a batch of events |
| 47 | */ |
Felipe Leme | a7bdb14 | 2018-11-05 16:29:29 -0800 | [diff] [blame] | 48 | void sendEvents(int userId, in InteractionSessionId sessionId, |
| 49 | in List<ContentCaptureEvent> events); |
Felipe Leme | e348dc3 | 2018-11-05 12:35:29 -0800 | [diff] [blame] | 50 | } |