| /****************************************************************************** |
| * |
| * Copyright 2021 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at: |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| * |
| ******************************************************************************/ |
| |
| |
| #include "android_runtime/AndroidRuntime.h" |
| #include "com_android_bluetooth_ext.h" |
| |
| namespace android { |
| |
| int register_com_android_bluetooth_adv_audio_profiles(JNIEnv* env) { |
| ALOGE("%s", __func__); |
| |
| int status = android::register_com_android_bluetooth_csip_client(env); |
| if (status < 0) { |
| ALOGE("jni csip registration failure: %d", status); |
| return JNI_ERR; |
| } |
| |
| status = android::register_com_android_bluetooth_acm(env); |
| if (status < 0) { |
| ALOGE("jni acm registration failure: %d", status); |
| return JNI_ERR; |
| } |
| |
| status = android::register_com_android_bluetooth_apm(env); |
| if (status < 0) { |
| ALOGE("jni APM registration failure: %d", status); |
| return JNI_ERR; |
| } |
| |
| status = android::register_com_android_bluetooth_bap_broadcast(env); |
| if (status < 0) { |
| ALOGE("jni bap broadcast registration failure: %d", status); |
| return JNI_ERR; |
| } |
| |
| status = android::register_com_android_bluetooth_vcp_controller(env); |
| if (status < 0) { |
| ALOGE("jni vcp controller registration failure: %d", status); |
| return JNI_ERR; |
| } |
| |
| status = android::register_com_android_bluetooth_pacs_client(env); |
| if (status < 0) { |
| ALOGE("jni pacs client registration failure: %d", status); |
| return JNI_ERR; |
| } |
| status = android::register_com_android_bluetooth_call_controller(env); |
| if (status < 0) { |
| ALOGE("jni CC registration failure: %d", status); |
| return JNI_ERR; |
| } |
| |
| status = android::register_com_android_bluetooth_mcp(env); |
| if (status < 0) { |
| ALOGE("jni mcp registration failure: %d", status); |
| return JNI_ERR; |
| } |
| return JNI_VERSION_1_6; |
| } |
| } |