正在查看: 管控平台 v5.2.3.0. 应用的 LogoutReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 管控平台 v5.2.3.0. 应用的 LogoutReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.iflytek.mdmservice.receiver;
import android.content.BroadcastReceiver;
import android.content.ContentProviderClient;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.RemoteException;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmcommon.SpHelper;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.db.impl.TeaCtrlAppPolicyDaoImpl;
import com.iflytek.mdmservice.db.impl.TeaCtrlFunPolicyDaoImpl;
import com.iflytek.mdmservice.k.d0;
import com.iflytek.mdmservice.utils.BigDataTrackUtil;
import com.iflytek.user.combo.ComboManage;
import java.util.Iterator;
public class LogoutReceiver extends BroadcastReceiver {
private com.iflytek.mdmservice.l.a f365a;
private void b() {
LogUtil.c("MDMLogin", "退出登录,清除用户数据");
MDMApp.h();
SpHelper.putLong("clazzId", -1L);
SpHelper.putLong("schoolId", -1L);
SpHelper.putLong(ComboManage.USER_ID, -1L);
BigDataTrackUtil.setUserId("-1");
MDMApp.d(1);
if (!MDMApp.m().isEmpty()) {
d0.b0().N0();
}
try {
new TeaCtrlFunPolicyDaoImpl(MDMApp.j()).clearAllUserPolicy();
new TeaCtrlAppPolicyDaoImpl(MDMApp.j()).clearAllUserPolicy();
} catch (Exception e) {
LogUtil.c("TeaCtrlPolicy", "登出时清除教师管控测类出错:" + e.getMessage());
}
Uri parse = Uri.parse("content://com.iflytek.mdmservice.provider.PolicyTempProvider/policy");
ContentProviderClient acquireContentProviderClient = MDMApp.j().getContentResolver().acquireContentProviderClient(parse);
if (acquireContentProviderClient != null) {
try {
acquireContentProviderClient.delete(parse, "1=1", new String[0]);
LogUtil.c("MDMKeys", "logout, clear temp policy");
} catch (RemoteException e2) {
LogUtil.c("MDMKeys", "logout, clear temp policy exception: " + e2.getMessage());
}
ContentValues contentValues = new ContentValues();
contentValues.put("device", "{11:0,12:0,13:0,16:0,17:0}");
contentValues.put("type", (Integer) 1);
try {
acquireContentProviderClient.insert(parse, contentValues);
LogUtil.c("MDMKeys", "insert logout policy {11:0,12:0,13:0,16:0,17:0}");
} catch (RemoteException e3) {
LogUtil.c("MDMKeys", "insert logout policy exception: " + e3.getMessage());
}
acquireContentProviderClient.release();
}
Iterator it = com.iflytek.mdmepas.b.a.iterator();
while (it.hasNext()) {
d0.b0().i1((String) it.next());
}
d0.b0().e0(-1L, false);
}
public void a(Context context) {
if (this.f365a == null) {
this.f365a = new com.iflytek.mdmservice.l.a();
}
d0.b0().j0();
b();
MDMApp.f();
this.f365a.m(true, com.iflytek.mdmservice.l.a.h(context.getPackageManager()));
}
@Override
public void onReceive(final Context context, Intent intent) {
LogUtil.c("MDMLogin", "收到登出广播:" + intent.getAction());
com.iflytek.mdmservice.utils.r.a(new Runnable() {
@Override
public final void run() {
LogoutReceiver.this.a(context);
}
});
}
}