package com.secspace.lib.common.utils;

import android.content.Context;
import android.telecom.TelecomManager;

/**
 * Created by cyw_m on 2018/4/28.
 */

public class PhoneUtil {
    /**
     * 8.0有时无效,一直返回true
     * 锁屏后需在非通话情况下弹出密码界面
     *
     * @return
     */
    public static boolean isInCall(Context context) {
        TelecomManager tm = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
        return tm.isInCall();
    }
}
