Fixed
Status Update
Comments
ra...@google.com <ra...@google.com> #2
Can someone please provide an example of Notification.BigPictureStyle().bigPicture(...)
working with an animated image? From the description of this issue and the API 31 requirement, I am assuming an Icon must be passed to .bigPicture()
. However, what configurations does the Icon need in order to animate?
I have scoured the internet, but am unable to find a single example of this even though Google boldly announced it in
Edit: Also requested
su...@google.com <su...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit a2b7f7b7268c8f24b6e3a66bf58017f39c329b68
Author: Alexander Roederer <aroederer@google.com>
Date: Thu Jun 16 17:45:43 2022
Adds support for BigPictureStyle using Icon
Modifies Notification.java to use Icon as the base representation
for BigPicture in BigPictureStyle. Also adds tests to ensure both
Icon and Bitmap representation are functional.
Bug: 215583339
Test: NotificationCompatTest integration tests added
Relnote: Adds support for BigPictureStyle using Icon
Change-Id: Ice26d1400836cdf74af931f0f8ca59c25dd9c3c3
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/NotificationCompat.java
M core/core/api/public_plus_experimental_current.txt
M core/core/src/androidTest/java/androidx/core/app/NotificationCompatTest.java
M core/core/api/current.txt
https://android-review.googlesource.com/2129854
Branch: androidx-main
commit a2b7f7b7268c8f24b6e3a66bf58017f39c329b68
Author: Alexander Roederer <aroederer@google.com>
Date: Thu Jun 16 17:45:43 2022
Adds support for BigPictureStyle using Icon
Modifies Notification.java to use Icon as the base representation
for BigPicture in BigPictureStyle. Also adds tests to ensure both
Icon and Bitmap representation are functional.
Bug: 215583339
Test: NotificationCompatTest integration tests added
Relnote: Adds support for BigPictureStyle using Icon
Change-Id: Ice26d1400836cdf74af931f0f8ca59c25dd9c3c3
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/NotificationCompat.java
M core/core/api/public_plus_experimental_current.txt
M core/core/src/androidTest/java/androidx/core/app/NotificationCompatTest.java
M core/core/api/current.txt
Description
Version used: android.arch.work:work-runtime:1.0.0-alpha03
Devices/Android versions >= API 23
After updating to alpha03 we started receiving new ANR via Android Vitals:
Broadcast of Intent { act=android.intent.action.BOOT_COMPLETED flg=0x9000010 cmp=com.badoo.mobile/androidx.work.impl.background.systemalarm.RescheduleReceiver (has extras) }
androidx.work.impl.background.systemalarm.RescheduleReceiver
Stacktrace is not really telling, but I think I know the reason. In this version you added a new logic:
// This helps set up rescheduling of Jobs with JobScheduler. We are doing nothing
// for 10 seconds, to give ForceStopRunnable a chance to reschedule.
Handler handler = new Handler(Looper.getMainLooper());
final PendingResult pendingResult = goAsync();
handler.postDelayed(new Runnable() {
@Override
public void run() {
pendingResult.finish();
}
}, TimeUnit.SECONDS.toMillis(10));
But if you check the documentation for goAsync() :
<p>As a general rule, broadcast receivers are allowed to run for up to 10 seconds
* before they system will consider them non-responsive and ANR the app. Since these usually
* execute on the app's main thread, they are already bound by the ~5 second time limit
* of various operations that can happen there (not to mention just avoiding UI jank), so
* the receive limit is generally not of concern. However, once you use {@goAsync}, though
* able to be off the main thread, the broadcast execution limit still applies, and that
* includes the time spent between calling this method and ultimately
* {@link PendingResult#finish() PendingResult.finish()}.</p>
You are not allowed to do nothing for 10 seconds here. Please consider another approach for achieving compatibility with ForceStopRunnable.
Thanks