Merge "Log InputConsumer name instead of type" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-09 21:30:50 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 6 deletions
@@ -26,7 +26,6 @@ import static com.android.quickstep.GestureState.DEFAULT_STATE;
import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_INPUT_MONITOR;
import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SYSUI_PROXY;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_TRACING_ENABLED;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_ASSISTANT;
import android.annotation.TargetApi;
import android.app.ActivityManager;
@@ -486,7 +485,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
mConsumer.onConsumerAboutToBeSwitched();
mConsumer = newConsumer(prevGestureState, newGestureState, event);
ActiveGestureLog.INSTANCE.addLog("setInputConsumer", mConsumer.getType());
ActiveGestureLog.INSTANCE.addLog("setInputConsumer: " + mConsumer.getName());
mUncheckedConsumer = mConsumer;
} else if (mDeviceState.isUserUnlocked()
&& mDeviceState.isFullyGesturalNavMode()
@@ -96,15 +96,15 @@ public interface InputConsumer {
}
default String getName() {
String name = "";
StringBuilder name = new StringBuilder();
for (int i = 0; i < NAMES.length; i++) {
if ((getType() & (1 << i)) != 0) {
if (name.length() > 0) {
name += ":";
name.append(":");
}
name += NAMES[i];
name.append(NAMES[i]);
}
}
return name;
return name.toString();
}
}