导航菜单

页面标题

页面副标题

Tasker v6.5.11 - ServiceGenericActionJobs.java 源代码

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

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


package com.joaomgcd.taskerm.genericaction;

import android.app.job.JobParameters;
import android.app.job.JobService;
import android.content.Intent;
import android.os.Parcelable;
import android.os.PersistableBundle;
import jk.d1;
import jk.n0;
import jk.o0;
import jk.x2;
import net.dinglisch.android.taskerm.r7;
import pg.w0;

public final class ServiceGenericActionJobs extends JobService {
    private final lj.j i = lj.k.b(a.i);

    static final class a extends yj.q implements xj.a<n0> {
        public static final a i = new a();

        a() {
            super(0);
        }

        @Override
        public final n0 invoke() {
            return o0.j(o0.a(d1.b()), x2.b(null, 1, null));
        }
    }

    static final class b extends yj.q implements xj.a<lj.e0> {
        final Intent q;
        final JobParameters r;

        b(Intent intent, JobParameters jobParameters) {
            super(0);
            this.q = intent;
            this.r = jobParameters;
        }

        public final void a() {
            a0.b(new a0(ServiceGenericActionJobs.this, this.q), ServiceGenericActionJobs.this.a(), null, null, 6, null);
            ServiceGenericActionJobs.this.jobFinished(this.r, false);
        }

        @Override
        public lj.e0 invoke() {
            a();
            return lj.e0.a;
        }
    }

    public final n0 a() {
        return (n0) this.i.getValue();
    }

    @Override
    public boolean onStartJob(JobParameters jobParameters) {
        String string;
        yj.p.i(jobParameters, "parameters");
        PersistableBundle extras = jobParameters.getExtras();
        if (extras == null || (string = extras.getString("EXTRA_GENERIC_ACTION_CLASS")) == null) {
            return false;
        }
        Intent intent = new Intent();
        intent.putExtra("EXTRA_ID", extras.getString("EXTRA_ID"));
        try {
            Object h = wf.c.a().h(extras.getString("EXTRA_GENERIC_ACTION"), Class.forName(string));
            yj.p.g(h, "null cannot be cast to non-null type android.os.Parcelable");
            intent.putExtra("EXTRA_GENERIC_ACTION", (Parcelable) h);
        } catch (Exception e) {
            r7.l("GenericAction", "Couldn't run job", e);
            jobFinished(jobParameters, false);
        }
        w0.m0(new b(intent, jobParameters));
        return true;
    }

    @Override
    public boolean onStopJob(JobParameters jobParameters) {
        yj.p.i(jobParameters, "parameters");
        o0.f(a(), null, 1, null);
        return false;
    }
}