正在查看: BetterTogether v3.0.0 应用的 AlarmReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BetterTogether v3.0.0 应用的 AlarmReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bettertogether.syncUserData;
import a0.g0;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.work.v;
import androidx.work.w;
import com.bettertogether.BetterTogetherApp;
import com.bettertogether.syncUserData.service.BackgroundAutoSyncWorker;
import com.bettertogether.syncUserData.service.SyncUserDataService;
import et.d;
import java.util.Collections;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.u;
import rh.k;
import s6.s;
import v7.l;
@Metadata
public final class AlarmReceiver extends BroadcastReceiver {
public static void a(int i10, boolean z4) {
BetterTogetherApp betterTogetherApp = BetterTogetherApp.d;
Intent intent = new Intent((Context) s.j(), (Class<?>) SyncUserDataService.class);
if (Build.VERSION.SDK_INT >= 31) {
d.a("WorkManager startWorker", new Object[0]);
v vVar = new v(BackgroundAutoSyncWorker.class);
vVar.f2678c.add("BackgroundAutoSyncWorker");
w a10 = vVar.a();
Intrinsics.checkNotNullExpressionValue(a10, "Builder(BackgroundAutoSy… .build()");
l.l(s.j()).j(Collections.singletonList(a10));
} else {
s.j().startForegroundService(intent);
}
k.m(s.j(), i10, z4);
}
@Override
public final void onReceive(Context context, Intent intent) {
int i10;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(intent, "intent");
d.d("GoogleFit").a(g0.j("#AlarmReciever Pre onRecieve ", intent.getAction()), new Object[0]);
Bundle extras = intent.getExtras();
if (extras != null) {
i10 = extras.getInt("scheduleType");
d.d("GoogleFit").a(g0.f("ReminderReceiver ", i10), new Object[0]);
} else {
i10 = -1;
}
d.d("GoogleFit").a(g0.f("scheduleType:", i10), new Object[0]);
if (u.h(intent.getAction(), "android.intent.action.BOOT_COMPLETED", false)) {
k.n(context);
return;
}
if (i10 == 0) {
d.d("GoogleFit").a(g0.f("scheduleType:", i10), new Object[0]);
a(1, false);
} else if (i10 == 1) {
a(2, false);
} else if (i10 == 2) {
a(0, true);
}
}
}