Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7b8f812 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

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
parent dc0f1da4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();
    }