1 /*
2  * Copyright 2024 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.system.virtualizationmaintenance;
18 
19 /*
20  * Callback interface provided when reconciliation is performed to allow verifying whether users
21  * and apps currently exist.
22  */
23 interface IVirtualizationReconciliationCallback {
24     /*
25      * Service-specific error code indicating that the job scheduler has requested that we
26      * stop
27      */
28     const int ERROR_STOP_REQUESTED = 1;
29 
30     /*
31      * Determine whether users with selected IDs currently exist. The result is an array of booleans
32      * which indicate whether the corresponding entry in the {@code userIds} array is a valid
33      * user ID.
34      */
doUsersExist(in int[] userIds)35     boolean[] doUsersExist(in int[] userIds);
36 
37     /*
38      * Determine whether apps with selected app IDs currently exist for a specific user.
39      * The result is an array of booleans which indicate whether the corresponding entry in the
40      * {@code appIds} array is a current app ID for the user.
41      */
doAppsExist(int userId, in int[] appIds)42     boolean[] doAppsExist(int userId, in int[] appIds);
43 }
44