SurfaceFlinger: tune number of buffers for low activity layers

Tune number of buffers indicating whether a layer is low activity
or not to 2 accommodate more cases of low activity layers.

Bug: 140948091
Test: 1) Set the static wallpaper
2) Go to Settings->About Phone -> scroll all the way down
3) Move device to Zone1 and launch settings page
4) Move device to Non Zone1 without touch and wait for 1-2 secs and observe

Change-Id: I6a06fa4945843a8d991463c30cb0e6db68f99365
diff --git a/services/surfaceflinger/Scheduler/LayerInfo.h b/services/surfaceflinger/Scheduler/LayerInfo.h
index a733781..17afdda 100644
--- a/services/surfaceflinger/Scheduler/LayerInfo.h
+++ b/services/surfaceflinger/Scheduler/LayerInfo.h
@@ -109,7 +109,7 @@
         bool isLowActivityLayer() const {
             // We want to make sure that we received more than two frames from the layer
             // in order to check low activity.
-            if (mElements.size() < 2) {
+            if (mElements.size() < scheduler::LOW_ACTIVITY_BUFFERS + 1) {
                 return false;
             }
 
@@ -118,7 +118,8 @@
             // Check the frame before last to determine whether there is low activity.
             // If that frame is older than LOW_ACTIVITY_EPSILON_NS, the layer is sending
             // infrequent updates.
-            if (mElements.at(mElements.size() - 2) < obsoleteEpsilon) {
+            if (mElements.at(mElements.size() - (scheduler::LOW_ACTIVITY_BUFFERS + 1)) <
+                obsoleteEpsilon) {
                 return true;
             }