标签在Android的警报日志中意味着什么?

时间:2019-01-08 12:13:05

标签: android logging tags alarmmanager

我正在尝试使用ADB读取设备上的Alarm Manager日志,对于每个警报,都有一个名为Tag的字段。谁能解释这个标签的含义?

我运行了adb shell dumpsys警报。 它为我提供了要触发的队列中所有当前警报的列表。 每个警报都有一个标签。该标签的含义以及在创建警报时如何为该标签设置值?

******-MacBook-Air-3:~ xyz$ export PATH="~/Library/Android/sdk/platform-tools":$PATH
******-MacBook-Air-3:~ xyz$ adb shell dumpsys alarm
Current Alarm Manager state:
  Settings:
    min_futurity=+1s0ms
    min_interval=+1m0s0ms
    listener_timeout=+5s0ms
    allow_while_idle_short_time=+1s0ms
    allow_while_idle_long_time=+9m0s0ms
    allow_while_idle_whitelist_duration=+10s0ms
  nowRTC=1546947850717=2019-01-08 17:14:10 nowELAPSED=160817
  mLastTimeChangeClockTime=1546947819004=2019-01-08 17:13:39
  mLastTimeChangeRealtime=+2m9s104ms
  Next non-wakeup alarm: -10s717ms = 2019-01-08 17:14:00
  Next wakeup: +9s268ms = 2019-01-08 17:14:19
  Last wakeup: -701ms set at -701ms
  Num time change events: 2
  mDeviceIdleUserWhitelist=[1000, 10097, 10188, 10208, 10309]
  Next alarm clock information: 
    user:0 pendingSend:false time:1546995600000 = 2019-01-09 06:30:00 = +13h15m49s283ms
  Pending alarm batches: 84
Batch{fac7508 num=1 start=170085 end=170085 flgs=0x9}:
    RTC_WAKEUP #0: Alarm{44674a1 type 0 when 1546947859984 com.samsung.android.spayfw}
      tag=*walarm*:LocationSensor
      type=0 whenElapsed=+9s268ms when=2019-01-08 17:14:19
      window=0 repeatInterval=0 count=0 flags=0x9
      operation=PendingIntent{f0ee6c6: PendingIntentRecord{b52b375 com.samsung.android.spayfw broadcastIntent}}
Batch{6ccc687 num=4 start=172775 end=178221 flgs=0x8}:
    RTC #3: Alarm{d17d9b4 type 1 when 1546947862674 com.wssyncmldm}
      tag=*alarm*:com.wssyncmldm/com.samsung.android.app.fotaclient.device.UpdateDeviceIntentService
      type=1 whenElapsed=+11s958ms when=2019-01-08 17:14:22
      window=+9h0m0s0ms repeatInterval=43200000 count=0 flags=0x8
      operation=PendingIntent{cb4b9dd: PendingIntentRecord{99838a0 com.wssyncmldm startService}}

1 个答案:

答案 0 :(得分:0)

String:描述警报的字符串。基本上用于框架的日志记录和电池优化。所以基本上您可以说这是警报的识别。 如果未设置,它将使用类名。如果要自定义名称,请在set / setExact警报管理器api中传递字符串