正在查看: 万能钥匙 v1.1.23 应用的 OPActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 OPActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.lantern.daemon.op;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.PowerManager;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import pa.d;
public class OPActivity extends Activity {
public static ChangeQuickRedirect changeQuickRedirect;
public BroadcastReceiver a;
public class a implements View.OnTouchListener {
public static ChangeQuickRedirect changeQuickRedirect;
public a() {
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{view, motionEvent}, this, changeQuickRedirect, false, 676, new Class[]{View.class, MotionEvent.class}, Boolean.TYPE);
if (proxy.isSupported) {
return ((Boolean) proxy.result).booleanValue();
}
OPActivity.this.finish();
return false;
}
}
public final boolean a(String str) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 671, new Class[]{String.class}, Boolean.TYPE);
if (proxy.isSupported) {
return ((Boolean) proxy.result).booleanValue();
}
d.a("from call method: " + str, new Object[0]);
boolean isScreenOn = ((PowerManager) getSystemService("power")).isScreenOn();
d.f("isScreenOn: " + isScreenOn);
if (isScreenOn) {
finish();
}
Intent intent = new Intent("ONEPIXEL_ACTION_LOG");
intent.putExtra("funId", "1px_" + str);
intent.putExtra("screen", isScreenOn);
sendBroadcast(intent);
return isScreenOn;
}
@Override
public void onCreate(Bundle bundle) {
if (PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 670, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
return;
}
super.onCreate(bundle);
Window window = getWindow();
window.setGravity(51);
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.x = 0;
attributes.y = 0;
attributes.height = 1;
attributes.width = 1;
window.setAttributes(attributes);
window.addFlags(8);
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
public static ChangeQuickRedirect changeQuickRedirect;
@Override
public void onReceive(Context context, Intent intent) {
if (PatchProxy.proxy(new Object[]{context, intent}, this, changeQuickRedirect, false, 675, new Class[]{Context.class, Intent.class}, Void.TYPE).isSupported) {
return;
}
d.a("OPActivity finish", new Object[0]);
OPActivity.this.finish();
}
};
this.a = broadcastReceiver;
registerReceiver(broadcastReceiver, new IntentFilter("ONEPIXEL_ACTION_FINISH_ACTIVITY"));
a("onCreate");
View decorView = window.getDecorView();
if (decorView != null) {
decorView = decorView.getRootView();
}
if (decorView != null) {
decorView.setOnTouchListener(new a());
}
}
@Override
public void onDestroy() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 672, new Class[0], Void.TYPE).isSupported) {
return;
}
d.f("onDestroy");
try {
unregisterReceiver(this.a);
} catch (IllegalArgumentException e) {
d.d("receiver is not resisted: " + e);
}
super.onDestroy();
}
@Override
public void onPause() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 674, new Class[0], Void.TYPE).isSupported) {
return;
}
overridePendingTransition(0, 0);
super.onPause();
}
@Override
public void onResume() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 673, new Class[0], Void.TYPE).isSupported) {
return;
}
super.onResume();
a("onResume");
}
}