Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a077229a authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-5e44d23882d545a38f0ea8d1f78a13fa"

* changes:
  Merge changes from topics "embms-cts-6", "embms-cts-5" am: f6b2b77e am: 2cd6464e am: 8fd59b38
  Add @TestApi for DownloadStateCallback CTS am: 63c5fd60 am: b96d49e9 am: caac5df3
parents cdee25d7 9c92cd2e
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -41458,6 +41458,7 @@ package android.telephony.mbms {
  }
  public final class FileInfo implements android.os.Parcelable {
    ctor public FileInfo(android.net.Uri, java.lang.String);
    method public int describeContents();
    method public java.lang.String getMimeType();
    method public android.net.Uri getUri();
@@ -41571,6 +41572,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 {
@@ -41602,6 +41611,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 {
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ public class DownloadStateCallback {
     * @hide
     */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef({ALL_UPDATES, PROGRESS_UPDATES, STATE_UPDATES})
    @IntDef(flag = true, value = {ALL_UPDATES, PROGRESS_UPDATES, STATE_UPDATES})
    public @interface FilterFlag {}

    /**
+23 −0
Original line number Diff line number Diff line
@@ -17,10 +17,13 @@
package android.telephony.mbms;

import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;

import java.util.Objects;

/**
 * Describes a single file that is available over MBMS.
 */
@@ -47,6 +50,7 @@ public final class FileInfo implements Parcelable {
     * @hide
     */
    @SystemApi
    @TestApi
    public FileInfo(Uri uri, String mimeType) {
        this.uri = uri;
        this.mimeType = mimeType;
@@ -82,4 +86,23 @@ public final class FileInfo implements Parcelable {
    public String getMimeType() {
        return mimeType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        FileInfo fileInfo = (FileInfo) o;
        return Objects.equals(uri, fileInfo.uri) &&
                Objects.equals(mimeType, fileInfo.mimeType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uri, mimeType);
    }
}
+6 −5
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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;
Loading