导航菜单

页面标题

页面副标题

Tasker v6.5.11 - InputMethodServiceTasker.java 源代码

正在查看: Tasker v6.5.11 应用的 InputMethodServiceTasker.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.joaomgcd.taskerm.keyboard;

import android.inputmethodservice.InputMethodService;
import android.inputmethodservice.KeyboardView;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.InputConnection;
import pg.d;
import xf.e;
import yj.p;
import yj.q;

public final class InputMethodServiceTasker extends InputMethodService implements KeyboardView.OnKeyboardActionListener {

    static final class a extends q implements xj.a<InputConnection> {
        a() {
            super(0);
        }

        @Override
        public final InputConnection invoke() {
            InputConnection currentInputConnection = InputMethodServiceTasker.this.getCurrentInputConnection();
            p.h(currentInputConnection, "getCurrentInputConnection(...)");
            return currentInputConnection;
        }
    }

    @Override
    public void onBindInput() {
        super.onBindInput();
        d.j(new e(new a()));
    }

    @Override
    public View onCreateInputView() {
        return null;
    }

    @Override
    public void onKey(int i, int[] iArr) {
        InputConnection currentInputConnection = getCurrentInputConnection();
        if (currentInputConnection != null) {
            if (i != -5) {
                currentInputConnection.commitText(String.valueOf((char) i), 1);
            } else if (TextUtils.isEmpty(currentInputConnection.getSelectedText(0))) {
                currentInputConnection.deleteSurroundingText(1, 0);
            } else {
                currentInputConnection.commitText("", 1);
            }
        }
    }

    @Override
    public void onPress(int i) {
    }

    @Override
    public void onRelease(int i) {
    }

    @Override
    public void onText(CharSequence charSequence) {
    }

    @Override
    public void onUnbindInput() {
        super.onUnbindInput();
    }

    @Override
    public void swipeDown() {
    }

    @Override
    public void swipeLeft() {
    }

    @Override
    public void swipeRight() {
    }

    @Override
    public void swipeUp() {
    }
}