AndroidCellularSignalStrength.java 文件源码

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

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


问题


面经


文章

微信
公众号

扫码关注公众号