commit | 69bf5eb7473241aa72cbd6c47f4f85e10ecec424 | [log] [tgz] |
---|---|---|
author | Sudheer Shanka <sudheersai@google.com> | Tue Jan 24 19:13:30 2023 +0000 |
committer | Sudheer Shanka <sudheersai@google.com> | Tue Jan 24 19:13:30 2023 +0000 |
tree | 11ec0773a11c763aeec7c507fd75ffcba975db24 | |
parent | 3373b01b247b20eb2e3163ce2cff1a7ae579c1d4 [diff] |
Add setDeferUntilActive() in BroadcastOptions shim APIs. Bug: 255525222 Bug: 255545931 Test: TH Change-Id: I54161ec0ca1a553348613c7f003e4d8bfe456077
diff --git a/apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java b/apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java index b3cc388..a6c2c44 100644 --- a/apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java +++ b/apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java
@@ -63,4 +63,12 @@ mOptions.setDeliveryGroupMatchingKey(namespace, key); return this; } + + /** See android.app.BroadcastOptions#setDeferUntilActive */ + @Override + public BroadcastOptionsShim setDeferUntilActive(boolean shouldDefer) + throws UnsupportedApiLevelException { + mOptions.setDeferUntilActive(shouldDefer); + return this; + } }
diff --git a/apishim/common/com/android/networkstack/apishim/common/BroadcastOptionsShim.java b/apishim/common/com/android/networkstack/apishim/common/BroadcastOptionsShim.java index 8322caf..097270d 100644 --- a/apishim/common/com/android/networkstack/apishim/common/BroadcastOptionsShim.java +++ b/apishim/common/com/android/networkstack/apishim/common/BroadcastOptionsShim.java
@@ -37,6 +37,12 @@ throw new UnsupportedApiLevelException("Only supported starting from API 34"); } + /** See android.app.BroadcastOptions#setDeferUntilActive */ + default BroadcastOptionsShim setDeferUntilActive(boolean shouldDefer) + throws UnsupportedApiLevelException { + throw new UnsupportedApiLevelException("Only supported starting from API 34"); + } + /** See android.app.BroadcastOptions#toBundle */ @NonNull Bundle toBundle();