Logging switching Quickstep on and off for tests

Change-Id: I9ff70850a86542715b5ef88c1f2a492bd3797ab1
diff --git a/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java b/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
index c5975a9..f89842a 100644
--- a/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
+++ b/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
@@ -24,6 +24,7 @@
 import static org.junit.Assert.assertTrue;
 
 import android.provider.Settings;
+import android.util.Log;
 
 import androidx.test.InstrumentationRegistry;
 
@@ -46,6 +47,8 @@
  */
 public class QuickStepOnOffRule implements TestRule {
 
+    static final String TAG = "QuickStepOnOffRule";
+
     public enum Mode {
         ON, OFF, BOTH
     }
@@ -73,32 +76,32 @@
             return new Statement() {
                 @Override
                 public void evaluate() throws Throwable {
-                    try {
-                        if (SwipeUpSetting.isSwipeUpSettingAvailable()) {
+                    if (SwipeUpSetting.isSwipeUpSettingAvailable()) {
+                        try {
                             if (mode == ON || mode == BOTH) {
                                 evaluateWithQuickstepOn();
                             }
                             if (mode == OFF || mode == BOTH) {
                                 evaluateWithQuickstepOff();
                             }
-                        } else {
-                            // Execute without changing the setting, if the requested mode is
-                            // compatible.
-                            final boolean swipeUpEnabledDefaultValue =
-                                    SwipeUpSetting.isSwipeUpEnabledDefaultValue();
-                            if (mode == BOTH ||
-                                    mode == ON && swipeUpEnabledDefaultValue ||
-                                    mode == OFF && !swipeUpEnabledDefaultValue) {
-                                evaluateWithoutChangingSetting(base);
-                            }
+                        } finally {
+                            setSwipeUpSetting(null);
                         }
-                    } finally {
-                        setSwipeUpSetting(null);
-
+                    } else {
+                        // Execute without changing the setting, if the requested mode is
+                        // compatible.
+                        final boolean swipeUpEnabledDefaultValue =
+                                SwipeUpSetting.isSwipeUpEnabledDefaultValue();
+                        if (mode == BOTH ||
+                                mode == ON && swipeUpEnabledDefaultValue ||
+                                mode == OFF && !swipeUpEnabledDefaultValue) {
+                            evaluateWithoutChangingSetting(base);
+                        }
                     }
                 }
 
                 public void setSwipeUpSetting(String value) {
+                    Log.d(TAG, "setSwipeUpSetting: " + value);
                     assertTrue("Couldn't change Quickstep mode",
                             Settings.Secure.putString(
                                     InstrumentationRegistry.getInstrumentation().getTargetContext().