正在查看: Loan Locker v1.5 应用的 PreventUserActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Loan Locker v1.5 应用的 PreventUserActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.user.a4keygen.activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.ResolveInfo;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.user.a4keygen.R;
import com.user.a4keygen.services.PreventUserService;
import com.user.a4keygen.sharedprefrence.SharedPrefManager;
import java.util.List;
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
public class PreventUserActivity extends AppCompatActivity {
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_prevent_user);
TextView textView = (TextView) findViewById(R.id.tvCompanyName);
TextView textView2 = (TextView) findViewById(R.id.tvDealerName);
TextView textView3 = (TextView) findViewById(R.id.tvDealerPhone);
if ("N".equals(SharedPrefManager.getInstance(this).getNfplFlag())) {
textView.setVisibility(4);
}
textView2.setText(SharedPrefManager.getInstance(this).getDealerName());
textView3.setText("Call now " + SharedPrefManager.getInstance(this).getDealerphone());
if (Build.VERSION.SDK_INT >= 26) {
startForegroundService(new Intent((Context) this, (Class<?>) PreventUserService.class));
} else {
startService(new Intent((Context) this, (Class<?>) PreventUserService.class));
}
}
public void onBackPressed() {
super.onBackPressed();
finishAffinity();
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.HOME");
intent.addFlags(8388608);
startActivity(intent);
}
public void onStop() {
super.onStop();
try {
System.out.println("onStop Called package5");
Intent launchIntentForPackage = getPackageManager().getLaunchIntentForPackage(querySettingPkgName());
if (launchIntentForPackage != null) {
startActivity(launchIntentForPackage);
}
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.HOME");
intent.setFlags(268435456);
startActivity(intent);
((ActivityManager) getSystemService("activity")).killBackgroundProcesses("com.miui.securitycenter");
finishAffinity();
Intent intent2 = new Intent("android.intent.action.MAIN");
intent2.addCategory("android.intent.category.HOME");
intent2.addFlags(8388608);
startActivity(intent2);
} catch (Exception e) {
e.printStackTrace();
}
}
private String querySettingPkgName() {
List<ResolveInfo> queryIntentActivities = getPackageManager().queryIntentActivities(new Intent("android.settings.SETTINGS"), PKIFailureInfo.notAuthorized);
return (queryIntentActivities == null || queryIntentActivities.size() == 0) ? "" : queryIntentActivities.get(0).activityInfo.packageName;
}
private void killAppBypackage(String str) {
List<ApplicationInfo> installedApplications = getPackageManager().getInstalledApplications(0);
ActivityManager activityManager = (ActivityManager) getSystemService("activity");
String packageName = getApplicationContext().getPackageName();
for (ApplicationInfo applicationInfo : installedApplications) {
if ((applicationInfo.flags & 1) != 1 && !applicationInfo.packageName.equals(packageName) && applicationInfo.packageName.equals(str)) {
activityManager.killBackgroundProcesses(applicationInfo.packageName);
}
}
}
}