导航菜单

页面标题

页面副标题

Tasker v6.5.11 - IntentServiceSleeping.java 源代码

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

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


package com.joaomgcd.taskerm.state.sensor;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import com.google.android.gms.location.SleepClassifyEvent;
import com.google.android.gms.location.SleepSegmentRequest;
import com.joaomgcd.taskerm.rx.IntentServiceSubject;
import com.joaomgcd.taskerm.util.k8;
import com.joaomgcd.taskerm.util.x2;
import java.util.ArrayList;
import java.util.List;
import kotlin.collections.r;
import lj.j;
import lj.k;
import pg.f;
import yj.h;
import yj.p;
import yj.q;
import zg.d;

public final class IntentServiceSleeping extends IntentServiceSubject<d> {
    public static final b i = new b(null);
    private static final j<ij.b<d>> q = k.b(a.i);

    static final class a extends q implements xj.a<ij.b<d>> {
        public static final a i = new a();

        a() {
            super(0);
        }

        @Override
        public final ij.b<d> invoke() {
            return ij.b.A0();
        }
    }

    public static final class b extends f<d> {
        public b(h hVar) {
            this();
        }

        private final v9.c d(Context context) {
            v9.c a = v9.a.a(context);
            p.h(a, "getClient(...)");
            return a;
        }

        private final PendingIntent e(Context context) {
            Intent intent = new Intent(context, (Class<?>) IntentServiceSleeping.class);
            PendingIntent service = PendingIntent.getService(context, 171566986, intent, k8.g(134217728, intent));
            p.h(service, "getService(...)");
            return service;
        }

        @Override
        protected ij.b<d> a() {
            return (ij.b) IntentServiceSleeping.q.getValue();
        }

        public void f(Context context) {
            p.i(context, "context");
            d(context).e(e(context), new SleepSegmentRequest(2));
        }

        public void g(Context context) {
            p.i(context, "context");
            d(context).b(e(context));
        }

        private b() {
        }
    }

    static final class c extends q implements xj.a<List<SleepClassifyEvent>> {
        final Intent i;

        c(Intent intent) {
            super(0);
            this.i = intent;
        }

        @Override
        public final List<SleepClassifyEvent> invoke() {
            return SleepClassifyEvent.d(this.i);
        }
    }

    public IntentServiceSleeping() {
        super("IntentServiceSleeping");
    }

    @Override
    protected List<d> a(Intent intent) {
        p.i(intent, "intent");
        ArrayList arrayList = null;
        List<SleepClassifyEvent> list = (List) x2.U4(null, new c(intent), 1, null);
        if (list != null) {
            arrayList = new ArrayList(r.v(list, 10));
            for (SleepClassifyEvent sleepClassifyEvent : list) {
                arrayList.add(new d(sleepClassifyEvent.e(), sleepClassifyEvent.f(), sleepClassifyEvent.g()));
            }
        }
        return arrayList;
    }

    @Override
    public b b() {
        return i;
    }
}