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

Commit 911043ff authored by Jiyong Park's avatar Jiyong Park Committed by android-build-merger
Browse files

Merge "Hide some headers from libbinder to vendors" into pi-dev

am: 7471f87c

Change-Id: Iedf7b5c7a101ad09f1d159f4d85b079a25dd4b07
parents 81312f0f 7471f87c
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -75,6 +75,28 @@ cc_library {
        ":libbinder_aidl",
    ],

    target: {
        vendor: {
            exclude_srcs: [
                "ActivityManager.cpp",
                "AppOpsManager.cpp",
                "IActivityManager.cpp",
                "IAppOpsCallback.cpp",
                "IAppOpsService.cpp",
                "IBatteryStats.cpp",
                "IMediaResourceMonitor.cpp",
                "IPermissionController.cpp",
                "IProcessInfoService.cpp",
                "IUidObserver.cpp",
                "PermissionCache.cpp",
                "PermissionController.cpp",
                "ProcessInfoService.cpp",
                "IpPrefix.cpp",
                ":libbinder_aidl",
            ],
        },
    },

    aidl: {
        export_aidl_headers: true,
    },
+8 −0
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@

#include <utils/Log.h>
#include <binder/IPCThreadState.h>
#ifndef __ANDROID_VNDK__
#include <binder/IPermissionController.h>
#endif
#include <binder/Parcel.h>
#include <utils/String8.h>
#include <utils/SystemClock.h>
@@ -48,6 +51,9 @@ sp<IServiceManager> defaultServiceManager()
    return gDefaultServiceManager;
}

#ifndef __ANDROID_VNDK__
// IPermissionController is not accessible to vendors

bool checkCallingPermission(const String16& permission)
{
    return checkCallingPermission(permission, NULL, NULL);
@@ -122,6 +128,8 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid)
    }
}

#endif //__ANDROID_VNDK__

// ----------------------------------------------------------------------

class BpServiceManager : public BpInterface<IServiceManager>
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ static LibBinderIPCtStatics gIPCStatics;

Mutex gDefaultServiceManagerLock;
sp<IServiceManager> gDefaultServiceManager;
#ifndef __ANDROID_VNDK__
sp<IPermissionController> gPermissionController;
#endif

}   // namespace android
+6 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#ifndef ANDROID_ACTIVITY_MANAGER_H
#define ANDROID_ACTIVITY_MANAGER_H

#ifndef __ANDROID_VNDK__

#include <binder/IActivityManager.h>

#include <utils/threads.h>
@@ -64,4 +66,8 @@ private:

}; // namespace android
// ---------------------------------------------------------------------------
#else // __ANDROID_VNDK__
#error "This header is not visible to vendors"
#endif // __ANDROID_VNDK__

#endif // ANDROID_ACTIVITY_MANAGER_H
+6 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#ifndef ANDROID_APP_OPS_MANAGER_H
#define ANDROID_APP_OPS_MANAGER_H

#ifndef __ANDROID_VNDK__

#include <binder/IAppOpsService.h>

#include <utils/threads.h>
@@ -117,4 +119,8 @@ private:

}; // namespace android
// ---------------------------------------------------------------------------
#else // __ANDROID_VNDK__
#error "This header is not visible to vendors"
#endif // __ANDROID_VNDK__

#endif // ANDROID_APP_OPS_MANAGER_H
Loading