-
@ApiStatus.Internal() public final class DeviceInfoUtil
-
-
Field Summary
Fields Modifier and Type Field Description private static volatile DeviceInfoUtil
instance
private final ContextUtils.SideLoadedInfo
sideLoadedInfo
private final ContextUtils.SplitApksInfo
splitApksInfo
-
Constructor Summary
Constructors Constructor Description DeviceInfoUtil(Context context, SentryAndroidOptions options)
-
Method Summary
Modifier and Type Method Description static DeviceInfoUtil
getInstance(@NotNull() Context context, @NotNull() SentryAndroidOptions options)
static DeviceInfoUtil
getInstance(@NotNull() Context context, @NotNull() SentryAndroidOptions options)
ContextUtils.SideLoadedInfo
getSideLoadedInfo()
ContextUtils.SplitApksInfo
getSplitApksInfo()
static void
resetInstance()
Device
collectDeviceInformation(boolean collectDeviceIO, boolean collectDynamicData)
OperatingSystem
getOperatingSystem()
Long
getTotalMemory()
static Float
getBatteryLevel(@NotNull() Intent batteryIntent, @NotNull() SentryOptions options)
Get the device's current battery level (as a percentage of total). static Boolean
isCharging(@NotNull() Intent batteryIntent, @NotNull() SentryOptions options)
Checks whether or not the device is currently plugged in and charging, or null if unknown. -
-
Constructor Detail
-
DeviceInfoUtil
DeviceInfoUtil(Context context, SentryAndroidOptions options)
-
-
Method Detail
-
getInstance
@NotNull() static DeviceInfoUtil getInstance(@NotNull() Context context, @NotNull() SentryAndroidOptions options)
-
getInstance
@NotNull() static DeviceInfoUtil getInstance(@NotNull() Context context, @NotNull() SentryAndroidOptions options)
-
getSideLoadedInfo
@Nullable() ContextUtils.SideLoadedInfo getSideLoadedInfo()
-
getSplitApksInfo
@Nullable() ContextUtils.SplitApksInfo getSplitApksInfo()
-
resetInstance
@TestOnly() static void resetInstance()
-
collectDeviceInformation
@NotNull() Device collectDeviceInformation(boolean collectDeviceIO, boolean collectDynamicData)
-
getOperatingSystem
@NotNull() OperatingSystem getOperatingSystem()
-
getTotalMemory
@Nullable() Long getTotalMemory()
-
getBatteryLevel
@Nullable() static Float getBatteryLevel(@NotNull() Intent batteryIntent, @NotNull() SentryOptions options)
Get the device's current battery level (as a percentage of total).
-
isCharging
@Nullable() static Boolean isCharging(@NotNull() Intent batteryIntent, @NotNull() SentryOptions options)
Checks whether or not the device is currently plugged in and charging, or null if unknown.
-
-
-
-