Felipe Leme | 749b889 | 2018-12-03 16:30:30 -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.contentcapture; |
| 18 | |
| 19 | import android.content.ComponentName; |
Felipe Leme | aa5088e | 2018-12-10 14:53:58 -0800 | [diff] [blame] | 20 | import android.view.contentcapture.ContentCaptureContext; |
Felipe Leme | 749b889 | 2018-12-03 16:30:30 -0800 | [diff] [blame] | 21 | import android.view.contentcapture.ContentCaptureEvent; |
Adam He | 3d0409b | 2019-01-15 14:22:04 -0800 | [diff] [blame^] | 22 | import android.view.contentcapture.UserDataRemovalRequest; |
Felipe Leme | 749b889 | 2018-12-03 16:30:30 -0800 | [diff] [blame] | 23 | import android.os.IBinder; |
| 24 | |
| 25 | import com.android.internal.os.IResultReceiver; |
| 26 | |
| 27 | import java.util.List; |
| 28 | |
| 29 | /** |
Felipe Leme | b9687849 | 2018-12-17 12:22:29 -0800 | [diff] [blame] | 30 | * Interface between an app (ContentCaptureManager / ContentCaptureSession) and the system-server |
| 31 | * implementation service (ContentCaptureManagerService). |
| 32 | * |
| 33 | * @hide |
| 34 | */ |
Felipe Leme | 749b889 | 2018-12-03 16:30:30 -0800 | [diff] [blame] | 35 | oneway interface IContentCaptureManager { |
Perumaal S | addabba | 2019-01-04 16:43:35 -0800 | [diff] [blame] | 36 | /** |
| 37 | * Starts a new session for the provided {@code userId} running as part of the |
| 38 | * app's activity identified by {@code activityToken}/{@code componentName}. |
| 39 | * |
| 40 | * @param sessionId Unique session id as provided by the app. |
| 41 | * @param flags Meta flags that enable or disable content capture (see |
| 42 | * {@link IContentCaptureContext#flags}). |
| 43 | */ |
Felipe Leme | 749b889 | 2018-12-03 16:30:30 -0800 | [diff] [blame] | 44 | void startSession(int userId, IBinder activityToken, in ComponentName componentName, |
Felipe Leme | 87a9dc9 | 2018-12-18 14:28:07 -0800 | [diff] [blame] | 45 | String sessionId, int flags, in IResultReceiver result); |
Perumaal S | addabba | 2019-01-04 16:43:35 -0800 | [diff] [blame] | 46 | |
| 47 | /** |
| 48 | * Marks the end of a session for the provided {@code userId} identified by |
| 49 | * the corresponding {@code startSession}'s {@code sessionId}. |
| 50 | */ |
Felipe Leme | b9687849 | 2018-12-17 12:22:29 -0800 | [diff] [blame] | 51 | void finishSession(int userId, String sessionId); |
Perumaal S | addabba | 2019-01-04 16:43:35 -0800 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * Returns the content capture service's component name (if enabled and |
| 55 | * connected). |
| 56 | * @param Receiver of the content capture service's @{code ComponentName} |
| 57 | * provided {@code Bundle} with key "{@code EXTRA}". |
| 58 | */ |
| 59 | void getReceiverServiceComponentName(int userId, in IResultReceiver result); |
Adam He | 3d0409b | 2019-01-15 14:22:04 -0800 | [diff] [blame^] | 60 | |
| 61 | /** |
| 62 | * Requests the removal of user data for the provided {@code userId}. |
| 63 | */ |
| 64 | void removeUserData(int userId, in UserDataRemovalRequest request); |
Felipe Leme | 749b889 | 2018-12-03 16:30:30 -0800 | [diff] [blame] | 65 | } |