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

Commit 3219ae64 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: remove unused context variables" am: 280af8eb

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1416688

Change-Id: I5e124faa1831cdf52a3badc2065bf6dc18d3ef50
parents 7abdb705 280af8eb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ int main(int argc, char** argv) {
    }

    IPCThreadState::self()->setTheContextObject(manager);
    ps->becomeContextManager(nullptr, nullptr);
    ps->becomeContextManager();

    sp<Looper> looper = Looper::prepare(false /*allowNonCallbacks*/);

+1 −7
Original line number Diff line number Diff line
@@ -144,11 +144,9 @@ void ProcessState::startThreadPool()
    }
}

bool ProcessState::becomeContextManager(context_check_func checkFunc, void* userData)
bool ProcessState::becomeContextManager()
{
    AutoMutex _l(mLock);
    mBinderContextCheckFunc = checkFunc;
    mBinderContextUserData = userData;

    flat_binder_object obj {
        .flags = FLAT_BINDER_FLAG_TXN_SECURITY_CTX,
@@ -165,8 +163,6 @@ bool ProcessState::becomeContextManager(context_check_func checkFunc, void* user
    }

    if (result == -1) {
        mBinderContextCheckFunc = nullptr;
        mBinderContextUserData = nullptr;
        ALOGE("Binder ioctl to become context manager failed: %s\n", strerror(errno));
    }

@@ -397,8 +393,6 @@ ProcessState::ProcessState(const char *driver)
    , mExecutingThreadsCount(0)
    , mMaxThreads(DEFAULT_MAX_BINDER_THREADS)
    , mStarvationStartTimeMs(0)
    , mBinderContextCheckFunc(nullptr)
    , mBinderContextUserData(nullptr)
    , mThreadPoolStarted(false)
    , mThreadPoolSeq(1)
    , mCallRestriction(CallRestriction::NONE)
+1 −10
Original line number Diff line number Diff line
@@ -51,13 +51,7 @@ public:

            void                startThreadPool();

    typedef bool (*context_check_func)(const String16& name,
                                       const sp<IBinder>& caller,
                                       void* userData);

            bool                becomeContextManager(
                                    context_check_func checkFunc,
                                    void* userData);
            bool                becomeContextManager();

            sp<IBinder>         getStrongProxyForHandle(int32_t handle);
            void                expungeHandle(int32_t handle, IBinder* binder);
@@ -128,9 +122,6 @@ private:

            Vector<handle_entry>mHandleToObject;

            context_check_func  mBinderContextCheckFunc;
            void*               mBinderContextUserData;

            String8             mRootDir;
            bool                mThreadPoolStarted;
    volatile int32_t            mThreadPoolSeq;