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 import android.system.virtualizationmaintenance.IVirtualizationReconciliationCallback;
20 
21 interface IVirtualizationMaintenance {
22     /**
23      * Notification that an app has been permanently removed, to allow related global state to
24      * be removed.
25      *
26      * @param userId The Android user ID for whom the notification applies.
27      */
appRemoved(int userId, int appId)28     void appRemoved(int userId, int appId);
29 
30     /**
31      * Notification that a user has been removed, to allow related global state to be removed.
32      *
33      * @param userId The Android user ID of the user.
34      */
userRemoved(int userId)35     void userRemoved(int userId);
36 
37     /*
38      * Requests virtualization service to perform reconciliation of Secretkeeper secrets.
39      * Secrets belonging to apps or users that no longer exist should be deleted.
40      * The supplied callback allows for querying of existence.
41      * This method should return on successful completion of the reconciliation process.
42      * It should throw an exception if there is any failure, or if any of the callback
43      * functions return {@code ERROR_STOP_REQUESTED}.
44      */
performReconciliation(IVirtualizationReconciliationCallback callback)45     void performReconciliation(IVirtualizationReconciliationCallback callback);
46 }
47