【问题标题】:What does tag implies in Alarm logs in Android?标记在 Android 的警报日志中意味着什么?
【发布时间】:2019-01-08 12:13:04
【问题描述】:

我正在尝试使用 ADB 读取设备上的警报管理器日志,每个警报都有一个名为 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}}

【问题讨论】:

    标签: android logging tags alarmmanager


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-28
      • 1970-01-01
      • 2018-06-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多