导航菜单

页面标题

页面副标题

Tasker v6.6.3 - IntentServiceSleeping.java 源代码

正在查看: Tasker v6.6.3 应用的 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.state.sensor.IntentServiceSleeping;
import com.joaomgcd.taskerm.util.b7;
import com.joaomgcd.taskerm.util.bi;
import ih.i;
import java.util.ArrayList;
import java.util.List;
import jk.h;
import jk.p;
import kotlin.collections.t;
import t9.c;
import vj.j;
import vj.k;

public final class IntentServiceSleeping extends IntentServiceSubject<i> {
    public static final a i = new a(null);
    public static final int q = 8;
    private static final j<sj.b<i>> r = k.a(new ik.a() {
        @Override
        public final Object e() {
            sj.b h;
            h = IntentServiceSleeping.h();
            return h;
        }
    });

    public static final class a extends xg.j<i> {
        public a(h hVar) {
            this();
        }

        private final c d(Context context) {
            c a = t9.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, bi.m(134217728, intent));
            p.h(service, "getService(...)");
            return service;
        }

        @Override
        protected sj.b<i> a() {
            return (sj.b) IntentServiceSleeping.r.getValue();
        }

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

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

        private a() {
        }
    }

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

    public static final List f(Intent intent) {
        return SleepClassifyEvent.d(intent);
    }

    public static final sj.b h() {
        return sj.b.A0();
    }

    @Override
    protected List<i> a(final Intent intent) {
        p.i(intent, "intent");
        ArrayList arrayList = null;
        List<SleepClassifyEvent> list = (List) b7.n6(null, new ik.a() {
            @Override
            public final Object e() {
                List f;
                f = IntentServiceSleeping.f(intent);
                return f;
            }
        }, 1, null);
        if (list != null) {
            arrayList = new ArrayList(t.w(list, 10));
            for (SleepClassifyEvent sleepClassifyEvent : list) {
                arrayList.add(new i(sleepClassifyEvent.e(), sleepClassifyEvent.f(), sleepClassifyEvent.g()));
            }
        }
        return arrayList;
    }

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