当前位置:编程学习 > wap >>

请问2.3新增的CNE模块是做什么用的?

1. 在ConnectivityService.java同级目录下多了一个CNE.java;
2. 在ConnectivityService初始化时,也初始化了Cne
3. 在log中大量看到Cne的信息.
4. 在ConnectivityService的处理中,多出用到了Cne相关的条件判断。

请问有大牛知道,2.3新增的CNE是个什么功能模块吗?

能给详细的解释解释吗?

十分感谢!
--------------------编程问答-------------------- 顶下
求解释 --------------------编程问答-------------------- 我下的2.3的源码,没找到cne.java...可能是版本低了点... --------------------编程问答-------------------- 你用的是Qualcomm的平台吧,这是Qualcomm加的东西,不是google的;
CNE = Connectivity Engine
--------------------编程问答-------------------- 学习了~~ --------------------编程问答-------------------- 也顶下,在网上也没找到相关的资料。你这个是什么平台的啊! --------------------编程问答-------------------- public final class CNE {
    static final String LOG_TAG = "CNE";         // global logcat tag
    static final String LOCAL_TAG = "CNE_DEBUG"; // local logcat tag
    private static final boolean DBG = false;    // enable local logging?

    // ***** Instance Variables
    LocalSocket mSocket;
    HandlerThread mSenderThread;
    CNESender mSender;
    Thread mReceiverThread;
    CNEReceiver mReceiver;
    private Context mContext;
    int mRequestMessagesPending;

    ArrayList<CNERequest> mRequestsList = new ArrayList<CNERequest>();

    /* to do move all the constants to one file */
    // ***** Events

    static final int EVENT_SEND = 1;

    // ***** Constants

    /* CNE feature flag */
    static final String UseCne = "persist.cne.UseCne";
    static boolean isCndUp = false;
    // match with constant in CNE.cpp
    static final int CNE_MAX_COMMAND_BYTES = (8 * 1024);
    static final int RESPONSE_SOLICITED = 0;
    static final int RESPONSE_UNSOLICITED = 1;

    static final String SOCKET_NAME_CNE = "cnd";

    static final int SOCKET_OPEN_RETRY_MILLIS = 4 * 1000;

    /* Different requests types - corresponding to cnd_commands.h */
    static final int CNE_REQUEST_INIT = 1;
    static final int CNE_REQUEST_REG_ROLE = 2;
    static final int CNE_REQUEST_GET_COMPATIBLE_NWS = 3;
    static final int CNE_REQUEST_CONF_NW = 4;
    static final int CNE_REQUEST_DEREG_ROLE = 5;
    static final int CNE_REQUEST_REG_NOTIFICATIONS = 6;
    static final int CNE_REQUEST_UPDATE_BATTERY_INFO = 7;
    static final int CNE_REQUEST_UPDATE_WLAN_INFO = 8;
    static final int CNE_REQUEST_UPDATE_WWAN_INFO = 9;
    static final int CNE_NOTIFY_RAT_CONNECT_STATUS = 10;
    static final int CNE_NOTIFY_DEFAULT_NW_PREF = 11;
    static final int CNE_REQUEST_UPDATE_WLAN_SCAN_RESULTS = 12;
    static final int CNE_NOTIFY_SENSOR_EVENT_CMD = 13;
    static final int CNE_REQUEST_CONFIG_IPROUTE2_CMD = 14;
    static final int CNE_NOTIFY_TIMER_EXPIRED_CMD = 15;
    static final int CNE_REQUEST_START_FMC_CMD = 16;
    static final int CNE_REQUEST_STOP_FMC_CMD = 17;

    /* UNSOL Responses - corresponding to cnd_unsol_messages.h */
    static final int CNE_RESPONSE_REG_ROLE = 1;
    static final int CNE_RESPONSE_GET_BEST_NW = 2;
    static final int CNE_RESPONSE_CONFIRM_NW = 3;
    static final int CNE_RESPONSE_DEREG_ROLE = 4;
    /* UNSOL Events */
    static final int CNE_REQUEST_BRING_RAT_DOWN = 5;
    static final int CNE_REQUEST_BRING_RAT_UP = 6;
    static final int CNE_NOTIFY_MORE_PREFERED_RAT_AVAIL = 7;
    static final int CNE_NOTIFY_RAT_LOST = 8;
    static final int CNE_REQUEST_START_SCAN_WLAN = 9;
    static final int CNE_NOTIFY_INFLIGHT_STATUS = 10;
    static final int CNE_NOTIFY_FMC_STATUS = 11;
    static final int CNE_NOTIFY_HOST_ROUTING_IP = 12;

    /* RAT type - corresponding to CneRatType */
    static final int CNE_RAT_MIN = 0;
    static final int CNE_RAT_WWAN = CNE_RAT_MIN;
    static final int CNE_RAT_WLAN = 1;
    static final int CNE_RAT_ANY = 2;
    static final int CNE_RAT_NONE = 3;
    static final int CNE_RAT_MAX = 4;
    static final int CNE_RAT_INVALID = CNE_RAT_MAX;

    /* different status codes */
    public static final int STATUS_FAILURE = 0;
    public static final int STATUS_SUCCESS = 1;

    public static final int STATUS_NOT_INFLIGHT = 0;
    public static final int STATUS_INFLIGHT = 1;

    private static NetworkInfo.State ipv6NetState = NetworkInfo.State.DISCONNECTED;

    static final int CNE_REGID_INVALID = -1;
    static final int CNE_ROLE_INVALID = -1;
    static final int CNE_DEFAULT_CON_REGID = 0;
    static final int CNE_INVALID_PID = -1;

    static final int CNE_LINK_SATISFIED = 1;
    static final int CNE_LINK_NOT_SATISFIED = 0;

    static final int CNE_MASK_ON_LINK_AVAIL_SENT = 0x0001;
    static final int CNE_MASK_ON_BETTER_LINK_AVAIL_SENT = 0x0002;

    static final int CNE_NET_SUBTYPE_WLAN_B = 20;
    static final int CNE_NET_SUBTYPE_WLAN_G = 21;

    private static int mRoleRegId = 0;
    private BatteryService mBatteryService;
    private WifiManager mWifiManager;
    private TelephonyManager mTelephonyManager;
    private ConnectivityService mService;
    private int mNetworkPreference;
    private int mDefaultNetwork = ConnectivityManager.MAX_NETWORK_TYPE; --------------------编程问答--------------------
引用 6 楼 zxiaoqiangg 的回复:
public final class CNE {
    static final String LOG_TAG = "CNE";         // global logcat tag
    static final String LOCAL_TAG = "CNE_DEBUG"; // local logcat tag
    private static final boolean……

我在android代码里也看到了这个类。原来是高通的啊。
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,