我正在尝试使用ADB读取设备上的Alarm Manager日志,每个报警都有一个名为Tag的文件。谁能解释一下这个标签是什么意思?
我运行了亚洲开发银行的空壳警报。它为我提供了当前队列中要触发的所有警报的列表。每个警报都有一个标签。该标记的含义以及如何在创建警报时设置该标记的值?
******-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}}发布于 2019-01-08 20:50:34
String:描述告警的字符串。主要用于框架中的日志记录和电池优化。所以基本上你可以说这是警报的识别。如果未设置,它将采用类名。如果您想要自定义名称,请传递set/setExact警报管理器api中的字符串
https://stackoverflow.com/questions/54091591
复制相似问题