public interface ISystemDevice extends IAdvanceDevice
Modifier and Type | Method and Description |
---|---|
String |
getAccessibilityService()
Get the current Accessibility Service.
|
IAdminDevice |
getAdminManager()
get the Admin manager
|
IBatteryDevice |
getBatteryManager()
get the Battery manager
|
IBluetoothDevice |
getBluetoothManager()
get the Bluetooth manager
|
IHomeDevice |
getHomeManager()
get the home manager
|
ILocationDevice |
getLocationManager()
get the location manager object to retrieve latitude and longitude information and to set the location level and location SDK.
|
boolean |
getMtpStatus()
Get MTP Status
|
INetworkDevice |
getNetworkManager()
get the manager for network devices
(including Ethernet management, WiFi management, and APN management).
|
String |
getRebootTimeByEveryDay() |
boolean |
getShowTouchesState()
get ‘show touches’ state for enable or disable.
|
boolean |
getStatusbarSettingsButtonVisibility()
get statusbar settings button status.
|
String |
getTouchScreenWakeupValue() |
IUpdateAppDevice |
getUpdateAppManager()
get the UpdateApp manager
|
boolean |
isEnableAutoTime()
get status for enable/disable auto time item.
|
boolean |
isEnableAutoTimeGUI()
get status for enable/disable auto time item GUI.
|
boolean |
isEnableAutoTimezone()
get status for enable/disable auto timezone item.
|
boolean |
isEnableAutoTimezoneGUI()
get status for enable/disable auto timezone item GUI.
|
boolean |
isEnableBluetooth()
Get the current Bluetooth status (enabled or disabled).
|
boolean |
isEnableCamera()
Get the current Camera status (enabled or disabled).
|
boolean |
isEnableUsb()
Get the current Camera status (enabled or disabled).
|
boolean |
isEnableWifi()
Get the current Wi-Fi status (enabled or disabled).
|
boolean |
isPowerKeyBlocked()
check PowerKey Button 's block status.
|
boolean |
isTerminalRooted()
Is the current terminal rooted.
|
boolean |
reboot()
reboot terminal
|
boolean |
setAccessibilityService(boolean enable,
String packageName,
String className)
set the Accessibility Service .
|
void |
setAirplaneMode(boolean enable)
enable/disable Airplane Mode
|
void |
setAutoTime(boolean enable)
enable/disable auto time item.
|
void |
setAutoTimeGUI(boolean enable)
enable/disable show auto time item GUI.
|
void |
setAutoTimezone(boolean enable)
enable/disable auto timezone item.
|
void |
setAutoTimezoneGUI(boolean enable)
enable/disable show auto timezone item GUI.
|
boolean |
setBluetooth(boolean enable)
Enable or Disable the bluetooth device
|
boolean |
setCamera(boolean enable)
Enable or Disable the USB device
|
boolean |
setCustomAttribute(String key,
String value)
Set "persist.wp.usr.${key}"'s property , max count = 10.
|
boolean |
setDeviceOwner(String pkg,
String deviceCls) |
boolean |
setLanguage(String language,
String country,
String variant)
set Language
|
void |
setMtp(boolean enable)
Enable/Disable MTP
|
void |
setPasswordLock(boolean enable,
String password)
Sets a password to unlock the device.
|
void |
setPatternLock(boolean enable,
String pattern)
Sets a pattern to unlock the device.
|
void |
setPinLock(boolean enable,
String pin)
Sets a numeric PIN to unlock the device.
|
void |
setPowerKeyBlocked(boolean enable)
Block or Release The Power Key
|
boolean |
setRebootTimeByEveryDay(int hour,
int minute,
int second) |
boolean |
setRestrictBackground(boolean enable)
enable/disable Data Saver Mode。
|
boolean |
setScreenOffTimeout(int milliseconds)
Added by Stone for task #22834 to add a interface to set screen off timeout.
|
void |
setShowTouches(boolean enable)
Enabling ‘show touches’ in Android screen recordings for user research.
|
void |
setStatusBarLocked(boolean lock)
Set the status bar locked as true will make the status bar can not be pull down.
|
void |
setStatusbarSettingsButtonVisibility(boolean visibility)
visibility/hide statusbar settings button
|
boolean |
setTouchScreenWakeupValue(String touch) |
boolean |
setUnknownSources(String packageName,
boolean enable)
Enable packageName the permission to install apps from unknown sources.
|
boolean |
setUsb(boolean enable)
Enable or Disable the USB device
|
boolean |
setWifi(boolean enable)
Enable or Disable the Wi-Fi device
|
boolean |
shutdown(boolean confirm,
String reason,
boolean wait)
Turn off the device.
|
close, isOpened, open
String getAccessibilityService() throws DeviceException
DeviceException
IAdminDevice getAdminManager() throws DeviceException
DeviceException
IAdminDevice
IBatteryDevice getBatteryManager() throws DeviceException
DeviceException
IBatteryDevice
IBluetoothDevice getBluetoothManager() throws DeviceException
DeviceException
IBluetoothDevice
IHomeDevice getHomeManager() throws DeviceException
DeviceException
IHomeDevice
ILocationDevice getLocationManager() throws DeviceException
DeviceException
ILocationDevice
boolean getMtpStatus() throws DeviceException
DeviceException
INetworkDevice getNetworkManager() throws DeviceException
DeviceException
INetworkDevice
String getRebootTimeByEveryDay() throws DeviceException
DeviceException
boolean getShowTouchesState() throws DeviceException
DeviceException
boolean getStatusbarSettingsButtonVisibility() throws DeviceException
DeviceException
String getTouchScreenWakeupValue() throws DeviceException
DeviceException
IUpdateAppDevice getUpdateAppManager() throws DeviceException
DeviceException
IUpdateAppDevice
boolean isEnableAutoTime() throws DeviceException
DeviceException
boolean isEnableAutoTimeGUI() throws DeviceException
DeviceException
boolean isEnableAutoTimezone() throws DeviceException
DeviceException
boolean isEnableAutoTimezoneGUI() throws DeviceException
DeviceException
boolean isEnableBluetooth() throws DeviceException
DeviceException
boolean isEnableCamera() throws DeviceException
DeviceException
boolean isEnableUsb() throws DeviceException
DeviceException
boolean isEnableWifi() throws DeviceException
DeviceException
boolean isPowerKeyBlocked() throws DeviceException
DeviceException
boolean isTerminalRooted() throws DeviceException
DeviceException
boolean reboot() throws DeviceException
DeviceException
boolean setAccessibilityService(boolean enable, String packageName, String className) throws DeviceException
enable
- : true = enable; false = disableDeviceException
void setAirplaneMode(boolean enable) throws DeviceException
enable
- : true: alirplane mode on ; false: alirplane mode off.DeviceException
void setAutoTime(boolean enable) throws DeviceException
enable
- true: enable; false: disableDeviceException
void setAutoTimeGUI(boolean enable) throws DeviceException
enable
- true: enable; false: disableDeviceException
void setAutoTimezone(boolean enable) throws DeviceException
enable
- true: enable; false: disableDeviceException
void setAutoTimezoneGUI(boolean enable) throws DeviceException
enable
- true: enable; false: disableDeviceException
boolean setBluetooth(boolean enable) throws DeviceException
enable
- a boolean indicating whether to enable or disable the bluetooth device.DeviceException
boolean setCamera(boolean enable) throws DeviceException
enable
- a boolean indicating whether to enable or disable the USB device.DeviceException
boolean setCustomAttribute(String key, String value) throws DeviceException
key:
- property's key, length less than 16. for example: persist.wp.usr.${key} ${value}.value:
- property's value, length less than 32.DeviceException
boolean setDeviceOwner(String pkg, String deviceCls) throws DeviceException
pkg:
- package name.deviceCls:
- policyReceiver's class name.DeviceException
boolean setLanguage(String language, String country, String variant) throws DeviceException
language:
- (Null is not allowed)An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length. See the Locale class description about valid language values.country
- : (Null is allowed)An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code. See the Locale class description about valid country values.variant
- : (Null is allowed)Any arbitrary value used to indicate a variation of a Locale. See the Locale class description for the details.
for example: Locale(String language, String country, String variant) or Locale(String language, String country) or Locale(String language)
DeviceException
void setMtp(boolean enable) throws DeviceException
enable:
- true:Enable MTP ; false:Disable MTP;DeviceException
void setPasswordLock(boolean enable, String password) throws DeviceException
password
- the password to set, must be at least 4 characters and may contain letters and numbers.DeviceException
void setPatternLock(boolean enable, String pattern) throws DeviceException
1 2 3 4 5 6 7 8 9
Each point in the pattern must be unique and cannot be repeated.
Example: To set an L-shaped pattern, use the array: {1, 4, 7, 8, 9}.
pattern
- an array of integers representing the pattern, with each element being a number between 1 and 9.DeviceException
void setPinLock(boolean enable, String pin) throws DeviceException
pin
- the PIN to set, must be at least 4 digits (numeric only).DeviceException
void setPowerKeyBlocked(boolean enable) throws DeviceException
enable:
- true:Block The Power Key ; false:Release The Power Key ;DeviceException
boolean setRebootTimeByEveryDay(int hour, int minute, int second) throws DeviceException
hour
- [0,23], minute [0,59], second [0,59]DeviceException
boolean setRestrictBackground(boolean enable) throws DeviceException
enable:
- true: enable Data Saver Mode,false: diable Data Saver Mode.DeviceException
boolean setScreenOffTimeout(int milliseconds) throws DeviceException
milliseconds
- the time you want to set, can be one of following:
15000 - 15s
30000 - 30s
60000 - 1 minute
120000 - 2 minutes
300000 - 5 minutes
600000 - 10 minutes
1800000 - 30 minutes
2147483647(Integer.MAX_VALUE) - neverDeviceException
void setShowTouches(boolean enable) throws DeviceException
enable:
- true, false;DeviceException
void setStatusBarLocked(boolean lock) throws DeviceException
lock,
- true for lock, false for disable lock.DeviceException
void setStatusbarSettingsButtonVisibility(boolean visibility) throws DeviceException
visibility
- : true: statusbar settings button show ; false: statusbar settings button hide.DeviceException
boolean setTouchScreenWakeupValue(String touch) throws DeviceException
touch:Add
- wake on touch;none: Only the power button wakes upDeviceException
boolean setUnknownSources(String packageName, boolean enable) throws DeviceException
DeviceException
boolean setUsb(boolean enable) throws DeviceException
enable
- a boolean indicating whether to enable or disable the USB device.DeviceException
boolean setWifi(boolean enable) throws DeviceException
enable
- a boolean indicating whether to enable or disable the Wi-Fi device.DeviceException
boolean shutdown(boolean confirm, String reason, boolean wait) throws DeviceException
confirm
- If true, shows a shutdown confirmation dialog.reason
- code to pass to android_reboot() (e.g. "userrequested"), or null.wait
- If true, this call waits for the shutdown to complete and does not return.DeviceException