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

Commit c1528991 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [12364563, 12364330, 12364331, 12364332, 12363743,...

Merge cherrypicks of [12364563, 12364330, 12364331, 12364332, 12363743, 12364605, 12363956, 12363957, 12363958, 12364309, 12364483, 12364484, 12364564, 12364333, 12364334, 12364335, 12364336, 12364337, 12364607] into rvc-release

Change-Id: Idb95de85c36e721dfa96ed9e4d50b5a009056e01
parents b8293fd0 e0984b06
Loading
Loading
Loading
Loading
+14 −2
Original line number Original line Diff line number Diff line
@@ -63,11 +63,23 @@ void GpuService::setTargetStats(const std::string& appPackageName, const uint64_
}
}


void GpuService::setUpdatableDriverPath(const std::string& driverPath) {
void GpuService::setUpdatableDriverPath(const std::string& driverPath) {
    developerDriverPath = driverPath;
    IPCThreadState* ipc = IPCThreadState::self();
    const int pid = ipc->getCallingPid();
    const int uid = ipc->getCallingUid();

    // only system_server is allowed to set updatable driver path
    if (uid != AID_SYSTEM) {
        ALOGE("Permission Denial: can't set updatable driver path from pid=%d, uid=%d\n", pid, uid);
        return;
    }

    std::lock_guard<std::mutex> lock(mLock);
    mDeveloperDriverPath = driverPath;
}
}


std::string GpuService::getUpdatableDriverPath() {
std::string GpuService::getUpdatableDriverPath() {
    return developerDriverPath;
    std::lock_guard<std::mutex> lock(mLock);
    return mDeveloperDriverPath;
}
}


status_t GpuService::shellCommand(int /*in*/, int out, int err, std::vector<String16>& args) {
status_t GpuService::shellCommand(int /*in*/, int out, int err, std::vector<String16>& args) {
+2 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,8 @@ private:
     * Attributes
     * Attributes
     */
     */
    std::unique_ptr<GpuStats> mGpuStats;
    std::unique_ptr<GpuStats> mGpuStats;
    std::string developerDriverPath;
    std::mutex mLock;
    std::string mDeveloperDriverPath;
};
};


} // namespace android
} // namespace android