Skip to content

android 8.0 前台服务出现anr检测不出来 #127

Description

@626838956

log信息如下:
ActivityManager: ANR in XX
Reason: Context.startForegroundService() did not then call Service.startForeground():ServiceRecord{XX}

在5s之内没有及时调用startForeground()

Activity

  1. popman135 commented on Apr 14, 2020

    @popman135

    出现ANR的应该都不能检测出吧。
    这个实现原理是判断Looper循环一次的时间超过限定值。
    如果Looper的一次循环被卡死,超过ANR时间,应该会直接报出ANR,而不是通过BlockCanary报出吧?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions