导航菜单

页面标题

页面副标题

Fix Locker v1.5 - PhoneStatReceiver.java 源代码

正在查看: Fix Locker v1.5 应用的 PhoneStatReceiver.java JAVA 源代码文件

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


package com.user.a4keygen.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
import android.util.Log;

public class PhoneStatReceiver extends BroadcastReceiver {
    private static final String TAG = "PhoneStatReceiver";
    private static boolean incomingFlag = false;
    private static String incoming_number;

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("android.intent.action.NEW_OUTGOING_CALL")) {
            incomingFlag = false;
            Log.i(TAG, "call OUT:" + intent.getStringExtra("android.intent.extra.PHONE_NUMBER"));
            return;
        }
        int callState = ((TelephonyManager) context.getSystemService("phone")).getCallState();
        if (callState == 0) {
            if (incomingFlag) {
                Log.i(TAG, "incoming IDLE");
            }
        } else if (callState == 1) {
            incomingFlag = true;
            incoming_number = intent.getStringExtra("incoming_number");
            Log.i(TAG, "RINGING :" + incoming_number);
        } else if (callState == 2 && incomingFlag) {
            Log.i(TAG, "incoming ACCEPT :" + incoming_number);
        }
    }
}