fix surfaceflinger's dumpsys

Change-Id: I7b95c3e04f145003f9c0eef321a21f3f36dfe835
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 7f61fe4..434ebc3 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1523,24 +1523,25 @@
         size_t index = 0;
         size_t numArgs = args.size();
         if (numArgs) {
-            dumpAll = false;
-
             if ((index < numArgs) &&
                     (args[index] == String16("--list"))) {
                 index++;
                 listLayersLocked(args, index, result, buffer, SIZE);
+                dumpAll = false;
             }
 
             if ((index < numArgs) &&
                     (args[index] == String16("--latency"))) {
                 index++;
                 dumpStatsLocked(args, index, result, buffer, SIZE);
+                dumpAll = false;
             }
 
             if ((index < numArgs) &&
                     (args[index] == String16("--latency-clear"))) {
                 index++;
                 clearStatsLocked(args, index, result, buffer, SIZE);
+                dumpAll = false;
             }
         }