summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hall Liu <hallliu@google.com> 2020-05-14 16:57:11 -0700
committer Hall Liu <hallliu@google.com> 2020-06-08 16:32:47 -0700
commit70afad695212ddc43e682a545087076d5f43a81d (patch)
tree139e0a7df78712d4f847c806497dcd2e29681e43
parent79100ffd9c82574af3b8a7dc19d0666b11d94d3b (diff)
Rename addServiceAnnouncement-related methods
Address feedback on the API Fixes: 155926142 Test: CTS Change-Id: I69e17faf4d09ab686fdd97975bc7f069597b87b3
-rw-r--r--api/current.txt6
-rwxr-xr-xapi/system-current.txt2
-rw-r--r--api/test-current.txt2
-rw-r--r--non-updatable-api/current.txt6
-rw-r--r--non-updatable-api/system-current.txt2
-rw-r--r--telephony/java/android/telephony/MbmsDownloadSession.java38
-rw-r--r--telephony/java/android/telephony/mbms/MbmsErrors.java8
-rwxr-xr-xtelephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl2
-rw-r--r--telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java16
9 files changed, 41 insertions, 41 deletions
diff --git a/api/current.txt b/api/current.txt
index 8163426f953c..c8bafb2a7d14 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -45344,14 +45344,14 @@ package android.telephony {
public class MbmsDownloadSession implements java.lang.AutoCloseable {
method public void addProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadProgressListener);
- method public void addServiceAnnouncementFile(@NonNull byte[]);
+ method public void addServiceAnnouncement(@NonNull byte[]);
method public void addStatusListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadStatusListener);
method public void cancelDownload(@NonNull android.telephony.mbms.DownloadRequest);
method public void close();
method public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method @Nullable public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, int, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method public void download(@NonNull android.telephony.mbms.DownloadRequest);
- method public static int getMaximumServiceAnnouncementFileSize();
+ method public static int getMaximumServiceAnnouncementSize();
method @Nullable public java.io.File getTempFileRootDirectory();
method @NonNull public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads();
method public void removeProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull android.telephony.mbms.DownloadProgressListener);
@@ -46958,7 +46958,7 @@ package android.telephony.mbms {
public static class MbmsErrors.DownloadErrors {
field public static final int ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT = 401; // 0x191
- field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE = 404; // 0x194
+ field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT = 404; // 0x194
field public static final int ERROR_UNKNOWN_DOWNLOAD_REQUEST = 402; // 0x192
field public static final int ERROR_UNKNOWN_FILE_INFO = 403; // 0x193
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 26153caebfce..a10880bee172 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -10321,7 +10321,7 @@ package android.telephony.mbms.vendor {
public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface {
ctor public MbmsDownloadServiceBase();
method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
- method public int addServiceAnnouncementFile(int, @NonNull byte[]);
+ method public int addServiceAnnouncement(int, @NonNull byte[]);
method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public android.os.IBinder asBinder();
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
diff --git a/api/test-current.txt b/api/test-current.txt
index 9747647845ed..e39a3a7c3aac 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -4099,7 +4099,7 @@ package android.telephony.mbms.vendor {
public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface {
ctor public MbmsDownloadServiceBase();
method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
- method public int addServiceAnnouncementFile(int, @NonNull byte[]);
+ method public int addServiceAnnouncement(int, @NonNull byte[]);
method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public android.os.IBinder asBinder();
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt
index 37fc83f80a62..c5c20acd3890 100644
--- a/non-updatable-api/current.txt
+++ b/non-updatable-api/current.txt
@@ -45200,14 +45200,14 @@ package android.telephony {
public class MbmsDownloadSession implements java.lang.AutoCloseable {
method public void addProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadProgressListener);
- method public void addServiceAnnouncementFile(@NonNull byte[]);
+ method public void addServiceAnnouncement(@NonNull byte[]);
method public void addStatusListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadStatusListener);
method public void cancelDownload(@NonNull android.telephony.mbms.DownloadRequest);
method public void close();
method public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method @Nullable public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, int, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method public void download(@NonNull android.telephony.mbms.DownloadRequest);
- method public static int getMaximumServiceAnnouncementFileSize();
+ method public static int getMaximumServiceAnnouncementSize();
method @Nullable public java.io.File getTempFileRootDirectory();
method @NonNull public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads();
method public void removeProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull android.telephony.mbms.DownloadProgressListener);
@@ -46814,7 +46814,7 @@ package android.telephony.mbms {
public static class MbmsErrors.DownloadErrors {
field public static final int ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT = 401; // 0x191
- field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE = 404; // 0x194
+ field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT = 404; // 0x194
field public static final int ERROR_UNKNOWN_DOWNLOAD_REQUEST = 402; // 0x192
field public static final int ERROR_UNKNOWN_FILE_INFO = 403; // 0x193
}
diff --git a/non-updatable-api/system-current.txt b/non-updatable-api/system-current.txt
index 6da5ad21a1dc..0b299092c433 100644
--- a/non-updatable-api/system-current.txt
+++ b/non-updatable-api/system-current.txt
@@ -10219,7 +10219,7 @@ package android.telephony.mbms.vendor {
public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface {
ctor public MbmsDownloadServiceBase();
method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
- method public int addServiceAnnouncementFile(int, @NonNull byte[]);
+ method public int addServiceAnnouncement(int, @NonNull byte[]);
method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public android.os.IBinder asBinder();
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
diff --git a/telephony/java/android/telephony/MbmsDownloadSession.java b/telephony/java/android/telephony/MbmsDownloadSession.java
index 3d96fc634d6a..7b8d591f2583 100644
--- a/telephony/java/android/telephony/MbmsDownloadSession.java
+++ b/telephony/java/android/telephony/MbmsDownloadSession.java
@@ -231,7 +231,7 @@ public class MbmsDownloadSession implements AutoCloseable {
private static final String DESTINATION_SANITY_CHECK_FILE_NAME = "destinationSanityCheckFile";
- private static final int MAX_SERVICE_ANNOUNCEMENT_FILE_SIZE = 10 * 1024; // 10KB
+ private static final int MAX_SERVICE_ANNOUNCEMENT_SIZE = 10 * 1024; // 10KB
private static AtomicBoolean sIsInitialized = new AtomicBoolean(false);
@@ -321,13 +321,13 @@ public class MbmsDownloadSession implements AutoCloseable {
}
/**
- * Returns the maximum size of the service announcement file that can be provided via
- * {@link #addServiceAnnouncementFile}
+ * Returns the maximum size of the service announcement descriptor that can be provided via
+ * {@link #addServiceAnnouncement}
* @return The maximum length of the byte array passed as an argument to
- * {@link #addServiceAnnouncementFile}.
+ * {@link #addServiceAnnouncement}.
*/
- public static int getMaximumServiceAnnouncementFileSize() {
- return MAX_SERVICE_ANNOUNCEMENT_FILE_SIZE;
+ public static int getMaximumServiceAnnouncementSize() {
+ return MAX_SERVICE_ANNOUNCEMENT_SIZE;
}
private int bindAndInitialize() {
@@ -436,15 +436,15 @@ public class MbmsDownloadSession implements AutoCloseable {
}
/**
- * Inform the middleware of a service announcement file received from a group communication
- * server.
+ * Inform the middleware of a service announcement descriptor received from a group
+ * communication server.
*
* When participating in a group call via the {@link MbmsGroupCallSession} API, applications may
- * receive a service announcement file from the group call server that informs them of
+ * receive a service announcement descriptor from the group call server that informs them of
* files that may be relevant to users communicating on the group call.
*
- * After supplying the service announcement file received from the server to the middleware via
- * this API, applications will receive information on the available files via
+ * After supplying the service announcement descriptor received from the server to the
+ * middleware via this API, applications will receive information on the available files via
* {@link MbmsDownloadSessionCallback#onFileServicesUpdated}, and the available files will be
* downloadable via {@link MbmsDownloadSession#download} like other files published via
* {@link MbmsDownloadSessionCallback#onFileServicesUpdated}.
@@ -453,26 +453,26 @@ 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 file is too large.
+ * or an {@link IllegalArgumentException} if the byte array is too large.
*
- * @param fileContents The contents of the service announcement file received from the group
- * call server. If the size of this array is greater than the value of
- * {@link #getMaximumServiceAnnouncementFileSize()}, an
+ * @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
+ * {@link #getMaximumServiceAnnouncementSize()}, an
* {@link IllegalArgumentException} will be thrown.
*/
- public void addServiceAnnouncementFile(@NonNull byte[] fileContents) {
+ public void addServiceAnnouncement(@NonNull byte[] contents) {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
}
- if (fileContents.length > MAX_SERVICE_ANNOUNCEMENT_FILE_SIZE) {
+ if (contents.length > MAX_SERVICE_ANNOUNCEMENT_SIZE) {
throw new IllegalArgumentException("File too large");
}
try {
- int returnCode = downloadService.addServiceAnnouncementFile(
- mSubscriptionId, fileContents);
+ int returnCode = downloadService.addServiceAnnouncement(
+ mSubscriptionId, contents);
if (returnCode == MbmsErrors.UNKNOWN) {
// Unbind and throw an obvious error
close();
diff --git a/telephony/java/android/telephony/mbms/MbmsErrors.java b/telephony/java/android/telephony/mbms/MbmsErrors.java
index 8611d26bc85b..40f3ae82d778 100644
--- a/telephony/java/android/telephony/mbms/MbmsErrors.java
+++ b/telephony/java/android/telephony/mbms/MbmsErrors.java
@@ -144,11 +144,11 @@ public class MbmsErrors {
public static final int ERROR_UNKNOWN_FILE_INFO = 403;
/**
- * Indicates that the service announcement file passed via
- * {@link android.telephony.MbmsDownloadSession#addServiceAnnouncementFile(byte[])}
+ * Indicates that the service announcement descriptor passed via
+ * {@link android.telephony.MbmsDownloadSession#addServiceAnnouncement(byte[])}
* is malformed.
*/
- public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE = 404;
+ public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT = 404;
}
/**
@@ -189,7 +189,7 @@ public class MbmsErrors {
DownloadErrors.ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT,
DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST,
DownloadErrors.ERROR_UNKNOWN_FILE_INFO,
- DownloadErrors.ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE,
+ DownloadErrors.ERROR_MALFORMED_SERVICE_ANNOUNCEMENT,
GroupCallErrors.ERROR_UNABLE_TO_START_SERVICE,
GroupCallErrors.ERROR_DUPLICATE_START_GROUP_CALL,
})
diff --git a/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl b/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
index 36136ab280c4..04efd53eb743 100755
--- a/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
+++ b/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
@@ -35,7 +35,7 @@ interface IMbmsDownloadService
int setTempFileRootDirectory(int subId, String rootDirectoryPath);
- int addServiceAnnouncementFile(int subId, in byte[] fileContents);
+ int addServiceAnnouncement(int subId, in byte[] contents);
int download(in DownloadRequest downloadRequest);
diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
index 3279ce66cd17..1302d118e3a3 100644
--- a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
+++ b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
@@ -217,23 +217,23 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub {
/**
* Called when the client application wishes to receive file information according to a
- * service announcement file received from a group call server.
+ * service announcement descriptor received from a group call server.
*
- * The service announcement file is in the format of a multipart MIME file with XML parts,
- * though no validation is performed on the contents of the {@code fileContents} argument --
+ * The service announcement descriptor is in the format of a multipart MIME file with XML parts,
+ * though no validation is performed on the contents of the {@code contents} argument --
* implementing middleware applications should perform their own validation and return
- * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE} if the file is
+ * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT} if the descriptor is
* malformed.
*
* @param subscriptionId The subscription id the service announcement applies to.
- * @param fileContents The contents of the service announcement file.
+ * @param contents The contents of the service announcement descriptor.
* @return {@link MbmsErrors#SUCCESS}, or
- * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE}
+ * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT}
*/
// TODO: are there any public specifications of what the file format is that I can link to?
@Override
- public @MbmsErrors.MbmsError int addServiceAnnouncementFile(
- int subscriptionId, @NonNull byte[] fileContents) {
+ public @MbmsErrors.MbmsError int addServiceAnnouncement(
+ int subscriptionId, @NonNull byte[] contents) {
return 0;
}