-
@ApiStatus.Internal() public final class DeviceInfoUtil
-
-
Field Summary
Fields Modifier and Type Field Description private static volatile DeviceInfoUtilinstanceprivate final ContextUtils.SideLoadedInfosideLoadedInfoprivate final ContextUtils.SplitApksInfosplitApksInfo
-
Constructor Summary
Constructors Constructor Description DeviceInfoUtil(Context context, SentryAndroidOptions options)
-
Method Summary
Modifier and Type Method Description static DeviceInfoUtilgetInstance(@NotNull() Context context, @NotNull() SentryAndroidOptions options)static DeviceInfoUtilgetInstance(@NotNull() Context context, @NotNull() SentryAndroidOptions options)ContextUtils.SideLoadedInfogetSideLoadedInfo()ContextUtils.SplitApksInfogetSplitApksInfo()static voidresetInstance()DevicecollectDeviceInformation(boolean collectDeviceIO, boolean collectDynamicData)OperatingSystemgetOperatingSystem()LonggetTotalMemory()static FloatgetBatteryLevel(@NotNull() Intent batteryIntent, @NotNull() SentryOptions options)Get the device's current battery level (as a percentage of total). static BooleanisCharging(@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.
-
-
-
-