SF: Add property to skip boot animation

Bug: 324366212
Test: setprop debug.sf.boot_animation false
Change-Id: I8e0076d35566a0d7326dd1e8fe7b5d58bafad67a
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 50cd45b..be3c1d8 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -950,10 +950,12 @@
 void SurfaceFlinger::initBootProperties() {
     property_set("service.sf.present_timestamp", mHasReliablePresentFences ? "1" : "0");
 
-    // Reset and (if needed) start BootAnimation.
-    property_set("service.bootanim.exit", "0");
-    property_set("service.bootanim.progress", "0");
-    property_set("ctl.start", "bootanim");
+    if (base::GetBoolProperty("debug.sf.boot_animation"s, true)) {
+        // Reset and (if needed) start BootAnimation.
+        property_set("service.bootanim.exit", "0");
+        property_set("service.bootanim.progress", "0");
+        property_set("ctl.start", "bootanim");
+    }
 }
 
 void SurfaceFlinger::initTransactionTraceWriter() {