正在查看: Fix Locker v1.5 应用的 LockingActvity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Fix Locker v1.5 应用的 LockingActvity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.user.a4keygen.activity;
import android.app.ActivityManager;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Canvas;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.MotionEventCompat;
import com.user.a4keygen.R;
import com.user.a4keygen.receiver.ActionReceiver;
import com.user.a4keygen.receiver.BootcompleteReceiver;
import com.user.a4keygen.services.FloatWidgetService;
import com.user.a4keygen.services.PreventUserService;
import com.user.a4keygen.sharedprefrence.SharedPrefManager;
import com.user.a4keygen.util.HomeKeyLocker;
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
public class LockingActvity extends AppCompatActivity implements GestureDetector.OnGestureListener {
ActionReceiver actionReceiver;
BootcompleteReceiver bootcompleteReceiver;
private Button btBattery;
private Button btHide;
private Button btNotification;
private Button btNotification1;
private Button btOverlay;
private Button btRestart;
private Button btwipeData;
private DevicePolicyManager dpm;
private HomeKeyLocker mHomeKeyLocker;
private TextView tvLockMessageSec;
private TextView tvLockMessages;
public void onBackPressed() {
}
@Override
public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
return false;
}
@Override
public void onLongPress(MotionEvent motionEvent) {
}
@Override
public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
return false;
}
@Override
public void onShowPress(MotionEvent motionEvent) {
}
@Override
public boolean onSingleTapUp(MotionEvent motionEvent) {
return false;
}
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
requestWindowFeature(1);
getWindow().setFlags(1024, 1024);
getWindow().getDecorView().setSystemUiVisibility(4103);
getWindow().setFlags(524320, 16777215);
getWindow().setLayout(-1, -1);
setContentView(R.layout.activity_locking_actvity);
initialize();
getWindow().addFlags(PKIFailureInfo.signerNotTrusted);
getWindow().addFlags(4194304);
this.bootcompleteReceiver = new BootcompleteReceiver();
this.actionReceiver = new ActionReceiver();
IntentFilter intentFilter = new IntentFilter("android.intent.action.BOOT_COMPLETED");
IntentFilter intentFilter2 = new IntentFilter("com.user.a4keygen.receiver.ActionReceiver.ACTION_RECEIVER");
registerReceiver(this.bootcompleteReceiver, intentFilter);
registerReceiver(this.actionReceiver, intentFilter2);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
SharedPrefManager.getInstance(LockingActvity.this).saveSetupCompleted("D");
}
}, 5000L);
if (Build.VERSION.SDK_INT >= 26) {
startForegroundService(new Intent((Context) this, (Class<?>) PreventUserService.class));
} else {
startService(new Intent((Context) this, (Class<?>) PreventUserService.class));
}
this.btNotification1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
intent.putExtra("app_package", LockingActvity.this.getPackageName());
intent.putExtra("app_uid", LockingActvity.this.getApplicationInfo().uid);
intent.putExtra("android.provider.extra.APP_PACKAGE", LockingActvity.this.getPackageName());
LockingActvity.this.startActivity(intent);
}
});
this.btwipeData.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
LockingActvity.this.dpm.wipeData(0);
}
});
this.btNotification.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent("android.settings.APP_NOTIFICATION_SETTINGS");
intent.putExtra("android.provider.extra.APP_PACKAGE", "android");
LockingActvity.this.startActivityForResult(intent, 101);
}
});
this.btHide.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
LockingActvity.this.getPackageManager().setComponentEnabledSetting(new ComponentName((Context) LockingActvity.this, (Class<?>) SplashActivity.class), 2, 1);
}
});
this.btBattery.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
LockingActvity.this.startActivity(new Intent("android.settings.BATTERY_SAVER_SETTINGS"));
}
});
this.btRestart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (Build.VERSION.SDK_INT >= 26) {
LockingActvity.this.startForegroundService(new Intent((Context) LockingActvity.this, (Class<?>) PreventUserService.class));
} else {
LockingActvity.this.startService(new Intent((Context) LockingActvity.this, (Class<?>) PreventUserService.class));
}
}
});
this.btOverlay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
LockingActvity.this.startService(new Intent((Context) LockingActvity.this, (Class<?>) FloatWidgetService.class));
}
});
DrawOnTop drawOnTop = new DrawOnTop(this);
addContentView(drawOnTop, new ViewGroup.LayoutParams(-2, -2));
drawOnTop.bringToFront();
}
private void initialize() {
this.tvLockMessages = (TextView) findViewById(R.id.tvLockMessages);
this.tvLockMessageSec = (TextView) findViewById(R.id.tvLockMessageSec);
this.btNotification = (Button) findViewById(R.id.btNotification);
this.btNotification1 = (Button) findViewById(R.id.btNotification1);
this.btwipeData = (Button) findViewById(R.id.btwipeData);
this.btHide = (Button) findViewById(R.id.btHide);
this.btOverlay = (Button) findViewById(R.id.btOverlay);
this.btRestart = (Button) findViewById(R.id.btRestart);
this.btBattery = (Button) findViewById(R.id.btBattery);
this.dpm = (DevicePolicyManager) getSystemService("device_policy");
this.btHide.setVisibility(0);
}
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i != 4 && i == 3) {
Log.d("Test", "Home button pressed!");
}
return super.onKeyDown(i, keyEvent);
}
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
}
public void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
}
@Override
public boolean onDown(MotionEvent motionEvent) {
Log.d("Gesture ", " onDown");
return true;
}
protected void onPause() {
super.onPause();
((ActivityManager) getApplicationContext().getSystemService("activity")).moveTaskToFront(getTaskId(), 0);
}
public boolean onTouchEvent(MotionEvent motionEvent) {
MotionEventCompat.getActionMasked(motionEvent);
return super.onTouchEvent(motionEvent);
}
protected void onStop() {
super.onStop();
}
static class DrawOnTop extends View {
@Override
protected void onDraw(Canvas canvas) {
}
public DrawOnTop(Context context) {
super(context);
}
}
}