TombstoneUtils

public class TombstoneUtils
extends Object

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


Enthält Hilfsfunktionen und gemeinsame Konstanten für das Parsen von Abstürzen.

Zusammenfassung

Verschachtelte Klassen

class TombstoneUtils.Config

 

class TombstoneUtils.Signals

 

Öffentliche Konstruktoren

TombstoneUtils()

Öffentliche Methoden

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)

gibt den Dateinamen des Prozesses zurück.

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

Bestimmt, ob ein Tombstone wahrscheinlich sicherheitsrelevant für die angegebene Konfiguration ist.

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

Öffentliche Konstruktoren

TombstoneUtils

public TombstoneUtils ()

Öffentliche Methoden

assertNoSecurityCrashes

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

Parameter
tombstones List

config TombstoneUtils.Config

getMainThread

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

Parameter
tombstone TombstoneProtos.Tombstone

Returns
Optional<TombstoneProtos.Thread>

getProcessFilename

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

Gibt den Dateinamen des Prozesses zurück. Beispiel: „/system/bin/mediaserver“ gibt „mediaserver“ zurück.

Parameter
tombstone TombstoneProtos.Tombstone

Returns
Optional<String>

getSecurityCrashes

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

Parameter
tombstones List: Liste der zu prüfenden Tombstones

config TombstoneUtils.Config: Konfigurationsobjekt für die Unfallerkennung

Returns
List<TombstoneProtos.Tombstone> eine Liste von Sicherheits-Tombstones

isSecurityCrash

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

Bestimmt, ob ein Tombstone wahrscheinlich sicherheitsrelevant für die angegebene Konfiguration ist.

Parameter
tombstone TombstoneProtos.Tombstone: der zu prüfende Tombstone

config TombstoneUtils.Config: Konfigurationsobjekt für die Unfallerkennung

Returns
boolean ob der Tombstone sicherheitsrelevant ist

withAssertNoSecurityCrashes

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

Parameter
device ITestDevice

config TombstoneUtils.Config

Returns
AutoCloseable

Ausgabe
DeviceNotAvailableException