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

Commit c4bc363d authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Remove unnecessary locks.

1. createAppData already obtains a lock,
2. rmdex is a thread-safe operation and can be done at any time. Caller has to make sure there is no race condition.

Bug: 201090222
Test: presubmit
Change-Id: I826108c0f5493cb767b3738338a0bea43a93151d
parent 5cc79eb3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -637,7 +637,6 @@ binder::Status InstalldNativeService::createAppDataBatched(
        const std::vector<android::os::CreateAppDataArgs>& args,
        std::vector<android::os::CreateAppDataResult>* _aidl_return) {
    ENFORCE_UID(AID_SYSTEM);
    std::lock_guard<std::recursive_mutex> lock(mLock);

    std::vector<android::os::CreateAppDataResult> results;
    for (const auto &arg : args) {
@@ -1627,7 +1626,6 @@ binder::Status InstalldNativeService::rmdex(const std::string& codePath,
        const std::string& instructionSet) {
    ENFORCE_UID(AID_SYSTEM);
    CHECK_ARGUMENT_PATH(codePath);
    std::lock_guard<std::recursive_mutex> lock(mLock);

    char dex_path[PKG_PATH_MAX];