Merge changes from topics "embms-cts-6", "embms-cts-5"
am: f6b2b77e40
Change-Id: I1c740fee4e612253098aa56ebdb70dafc83c6f43
This commit is contained in:
@@ -40846,6 +40846,14 @@ package android.telephony.mbms {
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.mbms.StreamingServiceInfo> CREATOR;
|
||||
}
|
||||
|
||||
public final class UriPathPair implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public android.net.Uri getContentUri();
|
||||
method public android.net.Uri getFilePathUri();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.mbms.UriPathPair> CREATOR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.telephony.mbms.vendor {
|
||||
@@ -40877,6 +40885,23 @@ package android.telephony.mbms.vendor {
|
||||
method public void stopStreaming(int, java.lang.String) throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public class VendorUtils {
|
||||
ctor public VendorUtils();
|
||||
method public static android.content.ComponentName getAppReceiverFromPackageName(android.content.Context, java.lang.String);
|
||||
field public static final java.lang.String ACTION_CLEANUP = "android.telephony.mbms.action.CLEANUP";
|
||||
field public static final java.lang.String ACTION_DOWNLOAD_RESULT_INTERNAL = "android.telephony.mbms.action.DOWNLOAD_RESULT_INTERNAL";
|
||||
field public static final java.lang.String ACTION_FILE_DESCRIPTOR_REQUEST = "android.telephony.mbms.action.FILE_DESCRIPTOR_REQUEST";
|
||||
field public static final java.lang.String EXTRA_FD_COUNT = "android.telephony.mbms.extra.FD_COUNT";
|
||||
field public static final java.lang.String EXTRA_FINAL_URI = "android.telephony.mbms.extra.FINAL_URI";
|
||||
field public static final java.lang.String EXTRA_FREE_URI_LIST = "android.telephony.mbms.extra.FREE_URI_LIST";
|
||||
field public static final java.lang.String EXTRA_PAUSED_LIST = "android.telephony.mbms.extra.PAUSED_LIST";
|
||||
field public static final java.lang.String EXTRA_PAUSED_URI_LIST = "android.telephony.mbms.extra.PAUSED_URI_LIST";
|
||||
field public static final java.lang.String EXTRA_SERVICE_ID = "android.telephony.mbms.extra.SERVICE_ID";
|
||||
field public static final java.lang.String EXTRA_TEMP_FILES_IN_USE = "android.telephony.mbms.extra.TEMP_FILES_IN_USE";
|
||||
field public static final java.lang.String EXTRA_TEMP_FILE_ROOT = "android.telephony.mbms.extra.TEMP_FILE_ROOT";
|
||||
field public static final java.lang.String EXTRA_TEMP_LIST = "android.telephony.mbms.extra.TEMP_LIST";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.test {
|
||||
|
||||
@@ -165,16 +165,16 @@ public class MbmsDownloadReceiver extends BroadcastReceiver {
|
||||
Log.w(LOG_TAG, "Download result did not include a result code. Ignoring.");
|
||||
return false;
|
||||
}
|
||||
if (!intent.hasExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST)) {
|
||||
Log.w(LOG_TAG, "Download result did not include the associated request. Ignoring.");
|
||||
return false;
|
||||
}
|
||||
// We do not need to verify below extras if the result is not success.
|
||||
if (MbmsDownloadSession.RESULT_SUCCESSFUL !=
|
||||
intent.getIntExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT,
|
||||
MbmsDownloadSession.RESULT_CANCELLED)) {
|
||||
return true;
|
||||
}
|
||||
if (!intent.hasExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST)) {
|
||||
Log.w(LOG_TAG, "Download result did not include the associated request. Ignoring.");
|
||||
return false;
|
||||
}
|
||||
if (!intent.hasExtra(VendorUtils.EXTRA_TEMP_FILE_ROOT)) {
|
||||
Log.w(LOG_TAG, "Download result did not include the temp file root. Ignoring.");
|
||||
return false;
|
||||
@@ -242,10 +242,12 @@ public class MbmsDownloadReceiver extends BroadcastReceiver {
|
||||
int result = intent.getIntExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT,
|
||||
MbmsDownloadSession.RESULT_CANCELLED);
|
||||
intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT, result);
|
||||
intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST, request);
|
||||
|
||||
if (result != MbmsDownloadSession.RESULT_SUCCESSFUL) {
|
||||
Log.i(LOG_TAG, "Download request indicated a failed download. Aborting.");
|
||||
context.sendBroadcast(intentForApp);
|
||||
setResultCode(RESULT_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -273,7 +275,6 @@ public class MbmsDownloadReceiver extends BroadcastReceiver {
|
||||
intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_COMPLETED_FILE_URI,
|
||||
stagedFileLocation);
|
||||
intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_FILE_INFO, completedFileInfo);
|
||||
intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST, request);
|
||||
|
||||
context.sendBroadcast(intentForApp);
|
||||
setResultCode(RESULT_OK);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.telephony.mbms;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.ContentResolver;
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
@@ -29,6 +30,7 @@ import android.telephony.mbms.vendor.VendorUtils;
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public final class UriPathPair implements Parcelable {
|
||||
private final Uri mFilePathUri;
|
||||
private final Uri mContentUri;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.telephony.mbms.vendor;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -34,6 +35,7 @@ import java.util.List;
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public class VendorUtils {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user