diff options
| author | 2020-06-02 15:59:29 -0700 | |
|---|---|---|
| committer | 2020-06-08 17:14:54 -0700 | |
| commit | 915a081cd6bef7a5eff834b72e596d9e23895e80 (patch) | |
| tree | d2d7bf38d47cad7ecc08540cddc892e3d0eec48b | |
| parent | 70afad695212ddc43e682a545087076d5f43a81d (diff) | |
Throw exception from addServiceAnnouncement impl
Throw an UnsupportedOperationException from the base implementation of
addServiceAnnouncement and add supporting documentation.
Bug: 155926142
Test: existing CTS
Change-Id: Ib120b650d2a29acdacb9877cdeeba4b782f3f189
| -rw-r--r-- | telephony/java/android/telephony/MbmsDownloadSession.java | 3 | ||||
| -rw-r--r-- | telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/MbmsDownloadSession.java b/telephony/java/android/telephony/MbmsDownloadSession.java index 7b8d591f2583..3f671ca2d809 100644 --- a/telephony/java/android/telephony/MbmsDownloadSession.java +++ b/telephony/java/android/telephony/MbmsDownloadSession.java @@ -453,7 +453,8 @@ public class MbmsDownloadSession implements AutoCloseable { * callback may include any of the errors that are not specific to the streaming use-case. * * May throw an {@link IllegalStateException} when the middleware has not yet been bound, - * or an {@link IllegalArgumentException} if the byte array is too large. + * or an {@link IllegalArgumentException} if the byte array is too large, or an + * {@link UnsupportedOperationException} if the middleware has not implemented this method. * * @param contents The contents of the service announcement descriptor received from the * group call server. If the size of this array is greater than the value of diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java index 1302d118e3a3..3053ea03bebe 100644 --- a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java +++ b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java @@ -234,7 +234,8 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { @Override public @MbmsErrors.MbmsError int addServiceAnnouncement( int subscriptionId, @NonNull byte[] contents) { - return 0; + throw new UnsupportedOperationException("addServiceAnnouncement not supported by" + + " this middleware."); } /** |