Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8583702 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow runtime debug logs in TouchExplorer"

parents 95ed0f20 df424e14
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import android.content.Context;
import android.graphics.Region;
import android.os.Handler;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Slog;
import android.view.Display;
import android.view.InputDevice;
@@ -84,12 +85,14 @@ import java.util.List;
public class TouchExplorer extends BaseEventStreamTransformation
        implements GestureManifold.Listener {

    static final boolean DEBUG = false;
    private static final long LOGGING_FLAGS = FLAGS_GESTURE | FLAGS_INPUT_FILTER;

    // Tag for logging received events.
    private static final String LOG_TAG = "TouchExplorer";

    // To enable these logs, run: 'adb shell setprop log.tag.TouchExplorer DEBUG' (requires restart)
    static final boolean DEBUG = Log.isLoggable(LOG_TAG, Log.DEBUG);

    // The maximum of the cosine between the vectors of two moving
    // pointers so they can be considered moving in the same direction.
    private static final float MAX_DRAGGING_ANGLE_COS = 0.525321989f; // cos(pi/4)