Rename const to kFrameTimelinesCapacity

From `kFrameTimelinesLength`.

Bug: 270612751
Test: build
Change-Id: I83e61a19254ab4a63479a2004124cfd2c082da35
diff --git a/services/surfaceflinger/Scheduler/EventThread.cpp b/services/surfaceflinger/Scheduler/EventThread.cpp
index f79688d..7b59ca5 100644
--- a/services/surfaceflinger/Scheduler/EventThread.cpp
+++ b/services/surfaceflinger/Scheduler/EventThread.cpp
@@ -600,8 +600,8 @@
                                         nsecs_t preferredDeadlineTimestamp) const {
     uint32_t currentIndex = 0;
     // Add 1 to ensure the preferredFrameTimelineIndex entry (when multiplier == 0) is included.
-    for (int64_t multiplier = -VsyncEventData::kFrameTimelinesLength + 1;
-         currentIndex < VsyncEventData::kFrameTimelinesLength; multiplier++) {
+    for (int64_t multiplier = -VsyncEventData::kFrameTimelinesCapacity + 1;
+         currentIndex < VsyncEventData::kFrameTimelinesCapacity; multiplier++) {
         nsecs_t deadlineTimestamp = preferredDeadlineTimestamp + multiplier * frameInterval;
         // Valid possible frame timelines must have future values, so find a later frame timeline.
         if (deadlineTimestamp <= timestamp) {
diff --git a/services/surfaceflinger/tests/DisplayEventReceiver_test.cpp b/services/surfaceflinger/tests/DisplayEventReceiver_test.cpp
index 761ac8c..4c26017 100644
--- a/services/surfaceflinger/tests/DisplayEventReceiver_test.cpp
+++ b/services/surfaceflinger/tests/DisplayEventReceiver_test.cpp
@@ -36,7 +36,7 @@
     EXPECT_GT(static_cast<int64_t>(vsyncEventData.frameTimelinesLength), 0)
             << "Frame timelines length should be greater than 0";
     EXPECT_LE(static_cast<int64_t>(vsyncEventData.frameTimelinesLength),
-              VsyncEventData::kFrameTimelinesLength)
+              VsyncEventData::kFrameTimelinesCapacity)
             << "Frame timelines length should not exceed max capacity";
     EXPECT_GT(vsyncEventData.frameTimelines[0].deadlineTimestamp, now)
             << "Deadline timestamp should be greater than frame time";
diff --git a/services/surfaceflinger/tests/unittests/EventThreadTest.cpp b/services/surfaceflinger/tests/unittests/EventThreadTest.cpp
index 6debbaa..5fed9b4 100644
--- a/services/surfaceflinger/tests/unittests/EventThreadTest.cpp
+++ b/services/surfaceflinger/tests/unittests/EventThreadTest.cpp
@@ -299,7 +299,7 @@
     EXPECT_LE(vsyncEventData.frameTimelinesLength, nonPreferredTimelinesAmount + 1)
             << "Amount of non-preferred frame timelines too many;"
             << " expected presentation time will be over threshold";
-    EXPECT_LT(nonPreferredTimelinesAmount, VsyncEventData::kFrameTimelinesLength)
+    EXPECT_LT(nonPreferredTimelinesAmount, VsyncEventData::kFrameTimelinesCapacity)
             << "Amount of non-preferred frame timelines should be less than max capacity";
     EXPECT_GT(static_cast<int64_t>(vsyncEventData.frameTimelinesLength), 0)
             << "Frame timelines length should be greater than 0";
@@ -428,11 +428,11 @@
 }
 
 TEST_F(EventThreadTest, requestNextVsyncEventFrameTimelinesValidLength) {
-    // The VsyncEventData should not have kFrameTimelinesLength amount of valid frame timelines, due
-    // to longer vsync period and kEarlyLatchMaxThreshold.
-    // Use length-2 to avoid decimal truncation (e.g. 60Hz has 16.6... ms vsync period).
+    // The VsyncEventData should not have kFrameTimelinesCapacity amount of valid frame timelines,
+    // due to longer vsync period and kEarlyLatchMaxThreshold. Use length-2 to avoid decimal
+    // truncation (e.g. 60Hz has 16.6... ms vsync period).
     std::chrono::nanoseconds vsyncPeriod(scheduler::VsyncConfig::kEarlyLatchMaxThreshold /
-                                         (VsyncEventData::kFrameTimelinesLength - 2));
+                                         (VsyncEventData::kFrameTimelinesCapacity - 2));
     setupEventThread(vsyncPeriod);
 
     // Signal that we want the next vsync event to be posted to the connection