blob: a5b3ecea4ac532c9903f0d10f30530fd7aba90ca [file] [log] [blame]
Steven Moreland12300a02019-08-02 13:27:15 -07001/*
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
24using ::android::internal::Stability;
25
26#ifdef __ANDROID_VNDK__
27#error libbinder_ndk should only be built in a system context
28#endif
29
Steven Moreland6932fe12019-08-08 18:17:51 -070030#ifdef __ANDROID_NDK__
31#error libbinder_ndk should only be built in a system context
32#endif
33
Steven Moreland12300a02019-08-02 13:27:15 -070034// explicit extern because symbol is only declared in header when __ANDROID_VNDK__
35extern "C" void AIBinder_markVendorStability(AIBinder* binder) {
36 Stability::markVndk(binder->getBinder().get());
37}
38
39void AIBinder_markSystemStability(AIBinder* binder) {
40 Stability::markCompilationUnit(binder->getBinder().get());
41}
42
43void AIBinder_markVintfStability(AIBinder* binder) {
44 Stability::markVintf(binder->getBinder().get());
45}