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

Commit e1589d54 authored by Samiul Islam's avatar Samiul Islam Committed by Mohammad Samiul Islam
Browse files

libbinder: split out PackageManagerNative aidl

Very few clients of libbinder use PackageManagerNative service, as such
it's a waste to couple them together. Now, user of PackageManagerNative
service need to add the corresponding aidl files as shared library.

Bug: 183654927
Test: builds + presubmit
Ignore-AOSP-First: To avoid merge conflicts, uploading it internally
first. Will be cherry-picked to AOSP later.

Change-Id: Ic2562a3ba1d7d84ab6c9a3836976608a3aa0b2dd
Merged-In: Ic2562a3ba1d7d84ab6c9a3836976608a3aa0b2dd
parent 31ae9afa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ cc_binary {
        "liblog",
        "libselinux",
        "libbinder",
        "packagemanager_aidl-cpp",
    ],

    cflags: [
+1 −1
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ cc_defaults {
        "liblog",
        "libutils",
        "libbinderdebug",
        "packagemanager_aidl-cpp",
    ],
    srcs: [
        "DumpstateService.cpp",
@@ -173,7 +174,6 @@ cc_test {
    test_suites: ["device-tests"],
}


// =======================#
// dumpstate_test_fixture #
// =======================#
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,10 @@ cc_binary {
    srcs: [
        "main.cpp",
    ],

    shared_libs: [
        "packagemanager_aidl-cpp",
    ],
}

cc_binary {
+6 −7
Original line number Diff line number Diff line
@@ -64,9 +64,6 @@ libbinder_device_interface_sources = [
    "PermissionCache.cpp",
    "PermissionController.cpp",
]
libbinder_no_vendor_interface_sources = [
    ":packagemanager_aidl",
]

cc_library {
    name: "libbinder",
@@ -127,7 +124,7 @@ cc_library {
        "TextOutput.cpp",
        "Utils.cpp",
        ":libbinder_aidl",
    ] + libbinder_no_vendor_interface_sources,
    ],

    target: {
        android: {
@@ -139,7 +136,7 @@ cc_library {
            },
        },
        vendor: {
            exclude_srcs: libbinder_device_interface_sources + libbinder_no_vendor_interface_sources,
            exclude_srcs: libbinder_device_interface_sources,
        },
        darwin: {
            enabled: false,
@@ -289,8 +286,11 @@ filegroup {
    path: "aidl",
}

filegroup {
aidl_interface {
    name: "packagemanager_aidl",
    unstable: true,
    local_include_dir: "aidl",
    host_supported: true,
    srcs: [
        "aidl/android/content/pm/IPackageChangeObserver.aidl",
        "aidl/android/content/pm/IPackageManagerNative.aidl",
@@ -299,7 +299,6 @@ filegroup {
        "aidl/android/content/pm/ApexStagedEvent.aidl",
        "aidl/android/content/pm/StagedApexInfo.aidl",
    ],
    path: "aidl",
}

aidl_interface {
+3 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ cc_library_shared {
        "-Wall",
        "-Werror",
        "-Wextra",
        "-fvisibility=hidden"
        "-fvisibility=hidden",
    ],

    header_libs: [
@@ -60,6 +60,7 @@ cc_library_shared {
        "libbase",
        "libhidlbase",
        "libfmq",
        "packagemanager_aidl-cpp",
        "android.hardware.sensors@1.0",
        "android.hardware.sensors@2.0",
        "android.hardware.sensors@2.1",
@@ -76,6 +77,7 @@ cc_library_shared {
        "libsensor",
        "libsensorprivacy",
        "libpermission",
        "packagemanager_aidl-cpp",
    ],
}