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

Commit 6d460fce authored by Steve Kondik's avatar Steve Kondik
Browse files

Merge tag 'android-7.0.0_r14' of...

Merge tag 'android-7.0.0_r14' of https://android.googlesource.com/platform/frameworks/native into cm-14.0

Android 7.0.0 Release 14 (NBD90Z)
parents 2001b117 9b8b9a6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := liblog libselinux
LOCAL_SHARED_LIBRARIES := liblog libcutils libselinux
LOCAL_SRC_FILES := service_manager.c binder.c
LOCAL_CFLAGS += $(svc_c_flags)
LOCAL_MODULE := servicemanager
+7 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@
#include <stdlib.h>
#include <string.h>

#include <cutils/multiuser.h>

#include <private/android_filesystem_config.h>

#include <selinux/android.h>
@@ -121,6 +123,11 @@ static bool check_mac_perms_from_lookup(pid_t spid, uid_t uid, const char *perm,
static int svc_can_register(const uint16_t *name, size_t name_len, pid_t spid, uid_t uid)
{
    const char *perm = "add";

    if (multiuser_get_app_id(uid) >= AID_APP) {
        return 0; /* Don't allow apps to register services */
    }

    return check_mac_perms_from_lookup(spid, uid, perm, str8(name, name_len)) ? 1 : 0;
}

+3 −0
Original line number Diff line number Diff line
@@ -136,6 +136,9 @@ public:
    // Retrieve the sideband buffer stream, if any.
    virtual sp<NativeHandle> getSidebandStream() const;

    // See IGraphicBufferConsumer::discardFreeBuffers
    virtual status_t discardFreeBuffers() override;

    // dump our state in a String
    virtual void dump(String8& result, const char* prefix) const;

+5 −0
Original line number Diff line number Diff line
@@ -124,6 +124,11 @@ private:
    // all slots, even if they're currently dequeued, queued, or acquired.
    void freeAllBuffersLocked();

    // discardFreeBuffersLocked releases all currently-free buffers held by the
    // queue, in order to reduce the memory consumption of the queue to the
    // minimum possible without discarding data.
    void discardFreeBuffersLocked();

    // If delta is positive, makes more slots available. If negative, takes
    // away slots. Returns false if the request can't be met.
    bool adjustAvailableSlotsLocked(int delta);
+3 −0
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ public:
    // See IGraphicBufferConsumer::setDefaultBufferDataSpace
    status_t setDefaultBufferDataSpace(android_dataspace defaultDataSpace);

    // See IGraphicBufferConsumer::discardFreeBuffers
    status_t discardFreeBuffers();

private:
    ConsumerBase(const ConsumerBase&);
    void operator=(const ConsumerBase&);
Loading