墓碑工具
public class TombstoneUtils
extends Object
java.lang.Object |
↳ | com.android.sts.common.util.TombstoneUtils |
包含用於崩潰解析的輔助函數和共享常量。
概括
嵌套類 |
---|
class | TombstoneUtils.Config |
class | TombstoneUtils.Signals |
公共構造函數
墓碑工具
public TombstoneUtils ()
公共方法
assertNoSecurityCrashes
public static void assertNoSecurityCrashes (List<TombstoneProtos.Tombstone> tombstones,
TombstoneUtils.Config config)
參數 |
---|
tombstones | List |
config | TombstoneUtils.Config |
獲取主線程
public static Optional<TombstoneProtos.Thread> getMainThread (TombstoneProtos.Tombstone tombstone)
參數 |
---|
tombstone | TombstoneProtos.Tombstone |
退貨 |
---|
Optional<TombstoneProtos.Thread> | |
獲取進程文件名
public static Optional<String> getProcessFilename (TombstoneProtos.Tombstone tombstone)
返回進程的文件名。例如“/system/bin/mediaserver”返回“mediaserver”
參數 |
---|
tombstone | TombstoneProtos.Tombstone |
獲取安全崩潰
public static List<TombstoneProtos.Tombstone> getSecurityCrashes (List<TombstoneProtos.Tombstone> tombstones,
TombstoneUtils.Config config)
參數 |
---|
tombstones | List :要檢查的墓碑列表 |
config | TombstoneUtils.Config :崩潰檢測配置對象 |
退貨 |
---|
List<TombstoneProtos.Tombstone> | 與安全相關的邏輯刪除列表 |
是安全崩潰
public static boolean isSecurityCrash (TombstoneProtos.Tombstone tombstone,
TombstoneUtils.Config config)
根據給定的配置確定邏輯刪除是否可能與安全相關。
參數 |
---|
tombstone | TombstoneProtos.Tombstone :要檢查的墓碑 |
config | TombstoneUtils.Config :崩潰檢測配置對象 |
withAssertNoSecurityCrashes
public static AutoCloseable withAssertNoSecurityCrashes (ITestDevice device,
TombstoneUtils.Config config)
參數 |
---|
device | ITestDevice |
config | TombstoneUtils.Config |
投擲 |
---|
DeviceNotAvailableException | |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2022-11-18 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]