Loading telephony/java/android/telephony/MbmsDownloadManager.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -17,9 +17,10 @@ package android.telephony; package android.telephony; import android.content.Context; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.net.Uri; import android.os.RemoteException; import android.os.RemoteException; import android.telephony.mbms.DownloadCallback; import android.telephony.mbms.IDownloadCallback; import android.telephony.mbms.DownloadRequest; import android.telephony.mbms.DownloadRequest; import android.telephony.mbms.DownloadStatus; import android.telephony.mbms.DownloadStatus; import android.telephony.mbms.IMbmsDownloadManagerCallback; import android.telephony.mbms.IMbmsDownloadManagerCallback; Loading Loading @@ -242,8 +243,9 @@ public class MbmsDownloadManager { * * * Asynchronous errors through the listener include any of the errors * Asynchronous errors through the listener include any of the errors */ */ public DownloadRequest download(DownloadRequest downloadRequest, DownloadCallback listener) { public DownloadRequest download(DownloadRequest request, IDownloadCallback listener) { return null; request.setAppName(mDownloadAppName); return request; } } /** /** Loading telephony/java/android/telephony/mbms/DownloadRequest.java +21 −3 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.net.Uri; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import java.lang.IllegalStateException; import java.net.URISyntaxException; import java.net.URISyntaxException; /** /** Loading @@ -36,6 +37,7 @@ public class DownloadRequest implements Parcelable { private Uri dest; private Uri dest; private int sub; private int sub; private String appIntent; private String appIntent; private String appName; // not the Android app Name, the embms app Name public Builder setId(int id) { public Builder setId(int id) { this.id = id; this.id = id; Loading Loading @@ -68,7 +70,7 @@ public class DownloadRequest implements Parcelable { } } public DownloadRequest build() { public DownloadRequest build() { return new DownloadRequest(id, serviceInfo, source, dest, sub, appIntent); return new DownloadRequest(id, serviceInfo, source, dest, sub, appIntent, appName); } } } } Loading @@ -78,16 +80,18 @@ public class DownloadRequest implements Parcelable { private final Uri destinationUri; private final Uri destinationUri; private final int subId; private final int subId; private final String serializedResultIntentForApp; private final String serializedResultIntentForApp; private String appName; // not the Android app Name, the embms app name private DownloadRequest(int id, FileServiceInfo serviceInfo, private DownloadRequest(int id, FileServiceInfo serviceInfo, Uri source, Uri dest, Uri source, Uri dest, int sub, String appIntent) { int sub, String appIntent, String name) { downloadId = id; downloadId = id; fileServiceInfo = serviceInfo; fileServiceInfo = serviceInfo; sourceUri = source; sourceUri = source; destinationUri = dest; destinationUri = dest; subId = sub; subId = sub; serializedResultIntentForApp = appIntent; serializedResultIntentForApp = appIntent; appName = name; } } public static DownloadRequest copy(DownloadRequest other) { public static DownloadRequest copy(DownloadRequest other) { Loading @@ -101,6 +105,7 @@ public class DownloadRequest implements Parcelable { destinationUri = dr.destinationUri; destinationUri = dr.destinationUri; subId = dr.subId; subId = dr.subId; serializedResultIntentForApp = dr.serializedResultIntentForApp; serializedResultIntentForApp = dr.serializedResultIntentForApp; appName = dr.appName; } } private DownloadRequest(Parcel in) { private DownloadRequest(Parcel in) { Loading @@ -110,6 +115,7 @@ public class DownloadRequest implements Parcelable { destinationUri = in.readParcelable(getClass().getClassLoader()); destinationUri = in.readParcelable(getClass().getClassLoader()); subId = in.readInt(); subId = in.readInt(); serializedResultIntentForApp = in.readString(); serializedResultIntentForApp = in.readString(); appName = in.readString(); } } public int describeContents() { public int describeContents() { Loading @@ -123,6 +129,7 @@ public class DownloadRequest implements Parcelable { out.writeParcelable(destinationUri, flags); out.writeParcelable(destinationUri, flags); out.writeInt(subId); out.writeInt(subId); out.writeString(serializedResultIntentForApp); out.writeString(serializedResultIntentForApp); out.writeString(appName); } } public int getDownloadId() { public int getDownloadId() { Loading Loading @@ -153,6 +160,18 @@ public class DownloadRequest implements Parcelable { } } } } /** @hide */ public synchronized void setAppName(String newAppName) { if (appName != null) { throw new IllegalStateException("Attempting to reset appName"); } appName = newAppName; } public String getAppName() { return appName; } public static final Parcelable.Creator<DownloadRequest> CREATOR = public static final Parcelable.Creator<DownloadRequest> CREATOR = new Parcelable.Creator<DownloadRequest>() { new Parcelable.Creator<DownloadRequest>() { public DownloadRequest createFromParcel(Parcel in) { public DownloadRequest createFromParcel(Parcel in) { Loading @@ -162,5 +181,4 @@ public class DownloadRequest implements Parcelable { return new DownloadRequest[size]; return new DownloadRequest[size]; } } }; }; } } telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl +5 −5 Original line number Original line Diff line number Diff line Loading @@ -50,20 +50,20 @@ interface IMbmsDownloadService /** /** * should move the params into a DownloadRequest parcelable * should move the params into a DownloadRequest parcelable */ */ int download(String appName, in DownloadRequest downloadRequest, IDownloadCallback listener); int download(in DownloadRequest downloadRequest, IDownloadCallback listener); List<DownloadRequest> listPendingDownloads(String appName); List<DownloadRequest> listPendingDownloads(String appName, int subscriptionId); int cancelDownload(String appName, in DownloadRequest downloadRequest); int cancelDownload(in DownloadRequest downloadRequest); DownloadStatus getDownloadStatus(String appName, in DownloadRequest downloadRequest); DownloadStatus getDownloadStatus(in DownloadRequest downloadRequest); /* /* * named this for 2 reasons: * named this for 2 reasons: * 1 don't want 'State' here as it conflicts with 'Status' of the previous function * 1 don't want 'State' here as it conflicts with 'Status' of the previous function * 2 want to perfect typing 'Knowledge' * 2 want to perfect typing 'Knowledge' */ */ void resetDownloadKnowledge(String appName, in DownloadRequest downloadRequest); void resetDownloadKnowledge(in DownloadRequest downloadRequest); /** /** * End of life for this MbmsDownloadManager. * End of life for this MbmsDownloadManager. Loading telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -43,34 +43,34 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { } } @Override @Override public int download(String appName, DownloadRequest downloadRequest, IDownloadCallback listener) public int download(DownloadRequest downloadRequest, IDownloadCallback listener) throws RemoteException { throws RemoteException { return 0; return 0; } } @Override @Override public List<DownloadRequest> listPendingDownloads(String appName) throws RemoteException { public List<DownloadRequest> listPendingDownloads(String appName, int subscriptionId) throws RemoteException { return null; return null; } } @Override @Override public int cancelDownload(String appName, DownloadRequest downloadRequest) public int cancelDownload(DownloadRequest downloadRequest) throws RemoteException { throws RemoteException { return 0; return 0; } } @Override @Override public DownloadStatus getDownloadStatus(String appName, DownloadRequest downloadRequest) public DownloadStatus getDownloadStatus(DownloadRequest downloadRequest) throws RemoteException { throws RemoteException { return null; return null; } } @Override @Override public void resetDownloadKnowledge(String appName, DownloadRequest downloadRequest) public void resetDownloadKnowledge(DownloadRequest downloadRequest) throws RemoteException { throws RemoteException { } } @Override @Override public void dispose(String appName, int subId) throws RemoteException { public void dispose(String appName, int subscriptionId) throws RemoteException { } } } } Loading
telephony/java/android/telephony/MbmsDownloadManager.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -17,9 +17,10 @@ package android.telephony; package android.telephony; import android.content.Context; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.net.Uri; import android.os.RemoteException; import android.os.RemoteException; import android.telephony.mbms.DownloadCallback; import android.telephony.mbms.IDownloadCallback; import android.telephony.mbms.DownloadRequest; import android.telephony.mbms.DownloadRequest; import android.telephony.mbms.DownloadStatus; import android.telephony.mbms.DownloadStatus; import android.telephony.mbms.IMbmsDownloadManagerCallback; import android.telephony.mbms.IMbmsDownloadManagerCallback; Loading Loading @@ -242,8 +243,9 @@ public class MbmsDownloadManager { * * * Asynchronous errors through the listener include any of the errors * Asynchronous errors through the listener include any of the errors */ */ public DownloadRequest download(DownloadRequest downloadRequest, DownloadCallback listener) { public DownloadRequest download(DownloadRequest request, IDownloadCallback listener) { return null; request.setAppName(mDownloadAppName); return request; } } /** /** Loading
telephony/java/android/telephony/mbms/DownloadRequest.java +21 −3 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.net.Uri; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import java.lang.IllegalStateException; import java.net.URISyntaxException; import java.net.URISyntaxException; /** /** Loading @@ -36,6 +37,7 @@ public class DownloadRequest implements Parcelable { private Uri dest; private Uri dest; private int sub; private int sub; private String appIntent; private String appIntent; private String appName; // not the Android app Name, the embms app Name public Builder setId(int id) { public Builder setId(int id) { this.id = id; this.id = id; Loading Loading @@ -68,7 +70,7 @@ public class DownloadRequest implements Parcelable { } } public DownloadRequest build() { public DownloadRequest build() { return new DownloadRequest(id, serviceInfo, source, dest, sub, appIntent); return new DownloadRequest(id, serviceInfo, source, dest, sub, appIntent, appName); } } } } Loading @@ -78,16 +80,18 @@ public class DownloadRequest implements Parcelable { private final Uri destinationUri; private final Uri destinationUri; private final int subId; private final int subId; private final String serializedResultIntentForApp; private final String serializedResultIntentForApp; private String appName; // not the Android app Name, the embms app name private DownloadRequest(int id, FileServiceInfo serviceInfo, private DownloadRequest(int id, FileServiceInfo serviceInfo, Uri source, Uri dest, Uri source, Uri dest, int sub, String appIntent) { int sub, String appIntent, String name) { downloadId = id; downloadId = id; fileServiceInfo = serviceInfo; fileServiceInfo = serviceInfo; sourceUri = source; sourceUri = source; destinationUri = dest; destinationUri = dest; subId = sub; subId = sub; serializedResultIntentForApp = appIntent; serializedResultIntentForApp = appIntent; appName = name; } } public static DownloadRequest copy(DownloadRequest other) { public static DownloadRequest copy(DownloadRequest other) { Loading @@ -101,6 +105,7 @@ public class DownloadRequest implements Parcelable { destinationUri = dr.destinationUri; destinationUri = dr.destinationUri; subId = dr.subId; subId = dr.subId; serializedResultIntentForApp = dr.serializedResultIntentForApp; serializedResultIntentForApp = dr.serializedResultIntentForApp; appName = dr.appName; } } private DownloadRequest(Parcel in) { private DownloadRequest(Parcel in) { Loading @@ -110,6 +115,7 @@ public class DownloadRequest implements Parcelable { destinationUri = in.readParcelable(getClass().getClassLoader()); destinationUri = in.readParcelable(getClass().getClassLoader()); subId = in.readInt(); subId = in.readInt(); serializedResultIntentForApp = in.readString(); serializedResultIntentForApp = in.readString(); appName = in.readString(); } } public int describeContents() { public int describeContents() { Loading @@ -123,6 +129,7 @@ public class DownloadRequest implements Parcelable { out.writeParcelable(destinationUri, flags); out.writeParcelable(destinationUri, flags); out.writeInt(subId); out.writeInt(subId); out.writeString(serializedResultIntentForApp); out.writeString(serializedResultIntentForApp); out.writeString(appName); } } public int getDownloadId() { public int getDownloadId() { Loading Loading @@ -153,6 +160,18 @@ public class DownloadRequest implements Parcelable { } } } } /** @hide */ public synchronized void setAppName(String newAppName) { if (appName != null) { throw new IllegalStateException("Attempting to reset appName"); } appName = newAppName; } public String getAppName() { return appName; } public static final Parcelable.Creator<DownloadRequest> CREATOR = public static final Parcelable.Creator<DownloadRequest> CREATOR = new Parcelable.Creator<DownloadRequest>() { new Parcelable.Creator<DownloadRequest>() { public DownloadRequest createFromParcel(Parcel in) { public DownloadRequest createFromParcel(Parcel in) { Loading @@ -162,5 +181,4 @@ public class DownloadRequest implements Parcelable { return new DownloadRequest[size]; return new DownloadRequest[size]; } } }; }; } }
telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl +5 −5 Original line number Original line Diff line number Diff line Loading @@ -50,20 +50,20 @@ interface IMbmsDownloadService /** /** * should move the params into a DownloadRequest parcelable * should move the params into a DownloadRequest parcelable */ */ int download(String appName, in DownloadRequest downloadRequest, IDownloadCallback listener); int download(in DownloadRequest downloadRequest, IDownloadCallback listener); List<DownloadRequest> listPendingDownloads(String appName); List<DownloadRequest> listPendingDownloads(String appName, int subscriptionId); int cancelDownload(String appName, in DownloadRequest downloadRequest); int cancelDownload(in DownloadRequest downloadRequest); DownloadStatus getDownloadStatus(String appName, in DownloadRequest downloadRequest); DownloadStatus getDownloadStatus(in DownloadRequest downloadRequest); /* /* * named this for 2 reasons: * named this for 2 reasons: * 1 don't want 'State' here as it conflicts with 'Status' of the previous function * 1 don't want 'State' here as it conflicts with 'Status' of the previous function * 2 want to perfect typing 'Knowledge' * 2 want to perfect typing 'Knowledge' */ */ void resetDownloadKnowledge(String appName, in DownloadRequest downloadRequest); void resetDownloadKnowledge(in DownloadRequest downloadRequest); /** /** * End of life for this MbmsDownloadManager. * End of life for this MbmsDownloadManager. Loading
telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -43,34 +43,34 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { } } @Override @Override public int download(String appName, DownloadRequest downloadRequest, IDownloadCallback listener) public int download(DownloadRequest downloadRequest, IDownloadCallback listener) throws RemoteException { throws RemoteException { return 0; return 0; } } @Override @Override public List<DownloadRequest> listPendingDownloads(String appName) throws RemoteException { public List<DownloadRequest> listPendingDownloads(String appName, int subscriptionId) throws RemoteException { return null; return null; } } @Override @Override public int cancelDownload(String appName, DownloadRequest downloadRequest) public int cancelDownload(DownloadRequest downloadRequest) throws RemoteException { throws RemoteException { return 0; return 0; } } @Override @Override public DownloadStatus getDownloadStatus(String appName, DownloadRequest downloadRequest) public DownloadStatus getDownloadStatus(DownloadRequest downloadRequest) throws RemoteException { throws RemoteException { return null; return null; } } @Override @Override public void resetDownloadKnowledge(String appName, DownloadRequest downloadRequest) public void resetDownloadKnowledge(DownloadRequest downloadRequest) throws RemoteException { throws RemoteException { } } @Override @Override public void dispose(String appName, int subId) throws RemoteException { public void dispose(String appName, int subscriptionId) throws RemoteException { } } } }