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

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

Merge "Removing some obsolete methods and wrapper" into ub-launcher3-master

parents 3003e57d 66aead7d
Loading
Loading
Loading
Loading
+5 −40
Original line number Original line Diff line number Diff line
@@ -101,24 +101,6 @@ import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.LinkedList;
import java.util.List;

/**
 * Wrapper around a list for processing arguments.
 */
class ArgList extends LinkedList<String> {
    public ArgList(List<String> l) {
        super(l);
    }

    public String peekArg() {
        return peekFirst();
    }

    public String nextArg() {
        return pollFirst().toLowerCase();
    }
}


/**
/**
 * Service connected by system-UI for handling touch interaction.
 * Service connected by system-UI for handling touch interaction.
@@ -238,23 +220,6 @@ public class TouchInteractionService extends Service implements PluginListener<O
            WindowBounds wb = new WindowBounds(bounds, insets);
            WindowBounds wb = new WindowBounds(bounds, insets);
            MAIN_EXECUTOR.execute(() -> SplitScreenBounds.INSTANCE.setSecondaryWindowBounds(wb));
            MAIN_EXECUTOR.execute(() -> SplitScreenBounds.INSTANCE.setSecondaryWindowBounds(wb));
        }
        }

        /** Deprecated methods **/
        public void onQuickStep(MotionEvent motionEvent) { }

        public void onQuickScrubEnd() { }

        public void onQuickScrubProgress(float progress) { }

        public void onQuickScrubStart() { }

        public void onPreMotionEvent(int downHitTarget) { }

        public void onMotionEvent(MotionEvent ev) {
            ev.recycle();
        }

        public void onBind(ISystemUiProxy iSystemUiProxy) { }
    };
    };


    private static boolean sConnected = false;
    private static boolean sConnected = false;
@@ -837,10 +802,10 @@ public class TouchInteractionService extends Service implements PluginListener<O
    @Override
    @Override
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] rawArgs) {
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] rawArgs) {
        if (rawArgs.length > 0 && Utilities.IS_DEBUG_DEVICE) {
        if (rawArgs.length > 0 && Utilities.IS_DEBUG_DEVICE) {
            ArgList args = new ArgList(Arrays.asList(rawArgs));
            LinkedList<String> args = new LinkedList(Arrays.asList(rawArgs));
            switch (args.nextArg()) {
            switch (args.pollFirst()) {
                case "cmd":
                case "cmd":
                    if (args.peekArg() == null) {
                    if (args.peekFirst() == null) {
                        printAvailableCommands(pw);
                        printAvailableCommands(pw);
                    } else {
                    } else {
                        onCommand(pw, args);
                        onCommand(pw, args);
@@ -881,8 +846,8 @@ public class TouchInteractionService extends Service implements PluginListener<O
        pw.println("  clear-touch-log: Clears the touch interaction log");
        pw.println("  clear-touch-log: Clears the touch interaction log");
    }
    }


    private void onCommand(PrintWriter pw, ArgList args) {
    private void onCommand(PrintWriter pw, LinkedList<String> args) {
        switch (args.nextArg()) {
        switch (args.pollFirst()) {
            case "clear-touch-log":
            case "clear-touch-log":
                ActiveGestureLog.INSTANCE.clear();
                ActiveGestureLog.INSTANCE.clear();
                break;
                break;