Add defer-until-active policy to CONNECTIVITY_ACTION.
This allows deferring the broadcast delivery to apps in the Cached state. Bug: 255545931 Test: TH Change-Id: Idd94ad5f9dbabf88f6070108bdfc8e60f34304a6
This commit is contained in:
parent
7dddc31942
commit
74fe7178af
1 changed files with 2 additions and 0 deletions
|
|
@ -3082,6 +3082,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
optsShim.setDeliveryGroupPolicy(ConstantsShim.DELIVERY_GROUP_POLICY_MOST_RECENT);
|
||||
optsShim.setDeliveryGroupMatchingKey(ConnectivityManager.CONNECTIVITY_ACTION,
|
||||
createDeliveryGroupKeyForConnectivityAction(info));
|
||||
optsShim.setDeferUntilActive(true);
|
||||
} catch (UnsupportedApiLevelException e) {
|
||||
Log.wtf(TAG, "Using unsupported API" + e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue