import typing

import android.os
import android.util
import java
import java.chaquopy
import java.lang
import java.util
import java.util.concurrent
import java.util.function

class HealthStats(java.lang.Object):
    def getDataType(self) -> str: ...
    def getMeasurement(self, key: int | java.jint | java.lang.Integer, /) -> int: ...
    def getMeasurementKeyAt(self, index: int | java.jint | java.lang.Integer, /) -> int: ...
    def getMeasurementKeyCount(self) -> int: ...
    def getMeasurements(self, key: int | java.jint | java.lang.Integer, /) -> java.util.Map[java.lang.String, java.lang.Long]: ...
    def getMeasurementsKeyAt(self, index: int | java.jint | java.lang.Integer, /) -> int: ...
    def getMeasurementsKeyCount(self) -> int: ...
    def getStats(self, key: int | java.jint | java.lang.Integer, /) -> java.util.Map[java.lang.String, HealthStats]: ...
    def getStatsKeyAt(self, index: int | java.jint | java.lang.Integer, /) -> int: ...
    def getStatsKeyCount(self) -> int: ...
    def getTimer(self, key: int | java.jint | java.lang.Integer, /) -> TimerStat: ...
    def getTimerCount(self, key: int | java.jint | java.lang.Integer, /) -> int: ...
    def getTimerKeyAt(self, index: int | java.jint | java.lang.Integer, /) -> int: ...
    def getTimerKeyCount(self) -> int: ...
    def getTimerTime(self, key: int | java.jint | java.lang.Integer, /) -> int: ...
    def getTimers(self, key: int | java.jint | java.lang.Integer, /) -> java.util.Map[java.lang.String, TimerStat]: ...
    def getTimersKeyAt(self, index: int | java.jint | java.lang.Integer, /) -> int: ...
    def getTimersKeyCount(self) -> int: ...
    def hasMeasurement(self, key: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasMeasurements(self, key: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasStats(self, key: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasTimer(self, key: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasTimers(self, key: int | java.jint | java.lang.Integer, /) -> bool: ...

class PackageHealthStats(java.lang.Object):
    MEASUREMENTS_WAKEUP_ALARMS_COUNT: typing.ClassVar[int] = ...
    STATS_SERVICES: typing.ClassVar[int] = ...

class PidHealthStats(java.lang.Object):
    MEASUREMENT_WAKE_NESTING_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_WAKE_START_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WAKE_SUM_MS: typing.ClassVar[int] = ...

class ProcessHealthStats(java.lang.Object):
    MEASUREMENT_ANR_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_CRASHES_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_FOREGROUND_MS: typing.ClassVar[int] = ...
    MEASUREMENT_STARTS_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_SYSTEM_TIME_MS: typing.ClassVar[int] = ...
    MEASUREMENT_USER_TIME_MS: typing.ClassVar[int] = ...

class ServiceHealthStats(java.lang.Object):
    MEASUREMENT_LAUNCH_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_START_SERVICE_COUNT: typing.ClassVar[int] = ...

class SystemHealthManager(java.lang.Object):
    def getCpuHeadroom(self, params: android.os.CpuHeadroomParams, /) -> float: ...
    def getCpuHeadroomCalculationWindowRange(self) -> android.util.Pair[java.lang.Integer, java.lang.Integer]: ...
    def getCpuHeadroomMinIntervalMillis(self) -> int: ...
    def getGpuHeadroom(self, params: android.os.GpuHeadroomParams, /) -> float: ...
    def getGpuHeadroomCalculationWindowRange(self) -> android.util.Pair[java.lang.Integer, java.lang.Integer]: ...
    def getGpuHeadroomMinIntervalMillis(self) -> int: ...
    def getMaxCpuHeadroomTidsSize(self) -> int: ...
    def getPowerMonitorReadings(self, powerMonitors: java.util.List[android.os.PowerMonitor], executor: java.util.concurrent.Executor, onResult: android.os.OutcomeReceiver[android.os.PowerMonitorReadings, java.lang.RuntimeException], /) -> None: ...
    def getSupportedPowerMonitors(self, executor: java.util.concurrent.Executor, onResult: java.util.function.Consumer[java.util.List[android.os.PowerMonitor]], /) -> None: ...
    def takeMyUidSnapshot(self) -> HealthStats: ...
    def takeUidSnapshot(self, uid: int | java.jint | java.lang.Integer, /) -> HealthStats: ...
    def takeUidSnapshots(self, uids: java.chaquopy.JavaArrayJInt, /) -> java.chaquopy.JavaArray[HealthStats]: ...

class TimerStat(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[TimerStat]] = ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, in_: android.os.Parcel, /) -> None: ...
    @typing.overload
    def __init__(self, count: int | java.jint | java.lang.Integer, time: int | java.jlong | java.lang.Long, /) -> None: ...
    def describeContents(self) -> int: ...
    def getCount(self) -> int: ...
    def getTime(self) -> int: ...
    def setCount(self, count: int | java.jint | java.lang.Integer, /) -> None: ...
    def setTime(self, time: int | java.jlong | java.lang.Long, /) -> None: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class UidHealthStats(java.lang.Object):
    MEASUREMENT_BLUETOOTH_IDLE_MS: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_POWER_MAMS: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_RX_BYTES: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_RX_MS: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_RX_PACKETS: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_TX_BYTES: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_TX_MS: typing.ClassVar[int] = ...
    MEASUREMENT_BLUETOOTH_TX_PACKETS: typing.ClassVar[int] = ...
    MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_CPU_POWER_MAMS: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_IDLE_MS: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_POWER_MAMS: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_RX_BYTES: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_RX_MS: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_RX_PACKETS: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_TX_BYTES: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_TX_MS: typing.ClassVar[int] = ...
    MEASUREMENT_MOBILE_TX_PACKETS: typing.ClassVar[int] = ...
    MEASUREMENT_OTHER_USER_ACTIVITY_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_REALTIME_BATTERY_MS: typing.ClassVar[int] = ...
    MEASUREMENT_REALTIME_SCREEN_OFF_BATTERY_MS: typing.ClassVar[int] = ...
    MEASUREMENT_SYSTEM_CPU_TIME_MS: typing.ClassVar[int] = ...
    MEASUREMENT_TOUCH_USER_ACTIVITY_COUNT: typing.ClassVar[int] = ...
    MEASUREMENT_UPTIME_BATTERY_MS: typing.ClassVar[int] = ...
    MEASUREMENT_UPTIME_SCREEN_OFF_BATTERY_MS: typing.ClassVar[int] = ...
    MEASUREMENT_USER_CPU_TIME_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_FULL_LOCK_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_IDLE_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_MULTICAST_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_POWER_MAMS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_RUNNING_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_RX_BYTES: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_RX_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_RX_PACKETS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_TX_BYTES: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_TX_MS: typing.ClassVar[int] = ...
    MEASUREMENT_WIFI_TX_PACKETS: typing.ClassVar[int] = ...
    STATS_PACKAGES: typing.ClassVar[int] = ...
    STATS_PIDS: typing.ClassVar[int] = ...
    STATS_PROCESSES: typing.ClassVar[int] = ...
    TIMERS_JOBS: typing.ClassVar[int] = ...
    TIMERS_SENSORS: typing.ClassVar[int] = ...
    TIMERS_SYNCS: typing.ClassVar[int] = ...
    TIMERS_WAKELOCKS_DRAW: typing.ClassVar[int] = ...
    TIMERS_WAKELOCKS_FULL: typing.ClassVar[int] = ...
    TIMERS_WAKELOCKS_PARTIAL: typing.ClassVar[int] = ...
    TIMERS_WAKELOCKS_WINDOW: typing.ClassVar[int] = ...
    TIMER_AUDIO: typing.ClassVar[int] = ...
    TIMER_BLUETOOTH_SCAN: typing.ClassVar[int] = ...
    TIMER_CAMERA: typing.ClassVar[int] = ...
    TIMER_FLASHLIGHT: typing.ClassVar[int] = ...
    TIMER_FOREGROUND_ACTIVITY: typing.ClassVar[int] = ...
    TIMER_GPS_SENSOR: typing.ClassVar[int] = ...
    TIMER_MOBILE_RADIO_ACTIVE: typing.ClassVar[int] = ...
    TIMER_PROCESS_STATE_BACKGROUND_MS: typing.ClassVar[int] = ...
    TIMER_PROCESS_STATE_CACHED_MS: typing.ClassVar[int] = ...
    TIMER_PROCESS_STATE_FOREGROUND_MS: typing.ClassVar[int] = ...
    TIMER_PROCESS_STATE_FOREGROUND_SERVICE_MS: typing.ClassVar[int] = ...
    TIMER_PROCESS_STATE_TOP_MS: typing.ClassVar[int] = ...
    TIMER_PROCESS_STATE_TOP_SLEEPING_MS: typing.ClassVar[int] = ...
    TIMER_VIBRATOR: typing.ClassVar[int] = ...
    TIMER_VIDEO: typing.ClassVar[int] = ...
    TIMER_WIFI_SCAN: typing.ClassVar[int] = ...
