| Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 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 | #include <android/binder_stability.h> | 
|  | 18 |  | 
|  | 19 | #include <binder/Stability.h> | 
|  | 20 | #include "ibinder_internal.h" | 
|  | 21 |  | 
|  | 22 | #include <log/log.h> | 
|  | 23 |  | 
|  | 24 | using ::android::internal::Stability; | 
|  | 25 |  | 
|  | 26 | #ifdef __ANDROID_VNDK__ | 
|  | 27 | #error libbinder_ndk should only be built in a system context | 
|  | 28 | #endif | 
|  | 29 |  | 
| Steven Moreland | 6932fe1 | 2019-08-08 18:17:51 -0700 | [diff] [blame] | 30 | #ifdef __ANDROID_NDK__ | 
|  | 31 | #error libbinder_ndk should only be built in a system context | 
|  | 32 | #endif | 
|  | 33 |  | 
| Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 34 | // explicit extern because symbol is only declared in header when __ANDROID_VNDK__ | 
|  | 35 | extern "C" void AIBinder_markVendorStability(AIBinder* binder) { | 
|  | 36 | Stability::markVndk(binder->getBinder().get()); | 
|  | 37 | } | 
|  | 38 |  | 
|  | 39 | void AIBinder_markSystemStability(AIBinder* binder) { | 
|  | 40 | Stability::markCompilationUnit(binder->getBinder().get()); | 
|  | 41 | } | 
|  | 42 |  | 
|  | 43 | void AIBinder_markVintfStability(AIBinder* binder) { | 
|  | 44 | Stability::markVintf(binder->getBinder().get()); | 
|  | 45 | } |