Runt
2022-05-15 75360a9fa2fcead8b516467d982c5cdf82c63263
app/src/main/java/com/auto/lyric/service/AutoInputService.java
@@ -129,6 +129,7 @@
     * 点击弹出 edit弹框
     */
    private void clickEdit(){
        try{
        List<AccessibilityNodeInfo> list = getRootInActiveWindow().findAccessibilityNodeInfosByText("说点什么...");
        Log.e(TAG,"获取到控件 "+list.size());
        if (list != null && list.size() > 0 && flag) {
@@ -142,6 +143,7 @@
        }else if(flag){
            //Toast.makeText(getBaseContext(),"未找到控件",Toast.LENGTH_SHORT).show();
        }
        }catch ( Exception e){}
    }
    @SuppressLint("NewApi")
@@ -176,8 +178,8 @@
    @SuppressLint("NewApi")
    private AccessibilityNodeInfo getViewByDesc(AccessibilityNodeInfo node, String desc){
        try{
            Log.e(TAG,desc +" getViewByDesc id:"+node.getViewIdResourceName() +" class:"+node.getClassName()+" text:"+node.getText()+" "+node.getContentDescription());
            Log.e(TAG,"getViewByDesc  node:"+node);
            //Log.e(TAG,desc +" getViewByDesc id:"+node.getViewIdResourceName() +" class:"+node.getClassName()+" text:"+node.getText()+" "+node.getContentDescription());
            //Log.e(TAG,"getViewByDesc  node:"+node);
            if(node.getChildCount() > 0){
                for(int i = 0 ; i < node.getChildCount() ; i ++){
                    if(node.getChild(i) != null) {
@@ -209,7 +211,9 @@
    @Override
    public void onInterrupt() {
        Log.e(TAG,"onInterrupt 服务停止");
        unregisterReceiver(receiver);
        Toast.makeText(getBaseContext(),"服务停止",Toast.LENGTH_SHORT).show();
    }
    @Override
    protected void onServiceConnected() {