Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR定位和修正 #29

Open
Blowing opened this issue Dec 4, 2018 · 1 comment
Open

ANR定位和修正 #29

Blowing opened this issue Dec 4, 2018 · 1 comment

Comments

@Blowing
Copy link

Blowing commented Dec 4, 2018

使用Thread或者HandlerThread时,调用Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND)设置优先级,否则仍然会降低程序响应,因为默认Thread的优先级和主线程相同。

将线程的优先级降低了,就应该降低ANR的概率。“否则仍然会降低程序响应”是不是写反了。

@JackyAndroid
Copy link
Owner

@Blowing 详细描述下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants