Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cecee25a authored by Zach Johnson's avatar Zach Johnson Committed by android-build-merger
Browse files

Merge changes I45bf0300,Ib30324ae,I409dc02d,I5096786e,I9dccd0b4, ...

am: 17e4306f

Change-Id: I674cc916dae5d269b1e7c2f36172d1da0e1abae0
parents 36f01d9b 17e4306f
Loading
Loading
Loading
Loading
+77 −3
Original line number Original line Diff line number Diff line
subdirs = [
// MAP API module
    "jni",

]
java_library {
    name: "bluetooth.mapsapi",

    srcs: ["lib/mapapi/**/*.java"],
}

// Bluetooth JNI

cc_library_shared {
    name: "libbluetooth_jni",
    srcs: ["jni/**/*.cpp"],
    header_libs: ["libbluetooth_headers"],
    include_dirs: [
        "system/bt/types",
    ],
    shared_libs: [
        "libbase",
        "libchrome",
        "libnativehelper",
        "liblog",
    ],
    static_libs: [
        "libbluetooth-types",
    ],
    cflags: [
        "-Wall",
        "-Werror",
        "-Wextra",
        "-Wno-unused-parameter",
    ],
    sanitize: {
        scs: true,
    },
}

// Bluetooth APK

android_app {
    name: "Bluetooth",

    srcs: ["src/**/*.java"],
    platform_apis: true,
    certificate: "platform",

    jni_libs: ["libbluetooth_jni"],
    libs: [
        "javax.obex",
        "telephony-common",
        "services.net",
    ],
    static_libs: [
        "com.android.vcard",
        "bluetooth.mapsapi",
        "sap-api-java-static",
        "services.net",
        "libprotobuf-java-lite",
        "bluetooth-protos-lite",
        "androidx.core_core",
        "androidx.legacy_legacy-support-v4",
        "androidx.lifecycle_lifecycle-livedata",
        "androidx.room_room-runtime",
        "guava",
    ],

    plugins: [
        "androidx.room_room-compiler-plugin",
    ],

    javacflags: ["-Aroom.schemaLocation=tests/unit/src/com/android/bluetooth/btservice/storage/schemas"],

    optimize: {
        enabled: false,
    },
    required: ["libbluetooth"]
}

Android.mk

deleted100644 → 0
+0 −85
Original line number Original line Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

# MAP API module

include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, lib/mapapi)
LOCAL_MODULE := bluetooth.mapsapi
include $(BUILD_STATIC_JAVA_LIBRARY)

# Bluetooth APK

include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := Bluetooth
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_USE_AAPT2 := true
LOCAL_JNI_SHARED_LIBRARIES := libbluetooth_jni
LOCAL_JAVA_LIBRARIES := javax.obex telephony-common services.net
LOCAL_STATIC_JAVA_LIBRARIES := \
        com.android.vcard \
        bluetooth.mapsapi \
        sap-api-java-static \
        services.net \
        libprotobuf-java-lite \
        bluetooth-protos-lite \
        guava \

LOCAL_STATIC_ANDROID_LIBRARIES := \
        androidx.core_core \
        androidx.legacy_legacy-support-v4 \
        androidx.lifecycle_lifecycle-livedata \
        androidx.room_room-runtime \
        bt-androidx-room-runtime-nodeps \

LOCAL_ANNOTATION_PROCESSORS := \
        bt-androidx-annotation-nodeps \
        bt-androidx-room-common-nodeps \
        bt-androidx-room-compiler-nodeps \
        bt-androidx-room-migration-nodeps \
        bt-antlr4-nodeps \
        bt-apache-commons-codec-nodeps \
        bt-auto-common-nodeps \
        bt-javapoet-nodeps \
        bt-kotlin-metadata-nodeps \
        bt-sqlite-jdbc-nodeps \
        bt-jetbrain-nodeps \
        guava-21.0 \
        kotlin-stdlib \
        gson-prebuilt-jar

LOCAL_JAVACFLAGS := \
        -Aroom.schemaLocation=$(LOCAL_PATH)/tests/unit/src/com/android/bluetooth/btservice/storage/schemas

LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
        androidx.room.RoomProcessor

LOCAL_REQUIRED_MODULES := libbluetooth
LOCAL_PROGUARD_ENABLED := disabled
include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))

include $(CLEAR_VARS)

COMMON_LIBS_PATH := ../../../../../prebuilts/tools/common/m2/repository
ROOM_LIBS_PATH := ../../lib/room

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
        bt-androidx-annotation-nodeps:$(ROOM_LIBS_PATH)/annotation-1.0.0-beta01.jar \
        bt-androidx-room-common-nodeps:$(ROOM_LIBS_PATH)/room-common-2.0.0-beta01.jar \
        bt-androidx-room-compiler-nodeps:$(ROOM_LIBS_PATH)/room-compiler-2.0.0-beta01.jar \
        bt-androidx-room-migration-nodeps:$(ROOM_LIBS_PATH)/room-migration-2.0.0-beta01.jar \
        bt-androidx-room-runtime-nodeps:$(ROOM_LIBS_PATH)/room-runtime-2.0.0-alpha1.aar \
        bt-antlr4-nodeps:$(COMMON_LIBS_PATH)/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar \
        bt-apache-commons-codec-nodeps:$(COMMON_LIBS_PATH)/org/eclipse/tycho/tycho-bundles-external/0.18.1/eclipse/plugins/org.apache.commons.codec_1.4.0.v201209201156.jar \
        bt-auto-common-nodeps:$(COMMON_LIBS_PATH)/com/google/auto/auto-common/0.9/auto-common-0.9.jar \
        bt-javapoet-nodeps:$(COMMON_LIBS_PATH)/com/squareup/javapoet/1.8.0/javapoet-1.8.0.jar \
        bt-kotlin-metadata-nodeps:$(COMMON_LIBS_PATH)/me/eugeniomarletti/kotlin-metadata/1.2.1/kotlin-metadata-1.2.1.jar \
        bt-sqlite-jdbc-nodeps:$(COMMON_LIBS_PATH)/org/xerial/sqlite-jdbc/3.20.1/sqlite-jdbc-3.20.1.jar \
        bt-jetbrain-nodeps:../../../../../prebuilts/tools/common/m2/repository/org/jetbrains/annotations/13.0/annotations-13.0.jar

include $(BUILD_HOST_PREBUILT)

AndroidManifest_test.xml

deleted100644 → 0
+0 −106
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.android.bluetooth"
  android:sharedUserId="@string/sharedUserId">
    <!-- Allows access to the Bluetooth Share Manager -->
    <permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE"
        android:label="@string/permlab_bluetoothShareManager"
        android:description="@string/permdesc_bluetoothShareManager"
        android:protectionLevel="signature" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <application
        android:icon="@mipmap/bt_share"
        android:label="@string/app_name">
        <uses-library android:name="javax.obex" />
        <activity android:name=".opp.TestActivity" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <provider android:name=".opp.BluetoothOppProvider"
            android:authorities="com.android.bluetooth.opp"
            android:process="@string/process">
            <path-permission
                    android:path="/btopp"
                    android:permission="android.permission.ACCESS_BLUETOOTH_SHARE" />
        </provider>
        <service android:process="@string/process"
            android:name=".opp.BluetoothOppService"
            android:permission="android.permission.ACCESS_BLUETOOTH_SHARE" />
        <receiver android:process="@string/process"
              android:name=".opp.BluetoothOppReceiver">
            <intent-filter>
                <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
        <activity android:name=".opp.BluetoothOppLauncherActivity"
            android:process="@string/process"
            android:theme="@*android:style/Theme.Material.DayNight.Dialog"
            android:label="@string/bt_share_picker_label">
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
                <data android:mimeType="video/*" />
                <data android:mimeType="audio/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND_MULTIPLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
                <data android:mimeType="video/*" />
                <data android:mimeType="x-mixmedia/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.btopp.intent.action.OPEN" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="vnd.android.cursor.item/vnd.android.btopp" />
            </intent-filter>
        </activity>
        <activity android:name=".opp.BluetoothOppBtEnableActivity"
            android:process="@string/process">
        </activity>
        <activity android:name=".opp.BluetoothOppBtErrorActivity"
          android:process="@string/process">
        </activity>
        <activity android:name=".opp.BluetoothOppBtEnablingActivity"
            android:process="@string/process"
            android:theme="@*android:style/Theme.Material.DayNight.Dialog">
        </activity>
        <activity android:name=".opp.BluetoothOppIncomingFileConfirmActivity"
            android:process="@string/process">
        </activity>
        <activity android:name=".opp.BluetoothOppTransferActivity"
            android:process="@string/process">
        </activity>
        <activity android:name=".pbap.BluetoothPbapActivity"
            android:process="@string/process"
            android:label=" "
            android:theme="@*android:style/Theme.Material.DayNight.Dialog.Alert">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <service android:process="@string/process"
              android:name=".pbap.BluetoothPbapService" >
            <action android:name="android.bluetooth.IBluetoothPbap"/>
        </service>
        <receiver android:process="@string/process"
              android:name=".pbap.BluetoothPbapReceiver">
            <intent-filter>
                <action android:name="android.bluetooth.adapter.action.STATE_CHANGED"/>
            </intent-filter>
        </receiver>
    </application>
</manifest>

CleanSpec.mk

deleted100644 → 0
+0 −49
Original line number Original line Diff line number Diff line
# Copyright (C) 2007 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.
#

# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list.  These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list.  E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)

# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

jni/Android.bp

deleted100644 → 0
+0 −41
Original line number Original line Diff line number Diff line
cc_library_shared {
    name: "libbluetooth_jni",
    compile_multilib: "first",
    srcs: [
        "com_android_bluetooth_btservice_AdapterService.cpp",
        "com_android_bluetooth_hfp.cpp",
        "com_android_bluetooth_hfpclient.cpp",
        "com_android_bluetooth_a2dp.cpp",
        "com_android_bluetooth_a2dp_sink.cpp",
        "com_android_bluetooth_avrcp_controller.cpp",
        "com_android_bluetooth_avrcp_target.cpp",
        "com_android_bluetooth_hid_host.cpp",
        "com_android_bluetooth_hid_device.cpp",
        "com_android_bluetooth_hearing_aid.cpp",
        "com_android_bluetooth_pan.cpp",
        "com_android_bluetooth_gatt.cpp",
        "com_android_bluetooth_sdp.cpp",
    ],
    header_libs: ["libbluetooth_headers"],
    include_dirs: [
        "system/bt/types",
    ],
    shared_libs: [
        "libbase",
        "libchrome",
        "libnativehelper",
        "liblog",
    ],
    static_libs: [
        "libbluetooth-types",
    ],
    cflags: [
        "-Wall",
        "-Werror",
        "-Wextra",
        "-Wno-unused-parameter",
    ],
    sanitize: {
        scs: true,
    },
}
Loading