1 /* 2 * Copyright (C) 2019 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 #pragma once 18 19 #include <android/binder_ibinder.h> 20 21 __BEGIN_DECLS 22 23 /** 24 * Private addition to binder_flag_t. 25 */ 26 enum { 27 /** 28 * Indicates that this transaction is coupled w/ vendor.img 29 */ 30 FLAG_PRIVATE_VENDOR = 0x10000000, 31 }; 32 33 #if defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__) 34 35 enum { 36 FLAG_PRIVATE_LOCAL = FLAG_PRIVATE_VENDOR, 37 }; 38 39 /** 40 * This interface has the stability of the vendor image. 41 */ 42 void AIBinder_markVendorStability(AIBinder* binder); 43 AIBinder_markCompilationUnitStability(AIBinder * binder)44static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { 45 AIBinder_markVendorStability(binder); 46 } 47 48 #else // defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__) 49 50 enum { 51 FLAG_PRIVATE_LOCAL = 0, 52 }; 53 54 /** 55 * This interface has the stability of the system image. 56 */ 57 __attribute__((weak)) void AIBinder_markSystemStability(AIBinder* binder); 58 AIBinder_markCompilationUnitStability(AIBinder * binder)59static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { 60 if (AIBinder_markSystemStability == nullptr) return; 61 62 AIBinder_markSystemStability(binder); 63 } 64 65 #endif // defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__) 66 67 /** 68 * This interface has system<->vendor stability 69 */ 70 void AIBinder_markVintfStability(AIBinder* binder); 71 72 __END_DECLS 73