Add defer-until-active policy to DREAMING related broadcasts.
Applying this poicy allows deferring the broadcast delivery to apps in the Cached state. Bug: 255526731 Test: atest ./tests/tests/dreams/src/android/service/dreams/cts/DreamServiceTest.java Test: atest tests/app/BroadcastsTest/src/android/app/cts/broadcasts/BroadcastDeferralTest.java Change-Id: I2dd983751356a2fde98ea8d628a06151c46697c4
This commit is contained in:
@@ -118,6 +118,8 @@ final class DreamController {
|
||||
// are yet to be delivered.
|
||||
options.setDeliveryGroupMatchingKey(
|
||||
DREAMING_DELIVERY_GROUP_NAMESPACE, DREAMING_DELIVERY_GROUP_KEY);
|
||||
// This allows the broadcast delivery to be delayed to apps in the Cached state.
|
||||
options.setDeferUntilActive(true);
|
||||
return options.toBundle();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user