1*33f37583SAndroid Build Coastguard Worker /* 2*33f37583SAndroid Build Coastguard Worker * Copyright (C) 2019 The Android Open Source Project 3*33f37583SAndroid Build Coastguard Worker * 4*33f37583SAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*33f37583SAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*33f37583SAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*33f37583SAndroid Build Coastguard Worker * 8*33f37583SAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*33f37583SAndroid Build Coastguard Worker * 10*33f37583SAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*33f37583SAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*33f37583SAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*33f37583SAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*33f37583SAndroid Build Coastguard Worker * limitations under the License. 15*33f37583SAndroid Build Coastguard Worker */ 16*33f37583SAndroid Build Coastguard Worker 17*33f37583SAndroid Build Coastguard Worker #include "apex_file.h" 18*33f37583SAndroid Build Coastguard Worker 19*33f37583SAndroid Build Coastguard Worker #include <android-base/result.h> 20*33f37583SAndroid Build Coastguard Worker 21*33f37583SAndroid Build Coastguard Worker namespace android { 22*33f37583SAndroid Build Coastguard Worker namespace apex { 23*33f37583SAndroid Build Coastguard Worker namespace shim { 24*33f37583SAndroid Build Coastguard Worker 25*33f37583SAndroid Build Coastguard Worker constexpr const char* kSystemShimApexName = "com.android.apex.cts.shim.apex"; 26*33f37583SAndroid Build Coastguard Worker 27*33f37583SAndroid Build Coastguard Worker bool IsShimApex(const ApexFile& apex_file); 28*33f37583SAndroid Build Coastguard Worker 29*33f37583SAndroid Build Coastguard Worker android::base::Result<void> ValidateShimApex(const std::string& mount_point, 30*33f37583SAndroid Build Coastguard Worker const ApexFile& apex_file); 31*33f37583SAndroid Build Coastguard Worker 32*33f37583SAndroid Build Coastguard Worker android::base::Result<void> ValidateUpdate(const std::string& system_apex_path, 33*33f37583SAndroid Build Coastguard Worker const std::string& new_apex_path); 34*33f37583SAndroid Build Coastguard Worker 35*33f37583SAndroid Build Coastguard Worker } // namespace shim 36*33f37583SAndroid Build Coastguard Worker } // namespace apex 37*33f37583SAndroid Build Coastguard Worker } // namespace android 38