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

Commit 2f140ed9 authored by Zhijun He's avatar Zhijun He
Browse files

CameraService: don't skip device dump when there is no client

We shouldn't skip the device metadata dump when the camera is not
in use.

Test: adb shell dumpsys media.camera works
Bug: 35125905
Change-Id: I26e2a612efa55b3289adb160c90d3fbc95bb4085
parent b16ebe14
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -2793,11 +2793,7 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) {
        }

        auto clientDescriptor = mActiveClientManager.get(cameraId);
        if (clientDescriptor == nullptr) {
            dprintf(fd, "  Device %s is closed, no client instance\n",
                    cameraId.string());
            continue;
        }
        if (clientDescriptor != nullptr) {
            dprintf(fd, "  Device %s is open. Client instance dump:\n",
                    cameraId.string());
            dprintf(fd, "    Client priority score: %d state: %d\n",
@@ -2810,6 +2806,10 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) {
                    String8(client->getPackageName()).string());

            client->dumpClient(fd, args);
        } else {
            dprintf(fd, "  Device %s is closed, no client instance\n",
                    cameraId.string());
        }

        if (mModule != nullptr) {
            dprintf(fd, "== Camera HAL device %s static information: ==\n", cameraId.string());