导航菜单

页面标题

页面副标题

CallApp v2.226 - CallAppCallScreeningService.java 源代码

正在查看: CallApp v2.226 应用的 CallAppCallScreeningService.java JAVA 源代码文件

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


package com.callapp.contacts.inCallService;

import android.os.Build;
import android.telecom.Call;
import android.telecom.CallScreeningService;
import android.util.Pair;
import com.callapp.contacts.Init;
import com.callapp.contacts.activity.analytics.data.AnalyticsDataManager;
import com.callapp.contacts.manager.BlockManager;
import com.callapp.contacts.manager.phone.PhoneManager;
import com.callapp.contacts.manager.phone.PhoneStateManager;
import com.callapp.contacts.model.call.CallData;
import com.callapp.contacts.model.call.CallState;
import com.callapp.contacts.util.CLog;
import com.callapp.framework.phone.Phone;
import com.callapp.framework.util.StringUtils;

public class CallAppCallScreeningService extends CallScreeningService {
    @Override
    public final void onCreate() {
        Init.e(null);
        super.onCreate();
    }

    @Override
    public final void onScreenCall(Call.Details details) {
        if (Build.VERSION.SDK_INT < 29) {
            respondToCall(details, new CallScreeningService.CallResponse.Builder().build());
            return;
        }
        Phone e = PhoneManager.get().e(details.getHandle() != null ? details.getHandle().getSchemeSpecificPart() : "");
        e.toString();
        StringUtils.I(CallAppCallScreeningService.class);
        CLog.a();
        Pair e2 = BlockManager.e(e);
        if (!((Boolean) e2.first).booleanValue()) {
            PhoneStateManager.get().addToCallScreeningServiceHandleList(details, e, ((Boolean) e2.first).booleanValue());
        } else {
            if (PhoneStateManager.get().handleBlockedCall(e, true)) {
                CallScreeningService.CallResponse.Builder builder = new CallScreeningService.CallResponse.Builder();
                builder.setRejectCall(true);
                builder.setDisallowCall(true);
                builder.setSkipNotification(true);
                respondToCall(details, builder.build());
                CallData callData = new CallData(e, CallState.DISCONNECTED, Boolean.TRUE);
                callData.setBlocked(true);
                AnalyticsDataManager.e(callData, System.currentTimeMillis());
                return;
            }
            PhoneStateManager.get().addToCallScreeningServiceHandleList(details, e, ((Boolean) e2.first).booleanValue());
        }
        respondToCall(details, new CallScreeningService.CallResponse.Builder().build());
    }
}