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.apex; 18 19 import android.apex.ApexInfo; 20 import android.apex.ApexInfoList; 21 import android.apex.ApexSessionInfo; 22 23 interface IApexService { submitStagedSession(int session_id, in int[] child_session_ids, out ApexInfoList packages)24 boolean submitStagedSession(int session_id, in int[] child_session_ids, out ApexInfoList packages); markStagedSessionReady(int session_id)25 boolean markStagedSessionReady(int session_id); markStagedSessionSuccessful(int session_id)26 void markStagedSessionSuccessful(int session_id); 27 getSessions()28 ApexSessionInfo[] getSessions(); getStagedSessionInfo(int session_id)29 ApexSessionInfo getStagedSessionInfo(int session_id); getActivePackages()30 ApexInfo[] getActivePackages(); getAllPackages()31 ApexInfo[] getAllPackages(); 32 abortActiveSession()33 void abortActiveSession(); 34 unstagePackages(in @tf8InCpp List<String> active_package_paths)35 void unstagePackages(in @utf8InCpp List<String> active_package_paths); 36 37 /** 38 * Returns the active package corresponding to |package_name| and null 39 * if none exists. 40 */ getActivePackage(in @tf8InCpp String package_name)41 ApexInfo getActivePackage(in @utf8InCpp String package_name); 42 43 /** 44 * Not meant for use outside of testing. The call will not be 45 * functional on user builds. 46 */ activatePackage(in @tf8InCpp String package_path)47 void activatePackage(in @utf8InCpp String package_path); 48 /** 49 * Not meant for use outside of testing. The call will not be 50 * functional on user builds. 51 */ deactivatePackage(in @tf8InCpp String package_path)52 void deactivatePackage(in @utf8InCpp String package_path); 53 /** 54 * Not meant for use outside of testing. The call will not be 55 * functional on user builds. 56 */ preinstallPackages(in @tf8InCpp List<String> package_tmp_paths)57 void preinstallPackages(in @utf8InCpp List<String> package_tmp_paths); 58 /** 59 * Not meant for use outside of testing. The call will not be 60 * functional on user builds. 61 */ postinstallPackages(in @tf8InCpp List<String> package_tmp_paths)62 void postinstallPackages(in @utf8InCpp List<String> package_tmp_paths); 63 /** 64 * Not meant for use outside of testing. The call will not be 65 * functional on user builds. 66 */ stagePackage(in @tf8InCpp String package_tmp_path)67 boolean stagePackage(in @utf8InCpp String package_tmp_path); 68 /** 69 * Not meant for use outside of testing. The call will not be 70 * functional on user builds. 71 */ stagePackages(in @tf8InCpp List<String> package_tmp_paths)72 boolean stagePackages(in @utf8InCpp List<String> package_tmp_paths); 73 /** 74 * Not meant for use outside of testing. The call will not be 75 * functional on user builds. 76 */ rollbackActiveSession()77 void rollbackActiveSession(); 78 /** 79 * Not meant for use outside of testing. The call will not be 80 * functional on user builds. 81 */ resumeRollbackIfNeeded()82 void resumeRollbackIfNeeded(); 83 } 84