导航菜单

页面标题

页面副标题

北京退费客服端 v1.0.0 - ScreenReceiver.java 源代码

正在查看: 北京退费客服端 v1.0.0 应用的 ScreenReceiver.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package im.amwhusedvt.keepalive;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import im.amwhusedvt.messenger.ApplicationLoader;
import im.amwhusedvt.messenger.FileLog;

public class ScreenReceiver extends BroadcastReceiver {
    private CheckTopTask mCheckTopTask;
    private Handler mHandler;

    public ScreenReceiver() {
        if ((26 + 18) % 18 <= 0) {
        }
        this.mHandler = new Handler(Looper.getMainLooper());
        this.mCheckTopTask = new CheckTopTask(ApplicationLoader.applicationContext);
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if ((8 + 6) % 6 <= 0) {
        }
        String action = intent.getAction();
        try {
            if ("android.intent.action.SCREEN_OFF".equals(action)) {
                CheckTopTask.startForeground(context);
                if (this.mHandler != null) {
                    this.mHandler.postDelayed(this.mCheckTopTask, 3000L);
                    return;
                }
                return;
            }
            if ("android.intent.action.USER_PRESENT".equals(action) || "android.intent.action.SCREEN_ON".equals(action)) {
                OnePxActivity onePxActivity = OnePxActivity.instance != null ? OnePxActivity.instance.get() : null;
                if (onePxActivity != null) {
                    onePxActivity.finishSelf();
                }
                if (this.mHandler != null) {
                    this.mHandler.removeCallbacks(this.mCheckTopTask);
                }
            }
        } catch (Throwable e) {
            FileLog.e("ScreenReceiver onReceive error:" + e.toString());
        }
    }
}