public interface INetworkDevice extends IAdvanceDevice
Modifier and Type | Method and Description |
---|---|
IApnDevice |
getApnManager()
get The Apn manager
|
IEthernetDevice |
getEthernetManager()
get The Ethernet manager
|
int |
getPreferredNetworkType(int phoneId)
Get the preferred network type.
|
NetworkType[] |
getSupportedNetworkTypes()
get supported network type array
NetworkMode: name, modeId;
|
IWifiDevice |
getWifiManager()
get The wifi manager
|
boolean |
setMobileDataEnabled(int slot,
boolean enable)
Added by Stone for task #22857 to add a interface to enable/disable mobile data.
|
boolean |
setMobileDataRoamingEnabled(int slot,
int roaming)
enable/disable mobile data roaming.
|
boolean |
setPreferredNetworkType(int subId,
int networkType)
Set the preferred network type.
|
close, isOpened, open
IApnDevice getApnManager() throws DeviceException
DeviceException
IApnDevice
IEthernetDevice getEthernetManager() throws DeviceException
DeviceException
IEthernetDevice
int getPreferredNetworkType(int phoneId) throws DeviceException
Requires Permission:
MODIFY_PHONE_STATE
Or the calling app has carrier privileges. @see #hasCarrierPrivileges
DeviceException
NetworkType[] getSupportedNetworkTypes() throws DeviceException
DeviceException
IWifiDevice getWifiManager() throws DeviceException
DeviceException
IWifiDevice
boolean setMobileDataEnabled(int slot, boolean enable) throws DeviceException
enable
- true if it should be enabled, false if it should be disabled.DeviceException
boolean setMobileDataRoamingEnabled(int slot, int roaming) throws DeviceException
roaming
- 1 if it should be enabled, 0 if it should be disabled.DeviceException
boolean setPreferredNetworkType(int subId, int networkType) throws DeviceException
Requires Permission:
MODIFY_PHONE_STATE
Or the calling app has carrier privileges. @see #hasCarrierPrivileges
subId
- the id of the subscription to set the preferred network type for.networkType
- the preferred network type, defined in RILConstants.java.DeviceException