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

Commit 882c08be authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

Add timestamps of when tag monitoring dumps are cached

This CL adds a timestamp of when a client's tag monitoring dump is
cached. The timestamp is printed along with the rest of the dump through
`watch dump`.

Bug: 209565054
Test: Manually tested
Change-Id: I4dba62495bdee48ad8ec252cf9c17e974f3f5d86
parent 8f54fbda
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -4284,12 +4284,20 @@ void CameraService::cacheClientTagDumpIfNeeded(const char *cameraId, BasicClient

    if (dumpVector.empty()) { return; }

    std::string dumpString;

    String8 currentTime = getFormattedCurrentTime();
    dumpString += "Cached @ ";
    dumpString += currentTime.string();
    dumpString += "\n"; // First line is the timestamp of when client is cached.


    const String16 &packageName = client->getPackageName();

    String8 packageName8 = String8(packageName);
    const char *printablePackageName = packageName8.lockBuffer(packageName.size());

    std::string dumpString;

    size_t i = dumpVector.size();

    // Store the string in reverse order (latest last)