AndroidCellularSignalStrength.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:chromium-net-for-android 作者:
/**
 * @return Signal strength (in dbM) for the currently registered cellular network. Returns
 * {@link CellularSignalStrengthError#ERROR_NOT_SUPPORTED} if the signal strength is
 * unavailable or if there are multiple cellular radios on the device.
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@CalledByNative
public static int getSignalStrengthDbm(Context context) {
    List<CellInfo> cellInfos = getRegisteredCellInfo(context);
    return cellInfos == null || cellInfos.size() != 1
            ? CellularSignalStrengthError.ERROR_NOT_SUPPORTED
            : getSignalStrengthDbm(cellInfos.get(0));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号