正在查看: 管控平台 v5.2.3.0. 应用的 MdmStoreDownloadFlagReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 管控平台 v5.2.3.0. 应用的 MdmStoreDownloadFlagReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.iflytek.mdmservice.receiver;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.service.RemoteDownloadService;
public class MdmStoreDownloadFlagReceiver extends MdmReceiver {
private static void e() {
AlarmManager alarmManager = (AlarmManager) MDMApp.j().getSystemService("alarm");
Intent intent = new Intent(MDMApp.j(), (Class<?>) RemoteDownloadService.class);
intent.putExtra("remotedownloadstr_pause_all_flag", -1);
alarmManager.cancel(PendingIntent.getService(MDMApp.j(), 21, intent, 134217728));
}
public static void f(boolean z) {
Intent intent = new Intent(MDMApp.j(), (Class<?>) RemoteDownloadService.class);
intent.putExtra("remotedownloadstr_pause_all_flag", z ? 1 : -1);
MDMApp.j().startService(intent);
}
public static void g(long j) {
AlarmManager alarmManager = (AlarmManager) MDMApp.j().getSystemService("alarm");
Intent intent = new Intent(MDMApp.j(), (Class<?>) RemoteDownloadService.class);
intent.putExtra("remotedownloadstr_pause_all_flag", -1);
PendingIntent service = PendingIntent.getService(MDMApp.j(), 21, intent, 134217728);
if (Build.VERSION.SDK_INT < 19) {
alarmManager.set(0, System.currentTimeMillis() + j, service);
} else {
alarmManager.setExact(0, System.currentTimeMillis() + j, service);
}
}
@Override
public void onReceive(Context context, Intent intent) {
super.onReceive(context, intent);
String action = intent.getAction();
String stringExtra = intent.getStringExtra("package");
String stringExtra2 = intent.getStringExtra("sign");
LogUtil.c("MDMApi", "action:" + action + ", packageName:" + stringExtra);
if (!c(1022, stringExtra, stringExtra2)) {
LogUtil.c("MDMApi", "action:" + action + ", packageName:" + stringExtra + " unauthorized");
return;
}
if ("com.iflytek.mdm.intent.ACTION_STORE_SET_PAUSE_ALL".equals(action)) {
f(true);
g(2700000L);
} else if ("com.iflytek.mdm.intent.ACTION_STORE_CANCEL_PAUSE_ALL".equals(action)) {
f(false);
e();
}
}
}