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

Commit 28b3a25b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "IME tracing: cleanup dead code" into main

parents 9cde7f03 b02c0032
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -111,31 +111,6 @@ final class IInputMethodManagerGlobalInvoker {
        }
    }

    /**
     * Invokes {@link IInputMethodManager#startProtoDump(byte[], int, String)}.
     *
     * @param protoDump client or service side information to be stored by the server
     * @param source where the information is coming from, refer to
     *               {@link com.android.internal.inputmethod.ImeTracing#IME_TRACING_FROM_CLIENT} and
     *               {@link com.android.internal.inputmethod.ImeTracing#IME_TRACING_FROM_IMS}
     * @param where where the information is coming from.
     * @param exceptionHandler an optional {@link RemoteException} handler.
     */
    @AnyThread
    @RequiresNoPermission
    static void startProtoDump(byte[] protoDump, int source, String where,
            @Nullable Consumer<RemoteException> exceptionHandler) {
        final IInputMethodManager service = getService();
        if (service == null) {
            return;
        }
        try {
            service.startProtoDump(protoDump, source, where);
        } catch (RemoteException e) {
            handleRemoteExceptionOrRethrow(e, exceptionHandler);
        }
    }

    /**
     * Invokes {@link IInputMethodManager#startImeTrace()}.
     *
+0 −18
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.annotation.RequiresNoPermission;
import android.annotation.RequiresPermission;
import android.os.RemoteException;

import com.android.internal.inputmethod.ImeTracing;
import com.android.internal.view.IInputMethodManager;

import java.util.function.Consumer;
@@ -42,23 +41,6 @@ public class InputMethodManagerGlobal {
        return IInputMethodManagerGlobalInvoker.isAvailable();
    }

    /**
     * Invokes {@link IInputMethodManager#startProtoDump(byte[], int, String)}.
     *
     * @param protoDump client or service side information to be stored by the server
     * @param source where the information is coming from, refer to
     *               {@link ImeTracing#IME_TRACING_FROM_CLIENT} and
     *               {@link ImeTracing#IME_TRACING_FROM_IMS}
     * @param where where the information is coming from.
     * @param exceptionHandler an optional {@link RemoteException} handler.
     */
    @AnyThread
    @RequiresNoPermission
    public static void startProtoDump(byte[] protoDump, int source, String where,
            @Nullable Consumer<RemoteException> exceptionHandler) {
        IInputMethodManagerGlobalInvoker.startProtoDump(protoDump, source, where, exceptionHandler);
    }

    /**
     * Invokes {@link IInputMethodManager#startImeTrace()}.
     *
+0 −14
Original line number Diff line number Diff line
@@ -65,20 +65,6 @@ public abstract class ImeTracing {
        return sInstance;
    }

    /**
     * Transmits the information from client or InputMethodService side to the server, in order to
     * be stored persistently to the current IME tracing dump.
     *
     * @param protoDump client or service side information to be stored by the server
     * @param source where the information is coming from, refer to {@see #IME_TRACING_FROM_CLIENT}
     * and {@see #IME_TRACING_FROM_IMS}
     * @param where
     */
    protected void sendToService(byte[] protoDump, int source, String where) {
        InputMethodManagerGlobal.startProtoDump(protoDump, source, where,
                e -> Log.e(TAG, "Exception while sending ime-related dump to server", e));
    }

    /**
     * Start IME trace.
     */
+0 −3
Original line number Diff line number Diff line
@@ -180,9 +180,6 @@ interface IInputMethodManager {
    /** Remove the IME surface. Requires passing the currently focused window. */
    oneway void removeImeSurfaceFromWindowAsync(in IBinder windowToken);

    @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission")
    void startProtoDump(in byte[] protoDump, int source, String where);

    @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission")
    boolean isImeTraceEnabled();

+0 −7
Original line number Diff line number Diff line
@@ -171,8 +171,6 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub {

        void removeImeSurfaceFromWindowAsync(IBinder windowToken);

        void startProtoDump(byte[] bytes, int i, String s);

        boolean isImeTraceEnabled();

        @PermissionVerified(Manifest.permission.CONTROL_UI_TRACING)
@@ -406,11 +404,6 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub {
        mCallback.removeImeSurfaceFromWindowAsync(windowToken);
    }

    @Override
    public void startProtoDump(byte[] protoDump, int source, String where) {
        mCallback.startProtoDump(protoDump, source, where);
    }

    @Override
    public boolean isImeTraceEnabled() {
        return mCallback.isImeTraceEnabled();
Loading