TombstoneUtils

public class TombstoneUtils
extends Object

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


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

Zusammenfassung

Verschachtelte Klassen

class TombstoneUtils.Config

class TombstoneUtils.Signals

Öffentliche Bauträger

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 für die angegebene Konfiguration wahrscheinlich sicherheitsrelevant ist.

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

Öffentliche Bauträger

TombstoneUtils

public TombstoneUtils ()

Öffentliche Methoden

affirmNoSecurityCrashes

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. z. B. „/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 Grabsteine

config TombstoneUtils.Config : Konfigurationsobjekt für die Absturzerkennung

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

isSecurityCrash

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

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

Parameter
tombstone TombstoneProtos.Tombstone : Der zu überprüfende Grabstein

config TombstoneUtils.Config : Konfigurationsobjekt für die Absturzerkennung

Kehrt zurück
boolean wenn der Grabstein sicherheitsrelevant ist

withAssertNoSecurityCrashes

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

Parameter
device ITestDevice

config TombstoneUtils.Config

Kehrt zurück
AutoCloseable

Würfe
DeviceNotAvailableException