android12崩溃,PendingIntent标志位需要适配
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start at DisplayService.java line 46, in DisplayService.onBlock, where the PendingIntent is created and the Android 12 stack trace originates. Read the surrounding notification flow and verify the PendingIntent flag behavior for apps targeting Android 12 or later. Done means the crash no longer occurs on that platform while the block notification still works.
Written by the indexing model from the issue text.
Description
java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:378)
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:461)
at android.app.PendingIntent.getActivity(PendingIntent.java:447)
at android.app.PendingIntent.getActivity(PendingIntent.java:411)
at com.github.moduth.blockcanary.DisplayService.onBlock(DisplayService.java:46)
at com.github.moduth.blockcanary.BlockCanaryInternals$1.onBlockEvent(BlockCanaryInternals.java:67)
at com.github.moduth.blockcanary.LooperMonitor$1.run(LooperMonitor.java:80)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.os.HandlerThread.run(HandlerThread.java:67)
- Dominant language
- Java
- Stars
- 6.7k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from markzhai/AndroidPerformanceMonitor
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
markzhai/AndroidPerformanceMonitor#144 · 4 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
markzhai/AndroidPerformanceMonitor#154 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 5/100
markzhai/AndroidPerformanceMonitor#153 · 5 comments · 1 reaction ·
-
这个库希望有人能维护一下 Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
markzhai/AndroidPerformanceMonitor#149 · 5 comments · 3 reactions ·
-
如何保证捕获卡顿堆栈的准确性? Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in markzhai/AndroidPerformanceMonitor
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100