导航菜单

页面标题

页面副标题

Tasker v6.5.11 - IntentHandler.java 源代码

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

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


package net.dinglisch.android.taskerm;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Pair;
import java.io.File;

public class IntentHandler extends Activity implements pf.a {
    private SharedPreferences i;
    private com.joaomgcd.taskerm.helper.e<IntentHandler> q = new com.joaomgcd.taskerm.helper.e<>(this);

    private boolean e(String str) {
        File file;
        File file2 = null;
        if (str == null) {
            r7.k("IntentHandler", "null ssp");
            file = null;
        } else {
            file = new File(str.substring(2));
        }
        if (file == null) {
            r7.k("IntentHandler", "null target file");
            return false;
        }
        if (!file.exists()) {
            r7.k("IntentHandler", "file not exist: " + file);
            return false;
        }
        if (file.getName().endsWith(".prf.xml")) {
            file2 = wo.A0(this.i);
        } else if (file.getName().endsWith(".tsk.xml")) {
            file2 = tn.L0();
        } else if (file.getName().endsWith(".scn.xml")) {
            file2 = dk.i1();
        } else if (file.getName().endsWith(".prj.xml")) {
            file2 = xi.l(this.i);
        }
        if (file2 == null) {
            return false;
        }
        if (dq.o2(file2)) {
            l(file, file2);
        } else {
            dq.c0(this, 2131887828, file2.toString());
        }
        return true;
    }

    private boolean f(android.net.Uri r11, java.lang.String r12) {
        throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.IntentHandler.f(android.net.Uri, java.lang.String):boolean");
    }

    private Pair<Boolean, Boolean> h(final Resources resources, Intent intent) {
        r7.f("IntentHandler", "shortcut click: " + intent.toString());
        com.joaomgcd.taskerm.util.f1.e(intent);
        final Bundle extras = intent.getExtras();
        r7.v("BOO", extras);
        if (extras == null) {
            r7.G("IntentHandler", "shortcut intent has no extras");
            finish();
            return new Pair<>(Boolean.FALSE, Boolean.TRUE);
        }
        if (extras.containsKey("shortcutID")) {
            wm.g(this, extras.getString("shortcutID"));
        }
        final String string = extras.getString("mcro");
        if (string == null) {
            r7.G("IntentHandler", "shortcut click intent has no task extra");
            finish();
            return new Pair<>(Boolean.FALSE, Boolean.TRUE);
        }
        final Runnable runnable = new Runnable() {
            @Override
            public final void run() {
                IntentHandler.this.i(string, resources, extras);
            }
        };
        if (d() || com.joaomgcd.taskerm.settings.q0.c(this)) {
            runnable.run();
            Boolean bool = Boolean.TRUE;
            return new Pair<>(bool, bool);
        }
        fh.a aVar = new fh.a(this);
        if (!aVar.k(extras)) {
            this.q.R(com.joaomgcd.taskerm.dialog.a.y0(this), new oi.d() {
                @Override
                public final void accept(Object obj) {
                    IntentHandler.this.j((we.l0) obj);
                }
            });
            return new Pair<>(Boolean.TRUE, Boolean.FALSE);
        }
        if (!aVar.l(extras)) {
            this.q.R(com.joaomgcd.taskerm.dialog.a.w0(this), new oi.d() {
                @Override
                public final void accept(Object obj) {
                    IntentHandler.this.k(runnable, (Boolean) obj);
                }
            });
            return new Pair<>(Boolean.TRUE, Boolean.FALSE);
        }
        runnable.run();
        Boolean bool2 = Boolean.TRUE;
        return new Pair<>(bool2, bool2);
    }

    public void i(String str, Resources resources, Bundle bundle) {
        int i = dq.R0(this).getInt("wtp", 7);
        tn tnVar = new tn(new qi(str));
        r7.f("IntentHandler", "shortcut task: " + tnVar.u1(resources));
        r7.f("IntentHandler", "update shortcut task pri, " + tnVar.m1() + "->" + i);
        tnVar.D2(i);
        Bundle bundle2 = null;
        if (bundle.containsKey("source")) {
            Bundle bundle3 = new Bundle();
            kq.d(bundle.getString("source"), null, bundle3);
            bundle2 = bundle3;
        }
        ExecuteService.n7(this, tnVar, bundle2);
    }

    public void j(we.l0 l0Var) throws Exception {
        finish();
    }

    public void k(Runnable runnable, Boolean bool) throws Exception {
        if (bool.booleanValue()) {
            runnable.run();
        }
        finish();
    }

    private void l(File file, File file2) {
        if (dq.q2(file, file2) == null) {
            dq.e0(this, 2131887483, 2131887190, 1);
        } else {
            dq.e0(this, 2131887483, 2131887231, 1);
        }
    }

    protected boolean d() {
        return Kid.a();
    }

    @Override
    public void g(com.joaomgcd.taskerm.util.e5 e5Var, com.joaomgcd.taskerm.util.t6 t6Var) {
    }

    @Override
    public void onCreate(android.os.Bundle r9) {
        throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.IntentHandler.onCreate(android.os.Bundle):void");
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.q.J();
        this.i = null;
    }
}