TombstoneUtils

public class TombstoneUtils
extends Object

java.lang.Object
   ↳ com.android.sts.common.util.TombstoneUtils


包含當機剖析的輔助函式和共用常數。

摘要

巢狀類別

class TombstoneUtils.Config

 

class TombstoneUtils.Signals

 

公用建構函式

TombstoneUtils()

公用方法

static void assertNoSecurityCrashes(List<TombstoneProtos.Tombstone> tombstones, TombstoneUtils.Config config)
static Optional<TombstoneProtos.Thread> getMainThread(TombstoneProtos.Tombstone tombstone)
static Optional<String> getProcessFilename(TombstoneProtos.Tombstone tombstone)

傳回程序的檔案名稱。

static List<TombstoneProtos.Tombstone> getSecurityCrashes(List<TombstoneProtos.Tombstone> tombstones, TombstoneUtils.Config config)
static boolean isSecurityCrash(TombstoneProtos.Tombstone tombstone, TombstoneUtils.Config config)

判斷 Tombstone 是否可能與特定設定相關。

static AutoCloseable withAssertNoSecurityCrashes(ITestDevice device, TombstoneUtils.Config config)

公用建構函式

TombstoneUtils

public TombstoneUtils ()

公用方法

assertNoSecurityCrashes

public static void assertNoSecurityCrashes (List<TombstoneProtos.Tombstone> tombstones, 
                TombstoneUtils.Config config)

參數
tombstones List

config TombstoneUtils.Config

getMainThread

public static Optional<TombstoneProtos.Thread> getMainThread (TombstoneProtos.Tombstone tombstone)

參數
tombstone TombstoneProtos.Tombstone

傳回
Optional<TombstoneProtos.Thread>

getProcessFilename

public static Optional<String> getProcessFilename (TombstoneProtos.Tombstone tombstone)

傳回程序的檔案名稱,例如「/system/bin/mediaserver」會傳回「mediaserver」

參數
tombstone TombstoneProtos.Tombstone

傳回
Optional<String>

getSecurityCrashes

public static List<TombstoneProtos.Tombstone> getSecurityCrashes (List<TombstoneProtos.Tombstone> tombstones, 
                TombstoneUtils.Config config)

參數
tombstones List:要檢查的墓碑清單

config TombstoneUtils.Config:車禍偵測設定物件

傳回
List<TombstoneProtos.Tombstone> 安全性相關的墓碑清單

isSecurityCrash

public static boolean isSecurityCrash (TombstoneProtos.Tombstone tombstone, 
                TombstoneUtils.Config config)

判斷 tombstone 是否可能與指定設定相關。

參數
tombstone TombstoneProtos.Tombstone:要檢查的空值標記

config TombstoneUtils.Config:車禍偵測設定物件

傳回
boolean 如果墓碑是與安全性相關

withAssertNoSecurityCrashes

public static AutoCloseable withAssertNoSecurityCrashes (ITestDevice device, 
                TombstoneUtils.Config config)

參數
device ITestDevice

config TombstoneUtils.Config

傳回
AutoCloseable

擲回
DeviceNotAvailableException