正在查看: 管控平台 v5.2.3.0. 应用的 MdmSilentInstallReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 管控平台 v5.2.3.0. 应用的 MdmSilentInstallReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.iflytek.mdmservice.receiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.text.TextUtils;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmlibrary.MdmSdk;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.service.CopyService;
import java.util.ArrayList;
import java.util.List;
public class MdmSilentInstallReceiver extends MdmReceiver {
@Override
public void onReceive(Context context, Intent intent) {
super.onReceive(context, intent);
String action = intent.getAction();
String stringExtra = intent.getStringExtra("sign");
String stringExtra2 = intent.getStringExtra("package");
LogUtil.c("MDMApi", "action:" + action + ", packageName:" + stringExtra2);
if (!c(1017, stringExtra2, stringExtra)) {
LogUtil.c("MDMApi", "action:" + action + ", packageName:" + stringExtra2 + " unauthorized");
return;
}
if ("com.iflytek.mdm.intent.ACTION_SILENT_INSTAll".equals(action)) {
String stringExtra3 = intent.getStringExtra("path");
if (com.iflytek.mdmbase.b.a.a(Build.MODEL) || com.iflytek.mdmbase.b.a.b(Build.MODEL)) {
MDMApp j = MDMApp.j();
Intent intent2 = new Intent(j, (Class<?>) CopyService.class);
intent2.putExtra("path", stringExtra3);
j.startService(intent2);
return;
}
if ("iFLYTEK".equals(Build.BRAND)) {
String stringExtra4 = intent.getStringExtra("installPkg");
if (TextUtils.isEmpty(stringExtra4)) {
return;
}
List installPackageWhiteList = MdmSdk.getInstallPackageWhiteList();
if (installPackageWhiteList == null || installPackageWhiteList.isEmpty()) {
ArrayList arrayList = new ArrayList(1);
arrayList.add(stringExtra4);
MdmSdk.setInstallPackageWhiteList(arrayList);
} else if (!installPackageWhiteList.contains(stringExtra4)) {
installPackageWhiteList.add(stringExtra4);
MdmSdk.setInstallPackageWhiteList(installPackageWhiteList);
}
}
MdmSdk.silentInstall(stringExtra3);
LogUtil.c("MDMApps", "接收安装通知,请求安装: " + stringExtra3);
}
}
}