TombstoneUtils

public class TombstoneUtils
extends Object

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


Enthält Hilfsfunktionen und gemeinsam genutzte Konstanten für die Absturzanalyse.

Zusammenfassung

Verschachtelte Klassen

class TombstoneUtils.Config

class TombstoneUtils.Signals

Öffentliche Konstrukteure

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 Konstrukteure

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

Kehrt zurück
Optional<TombstoneProtos.Thread>

getProcessFilename

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

gibt den Dateinamen des Prozesses zurück. zB "/system/bin/mediaserver" gibt "mediaserver" zurück

Parameter
tombstone TombstoneProtos.Tombstone

Kehrt zurück
Optional<String>

getSecurityCrashes

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

Parameter
tombstones List : Eine Liste der zu überprüfenden Tombstones

config TombstoneUtils.Config : Konfigurationsobjekt für die Absturzerkennung

Kehrt zurück
List<TombstoneProtos.Tombstone> eine Liste von Tombstones, die sicherheitsrelevant sind

ist SecurityCrash

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 überprüfende Tombstone

config TombstoneUtils.Config : Konfigurationsobjekt für die Absturzerkennung

Kehrt zurück
boolean wenn der Tombstone sicherheitsrelevant ist

withAssertNoSecurityCrashes

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

Parameter
device ITestDevice

config TombstoneUtils.Config

Kehrt zurück
AutoCloseable

Wirft
DeviceNotAvailableException