TombstoneUtils

public class TombstoneUtils
extends Object

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


Contient des fonctions d'assistance et des constantes partagées pour l'analyse des plantages.

Résumé

Classes imbriquées

class TombstoneUtils.Config

 

class TombstoneUtils.Signals

 

Constructeurs publics

TombstoneUtils()

Méthodes publiques

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)

renvoie le nom de fichier du processus.

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

Détermine si une pierre tombale est susceptible d'être liée à la sécurité par rapport à la configuration donnée.

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

Constructeurs publics

TombstoneUtils

public TombstoneUtils ()

Méthodes publiques

assertNoSecurityCrashes

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

Paramètres
tombstones List

config TombstoneUtils.Config

getMainThread

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

Paramètres
tombstone TombstoneProtos.Tombstone

Renvoie
Optional<TombstoneProtos.Thread>

getProcessFilename

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

Renvoie le nom de fichier du processus. Par exemple, "/system/bin/mediaserver" renvoie "mediaserver".

Paramètres
tombstone TombstoneProtos.Tombstone

Renvoie
Optional<String>

getSecurityCrashes

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

Paramètres
tombstones List: liste des pierres tombales à vérifier

config TombstoneUtils.Config: objet de configuration de la détection de plantage

Renvoie
List<TombstoneProtos.Tombstone> une liste de tombstones liées à la sécurité ;

isSecurityCrash

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

Détermine si une pierre tombale est susceptible d'être liée à la sécurité par rapport à la configuration donnée.

Paramètres
tombstone TombstoneProtos.Tombstone: la pierre tombale à vérifier

config TombstoneUtils.Config: objet de configuration de la détection de plantage

Renvoie
boolean si la pierre tombale est liée à la sécurité

withAssertNoSecurityCrashes

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

Paramètres
device ITestDevice

config TombstoneUtils.Config

Renvoie
AutoCloseable

Génère
DeviceNotAvailableException