1 /*
2  * Copyright (C) 2022 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 com.android.internal.os;
18 
19 import android.os.Bundle;
20 
21 /**
22  * "Backend" interface used by {@link android.os.BinaryTransparencyManager} to talk to the
23  * BinaryTransparencyService that actually implements the measurement and information aggregation
24  * functionality.
25  *
26  * @see BinaryTransparencyManager
27  */
28 interface IBinaryTransparencyService {
getSignedImageInfo()29     String getSignedImageInfo();
30 
recordMeasurementsForAllPackages()31     void recordMeasurementsForAllPackages();
32 
33     parcelable ApexInfo {
34         String packageName;
35         long longVersion;
36         byte[] digest;
37         int digestAlgorithm;
38         String[] signerDigests;
39 
40         // Test only
41         String moduleName;
42     }
43 
44     parcelable AppInfo {
45         String packageName;
46         long longVersion;
47         String splitName;
48         byte[] digest;
49         int digestAlgorithm;
50         String[] signerDigests;
51         int mbaStatus;
52         String initiator;
53         String[] initiatorSignerDigests;
54         String installer;
55         String originator;
56     }
57 
58     /** Test only */
collectAllApexInfo(boolean includeTestOnly)59     List<ApexInfo> collectAllApexInfo(boolean includeTestOnly);
collectAllUpdatedPreloadInfo(in Bundle packagesToSkip)60     List<AppInfo> collectAllUpdatedPreloadInfo(in Bundle packagesToSkip);
collectAllSilentInstalledMbaInfo(in Bundle packagesToSkip)61     List<AppInfo> collectAllSilentInstalledMbaInfo(in Bundle packagesToSkip);
62 }