GpuStats: track Vulkan apps not doing pre-rotation correctly

Bug: 135210726
Test: atest statsd_test:GpuStatsPuller_test
Change-Id: I9e44e95876dd6d09025e877f450736b6ea9d5da8
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index ee500d7..ceabd39 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -6360,6 +6360,9 @@
 
     // CPU Vulkan implementation is in use.
     optional bool cpu_vulkan_in_use = 6;
+
+    // App is not doing pre-rotation correctly.
+    optional bool false_prerotation = 7;
 }
 
 /*
diff --git a/cmds/statsd/src/external/GpuStatsPuller.cpp b/cmds/statsd/src/external/GpuStatsPuller.cpp
index 0d3aca0..bbdb540 100644
--- a/cmds/statsd/src/external/GpuStatsPuller.cpp
+++ b/cmds/statsd/src/external/GpuStatsPuller.cpp
@@ -96,6 +96,7 @@
         if (!event->write(int64VectorToProtoByteString(info.vkDriverLoadingTime))) return false;
         if (!event->write(int64VectorToProtoByteString(info.angleDriverLoadingTime))) return false;
         if (!event->write(info.cpuVulkanInUse)) return false;
+        if (!event->write(info.falsePrerotation)) return false;
         event->init();
         data->emplace_back(event);
     }
diff --git a/cmds/statsd/tests/external/GpuStatsPuller_test.cpp b/cmds/statsd/tests/external/GpuStatsPuller_test.cpp
index bdc52b0..e91fb0d 100644
--- a/cmds/statsd/tests/external/GpuStatsPuller_test.cpp
+++ b/cmds/statsd/tests/external/GpuStatsPuller_test.cpp
@@ -56,8 +56,9 @@
 static const int32_t CPU_VULKAN_VERSION           = 2;
 static const int32_t GLES_VERSION                 = 3;
 static const bool CPU_VULKAN_IN_USE               = true;
+static const bool FALSE_PREROTATION               = true;
 static const size_t NUMBER_OF_VALUES_GLOBAL       = 13;
-static const size_t NUMBER_OF_VALUES_APP          = 6;
+static const size_t NUMBER_OF_VALUES_APP          = 7;
 // clang-format on
 
 class MockGpuStatsPuller : public GpuStatsPuller {
@@ -150,6 +151,7 @@
     EXPECT_TRUE(event->write(int64VectorToProtoByteString(vkDriverLoadingTime)));
     EXPECT_TRUE(event->write(int64VectorToProtoByteString(angleDriverLoadingTime)));
     EXPECT_TRUE(event->write(CPU_VULKAN_IN_USE));
+    EXPECT_TRUE(event->write(FALSE_PREROTATION));
     event->init();
     inData.emplace_back(event);
     MockGpuStatsPuller mockPuller(android::util::GPU_STATS_APP_INFO, &inData);
@@ -168,6 +170,7 @@
     EXPECT_EQ(int64VectorToProtoByteString(angleDriverLoadingTime),
               outData[0]->getValues()[4].mValue.str_value);
     EXPECT_EQ(CPU_VULKAN_IN_USE, outData[0]->getValues()[5].mValue.int_value);
+    EXPECT_EQ(FALSE_PREROTATION, outData[0]->getValues()[6].mValue.int_value);
 }
 
 }  // namespace statsd