正在查看: 管控平台 v5.2.3.0. 应用的 RemoteDownloadService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 管控平台 v5.2.3.0. 应用的 RemoteDownloadService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.iflytek.mdmservice.service;
import a.b.c.c;
import android.app.IntentService;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.net.Uri;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
import androidx.annotation.Nullable;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.db.RemoteAppInfoManager;
import com.iflytek.mdmstore.model.RemoteAppInfo;
import java.util.Iterator;
import java.util.List;
public class RemoteDownloadService extends IntentService {
private a.b.c.c f506a;
ServiceConnection f507b;
class a implements ServiceConnection {
a() {
}
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
RemoteDownloadService.this.f506a = c.a.G(iBinder);
LogUtil.e("服务启动");
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
RemoteDownloadService.this.f506a = null;
LogUtil.e("服务关闭");
}
}
public RemoteDownloadService() {
super("RemoteDownloadService");
this.f507b = new a();
}
@Override
public void onCreate() {
super.onCreate();
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.iflytek.mdmstore", "com.iflytek.mdmstore.service.DownloadRemoteManagerService"));
boolean bindService = bindService(intent, this.f507b, 1);
LogUtil.e("绑定服务" + bindService);
LogUtil.i("iFlytekMDM_service", "bindService: " + bindService);
}
@Override
public void onDestroy() {
LogUtil.d("RemoteDownloadService", "onDestroy");
ServiceConnection serviceConnection = this.f507b;
if (serviceConnection != null) {
unbindService(serviceConnection);
LogUtil.d("RemoteDownloadService", "onDestroy解绑");
}
super.onDestroy();
}
@Override
protected void onHandleIntent(@Nullable Intent intent) {
a.b.c.c cVar;
long currentTimeMillis = System.currentTimeMillis();
while (this.f506a == null && System.currentTimeMillis() - currentTimeMillis < 3000) {
SystemClock.sleep(100L);
}
int intExtra = intent.getIntExtra("remotedownloadstr_pause_all_flag", 0);
if (intExtra != 0) {
a.b.c.c cVar2 = this.f506a;
if (cVar2 != null) {
try {
cVar2.c(intExtra > 0);
return;
} catch (RemoteException unused) {
LogUtil.c("MDMStore", "调用商店aidl接口失败");
return;
}
}
return;
}
if (intent.getIntExtra("remotedownloadappinfo_now", 1) == 1 && intent.getIntExtra("storeobserverchange", 1) != 2 && com.iflytek.mdmservice.utils.v.m()) {
LogUtil.c("RemoteDownloadService", "onHandleIntent: 111111111");
List<RemoteAppInfo> remoteAppInfo = RemoteAppInfoManager.getInstance().getRemoteAppInfo();
RemoteAppInfoManager.getInstance().removeAll();
if (remoteAppInfo != null && !remoteAppInfo.isEmpty() && (cVar = this.f506a) != null) {
try {
cVar.x(remoteAppInfo);
} catch (RemoteException unused2) {
Iterator<RemoteAppInfo> it = remoteAppInfo.iterator();
while (it.hasNext()) {
com.iflytek.mdmservice.utils.e.b(getApplicationContext()).e(it.next());
}
}
} else if (remoteAppInfo != null && !remoteAppInfo.isEmpty()) {
for (RemoteAppInfo remoteAppInfo2 : remoteAppInfo) {
RemoteAppInfoManager.getInstance().removeRemoteAppInfo(remoteAppInfo2.getDownloadUrl());
com.iflytek.mdmservice.utils.e.b(getApplicationContext()).e(remoteAppInfo2);
}
}
}
if (intent.getIntExtra("storeobserverchange", 1) == 2) {
LogUtil.c("RemoteDownloadService", "onHandleIntent: 2222222");
MDMApp.j().getContentResolver().notifyChange(Uri.parse("content://com.iflytek.mdmservice.provider.AppInfoProvider/policy"), null);
}
}
}