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……
[/Quote]
我在android代码里也看到了这个类。原来是高通的啊。
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?
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;
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;