AppVersionFetcher
public final class AppVersionFetcher
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.AppVersionFetcher |
用於從設備獲取應用程序版本字符串的實用程序類。
向設備發送dumpsys package命令,然後解析返回結果字符串。
概括
公共構造函數 | |
---|---|
AppVersionFetcher () |
公共方法 | |
---|---|
static String | fetch ( ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info) 根據包名稱獲取應用程序版本字符串。 |
公共構造函數
AppVersionFetcher
public AppVersionFetcher ()
公共方法
拿來
public static String fetch (ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info)
根據包名稱獲取應用程序版本字符串。
參數 | |
---|---|
device | ITestDevice : ITestDevice, 設備實例 |
packageName | String : 字符串,包名 |
info | AppVersionFetcher.AppVersionInfo : AppVersionInfo,應用版本信息類型 |
退貨 | |
---|---|
String | 包的版本字符串 |
投擲 | |
---|---|
DeviceNotAvailableException |