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

Commit ca153136 authored by Baligh Uddin's avatar Baligh Uddin Committed by Automerger Merge Worker
Browse files

Merge "Merge history of Bluetooth App" am: 38cab987

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1899613

Change-Id: Ia54be08e6a64c06aa483bdb97ef6aa6e6e3eb903
parents 31924c54 38cab987
Loading
Loading
Loading
Loading
+30 −0
Original line number Original line Diff line number Diff line
#
# Copyright (C) 2016 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.
#

#
# Below are some minor deviations from the default Google style to
# accommodate for handling of the large legacy code base.
#

BasedOnStyle: Google
CommentPragmas: NOLINT:.*
DerivePointerAlignment: false

---
Language: Java
# Java format is handled by check_style hook
DisableFormat: true
SortIncludes: false

android/app/Android.bp

0 → 100644
+142 −0
Original line number Original line Diff line number Diff line
// MAP API module

package {
    default_applicable_licenses: ["packages_apps_Bluetooth_license"],
}

// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
    name: "packages_apps_Bluetooth_license",
    visibility: [":__subpackages__"],
    license_kinds: [
        "SPDX-license-identifier-Apache-2.0",
        "SPDX-license-identifier-BSD",
    ],
    // large-scale-change unable to identify any license_text files
}

java_library {
    name: "bluetooth.mapsapi",

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

java_library {
    name: "mmslib",

    srcs: [":framework-mms-shared-srcs"],
    libs: ["unsupportedappusage"],
}

// Bluetooth JNI

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

// Bluetooth APK

android_app {
    name: "Bluetooth",
    defaults: ["platform_app_defaults"],

    srcs: [
        "src/**/*.java",
        ":statslog-bluetooth-java-gen",
    ],
    platform_apis: true,
    certificate: "platform",

    jni_libs: ["libbluetooth_jni"],
    libs: [
        "javax.obex",
        "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",
        "modules-utils-statemachine",
        "androidx.room_room-runtime",
        "guava",
        "android.hardware.radio-V1.0-java",
        "mmslib",
        "modules-utils-backgroundthread",
        "modules-utils-bytesmatcher",
    ],

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

    // Add in path to Bluetooth directory because local path does not exist
    javacflags: ["-Aroom.schemaLocation=packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/storage/schemas"],

    optimize: {
        enabled: false,
    },
    required: ["libbluetooth"],
    apex_available: [
        "//apex_available:platform",
        "com.android.bluetooth.updatable",
    ],
    errorprone: {
        javacflags: [
            // "-Xep:AndroidFrameworkRequiresPermission:ERROR",
        ],
    },
}

genrule {
    name: "statslog-bluetooth-java-gen",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth"
        + " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog"
        + " --minApiLevel 32",
    out: ["com/android/bluetooth/BluetoothStatsLog.java"],
}
Loading