diff options
18 files changed, 232 insertions, 238 deletions
diff --git a/api/current.txt b/api/current.txt index 02f485a..6a67645 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28885,13 +28885,17 @@ package android.service.carrier { method public android.os.IBinder onBind(android.content.Intent); method public void onDownloadMms(android.net.Uri, int, android.net.Uri, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Integer>); method public void onFilterSms(android.service.carrier.MessagePdu, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Boolean>); - method public void onSendDataSms(byte[], int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public deprecated void onSendDataSms(byte[], int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public void onSendDataSms(byte[], int, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); method public void onSendMms(android.net.Uri, int, android.net.Uri, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMmsResult>); - method public void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>); - method public void onSendTextSms(java.lang.String, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public deprecated void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>); + method public void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>); + method public deprecated void onSendTextSms(java.lang.String, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public void onSendTextSms(java.lang.String, int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); field public static final int DOWNLOAD_STATUS_ERROR = 2; // 0x2 field public static final int DOWNLOAD_STATUS_OK = 0; // 0x0 field public static final int DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1 + field public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 1; // 0x1 field public static final int SEND_STATUS_ERROR = 2; // 0x2 field public static final int SEND_STATUS_OK = 0; // 0x0 field public static final int SEND_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1 @@ -30822,6 +30826,7 @@ package android.telecom { method public static boolean isPaused(int); method public static boolean isReceptionEnabled(int); method public static boolean isTransmissionEnabled(int); + method public static java.lang.String videoStateToString(int); field public static final int AUDIO_ONLY = 0; // 0x0 field public static final int BIDIRECTIONAL = 3; // 0x3 field public static final int PAUSED = 4; // 0x4 @@ -31242,7 +31247,8 @@ package android.telephony { public class SmsMessage { method public static int[] calculateLength(java.lang.CharSequence, boolean); method public static int[] calculateLength(java.lang.String, boolean); - method public static android.telephony.SmsMessage createFromPdu(byte[]); + method public static deprecated android.telephony.SmsMessage createFromPdu(byte[]); + method public static android.telephony.SmsMessage createFromPdu(byte[], java.lang.String); method public java.lang.String getDisplayMessageBody(); method public java.lang.String getDisplayOriginatingAddress(); method public java.lang.String getEmailBody(); diff --git a/api/system-current.txt b/api/system-current.txt index dc26357..2e06164 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -20885,6 +20885,7 @@ package android.net.wifi { field public static final int REASON_INVALID_LISTENER = -3; // 0xfffffffd field public static final int REASON_INVALID_REQUEST = -4; // 0xfffffffc field public static final int REASON_NOT_AVAILABLE = -2; // 0xfffffffe + field public static final int REASON_PERMISSION_DENIED = -5; // 0xfffffffb field public static final int REASON_UNSPECIFIED = -1; // 0xffffffff field public static final int RTT_BW_10_SUPPORT = 2; // 0x2 field public static final int RTT_BW_160_SUPPORT = 32; // 0x20 @@ -30896,13 +30897,17 @@ package android.service.carrier { method public android.os.IBinder onBind(android.content.Intent); method public void onDownloadMms(android.net.Uri, int, android.net.Uri, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Integer>); method public void onFilterSms(android.service.carrier.MessagePdu, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Boolean>); - method public void onSendDataSms(byte[], int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public deprecated void onSendDataSms(byte[], int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public void onSendDataSms(byte[], int, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); method public void onSendMms(android.net.Uri, int, android.net.Uri, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMmsResult>); - method public void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>); - method public void onSendTextSms(java.lang.String, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public deprecated void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>); + method public void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>); + method public deprecated void onSendTextSms(java.lang.String, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); + method public void onSendTextSms(java.lang.String, int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>); field public static final int DOWNLOAD_STATUS_ERROR = 2; // 0x2 field public static final int DOWNLOAD_STATUS_OK = 0; // 0x0 field public static final int DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1 + field public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 1; // 0x1 field public static final int SEND_STATUS_ERROR = 2; // 0x2 field public static final int SEND_STATUS_OK = 0; // 0x0 field public static final int SEND_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1 @@ -32982,6 +32987,7 @@ package android.telecom { method public static boolean isPaused(int); method public static boolean isReceptionEnabled(int); method public static boolean isTransmissionEnabled(int); + method public static java.lang.String videoStateToString(int); field public static final int AUDIO_ONLY = 0; // 0x0 field public static final int BIDIRECTIONAL = 3; // 0x3 field public static final int PAUSED = 4; // 0x4 @@ -33404,7 +33410,8 @@ package android.telephony { public class SmsMessage { method public static int[] calculateLength(java.lang.CharSequence, boolean); method public static int[] calculateLength(java.lang.String, boolean); - method public static android.telephony.SmsMessage createFromPdu(byte[]); + method public static deprecated android.telephony.SmsMessage createFromPdu(byte[]); + method public static android.telephony.SmsMessage createFromPdu(byte[], java.lang.String); method public java.lang.String getDisplayMessageBody(); method public java.lang.String getDisplayOriginatingAddress(); method public java.lang.String getEmailBody(); diff --git a/core/java/android/service/carrier/CarrierMessagingService.java b/core/java/android/service/carrier/CarrierMessagingService.java index 0592a84..d7bf10c 100644 --- a/core/java/android/service/carrier/CarrierMessagingService.java +++ b/core/java/android/service/carrier/CarrierMessagingService.java @@ -80,6 +80,11 @@ public abstract class CarrierMessagingService extends Service { */ public static final int DOWNLOAD_STATUS_ERROR = 2; + /** + * Flag to request SMS delivery status report. + */ + public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 1; + private final ICarrierMessagingWrapper mWrapper = new ICarrierMessagingWrapper(); /** @@ -103,12 +108,14 @@ public abstract class CarrierMessagingService extends Service { /** * Override this method to intercept text SMSs sent from the device. + * @deprecated Override {@link #onSendTextSms} below instead. * * @param text the text to send * @param subId SMS subscription ID of the SIM * @param destAddress phone number of the recipient of the message * @param callback result callback. Call with a {@link SendSmsResult}. */ + @Deprecated public void onSendTextSms( @NonNull String text, int subId, @NonNull String destAddress, @NonNull ResultCallback<SendSmsResult> callback) { @@ -120,7 +127,25 @@ public abstract class CarrierMessagingService extends Service { } /** + * Override this method to intercept text SMSs sent from the device. + * + * @param text the text to send + * @param subId SMS subscription ID of the SIM + * @param destAddress phone number of the recipient of the message + * @param sendSmsFlag Flag for sending SMS. Acceptable values are 0 and + * {@link #SEND_FLAG_REQUEST_DELIVERY_STATUS}. + * @param callback result callback. Call with a {@link SendSmsResult}. + */ + public void onSendTextSms( + @NonNull String text, int subId, @NonNull String destAddress, + int sendSmsFlag, @NonNull ResultCallback<SendSmsResult> callback) { + // optional + onSendTextSms(text, subId, destAddress, callback); + } + + /** * Override this method to intercept binary SMSs sent from the device. + * @deprecated Override {@link #onSendDataSms} below instead. * * @param data the binary content * @param subId SMS subscription ID of the SIM @@ -128,6 +153,7 @@ public abstract class CarrierMessagingService extends Service { * @param destPort the destination port * @param callback result callback. Call with a {@link SendSmsResult}. */ + @Deprecated public void onSendDataSms(@NonNull byte[] data, int subId, @NonNull String destAddress, int destPort, @NonNull ResultCallback<SendSmsResult> callback) { @@ -139,13 +165,33 @@ public abstract class CarrierMessagingService extends Service { } /** + * Override this method to intercept binary SMSs sent from the device. + * + * @param data the binary content + * @param subId SMS subscription ID of the SIM + * @param destAddress phone number of the recipient of the message + * @param destPort the destination port + * @param sendSmsFlag Flag for sending SMS. Acceptable values are 0 and + * {@link #SEND_FLAG_REQUEST_DELIVERY_STATUS}. + * @param callback result callback. Call with a {@link SendSmsResult}. + */ + public void onSendDataSms(@NonNull byte[] data, int subId, + @NonNull String destAddress, int destPort, int sendSmsFlag, + @NonNull ResultCallback<SendSmsResult> callback) { + // optional + onSendDataSms(data, subId, destAddress, destPort, callback); + } + + /** * Override this method to intercept long SMSs sent from the device. + * @deprecated Override {@link #onSendMultipartTextSms} below instead. * * @param parts a {@link List} of the message parts * @param subId SMS subscription ID of the SIM * @param destAddress phone number of the recipient of the message * @param callback result callback. Call with a {@link SendMultipartSmsResult}. */ + @Deprecated public void onSendMultipartTextSms(@NonNull List<String> parts, int subId, @NonNull String destAddress, @NonNull ResultCallback<SendMultipartSmsResult> callback) { @@ -158,6 +204,23 @@ public abstract class CarrierMessagingService extends Service { } /** + * Override this method to intercept long SMSs sent from the device. + * + * @param parts a {@link List} of the message parts + * @param subId SMS subscription ID of the SIM + * @param destAddress phone number of the recipient of the message + * @param sendSmsFlag Flag for sending SMS. Acceptable values are 0 and + * {@link #SEND_FLAG_REQUEST_DELIVERY_STATUS}. + * @param callback result callback. Call with a {@link SendMultipartSmsResult}. + */ + public void onSendMultipartTextSms(@NonNull List<String> parts, + int subId, @NonNull String destAddress, int sendSmsFlag, + @NonNull ResultCallback<SendMultipartSmsResult> callback) { + // optional + onSendMultipartTextSms(parts, subId, destAddress, callback); + } + + /** * Override this method to intercept MMSs sent from the device. * * @param pduUri the content provider URI of the PDU to send @@ -355,8 +418,9 @@ public abstract class CarrierMessagingService extends Service { @Override public void sendTextSms(String text, int subId, String destAddress, - final ICarrierMessagingCallback callback) { - onSendTextSms(text, subId, destAddress, new ResultCallback<SendSmsResult>() { + int sendSmsFlag, final ICarrierMessagingCallback callback) { + onSendTextSms(text, subId, destAddress, sendSmsFlag, + new ResultCallback<SendSmsResult>() { @Override public void onReceiveResult(final SendSmsResult result) throws RemoteException { callback.onSendSmsComplete(result.getSendStatus(), result.getMessageRef()); @@ -366,8 +430,9 @@ public abstract class CarrierMessagingService extends Service { @Override public void sendDataSms(byte[] data, int subId, String destAddress, int destPort, - final ICarrierMessagingCallback callback) { - onSendDataSms(data, subId, destAddress, destPort, new ResultCallback<SendSmsResult>() { + int sendSmsFlag, final ICarrierMessagingCallback callback) { + onSendDataSms(data, subId, destAddress, destPort, sendSmsFlag, + new ResultCallback<SendSmsResult>() { @Override public void onReceiveResult(final SendSmsResult result) throws RemoteException { callback.onSendSmsComplete(result.getSendStatus(), result.getMessageRef()); @@ -377,8 +442,8 @@ public abstract class CarrierMessagingService extends Service { @Override public void sendMultipartTextSms(List<String> parts, int subId, String destAddress, - final ICarrierMessagingCallback callback) { - onSendMultipartTextSms(parts, subId, destAddress, + int sendSmsFlag, final ICarrierMessagingCallback callback) { + onSendMultipartTextSms(parts, subId, destAddress, sendSmsFlag, new ResultCallback<SendMultipartSmsResult>() { @Override public void onReceiveResult(final SendMultipartSmsResult result) diff --git a/core/java/android/service/carrier/ICarrierMessagingService.aidl b/core/java/android/service/carrier/ICarrierMessagingService.aidl index 40a9047..2d96c3d 100644 --- a/core/java/android/service/carrier/ICarrierMessagingService.aidl +++ b/core/java/android/service/carrier/ICarrierMessagingService.aidl @@ -48,9 +48,10 @@ oneway interface ICarrierMessagingService { * @param text the text to send * @param subId SMS subscription ID of the SIM * @param destAddress phone number of the recipient of the message + * @param sendSmsFlag flag for sending SMS * @param callback the callback to notify upon completion */ - void sendTextSms(String text, int subId, String destAddress, + void sendTextSms(String text, int subId, String destAddress, int sendSmsFlag, in ICarrierMessagingCallback callback); /** @@ -62,10 +63,11 @@ oneway interface ICarrierMessagingService { * @param subId SMS subscription ID of the SIM * @param destAddress phone number of the recipient of the message * @param destPort port number of the recipient of the message + * @param sendSmsFlag flag for sending SMS * @param callback the callback to notify upon completion */ void sendDataSms(in byte[] data, int subId, String destAddress, int destPort, - in ICarrierMessagingCallback callback); + int sendSmsFlag, in ICarrierMessagingCallback callback); /** * Request sending a new multi-part text SMS from the device. @@ -75,10 +77,11 @@ oneway interface ICarrierMessagingService { * @param parts the parts of the multi-part text SMS to send * @param subId SMS subscription ID of the SIM * @param destAddress phone number of the recipient of the message + * @param sendSmsFlag flag for sending SMS * @param callback the callback to notify upon completion */ void sendMultipartTextSms(in List<String> parts, int subId, String destAddress, - in ICarrierMessagingCallback callback); + int sendSmsFlag, in ICarrierMessagingCallback callback); /** * Request sending a new MMS PDU from the device. diff --git a/services/core/java/com/android/server/net/DelayedDiskWrite.java b/services/core/java/com/android/server/net/DelayedDiskWrite.java index 6ed277d..8f09eb7 100644 --- a/services/core/java/com/android/server/net/DelayedDiskWrite.java +++ b/services/core/java/com/android/server/net/DelayedDiskWrite.java @@ -38,6 +38,10 @@ public class DelayedDiskWrite { } public void write(final String filePath, final Writer w) { + write(filePath, w, true); + } + + public void write(final String filePath, final Writer w, final boolean open) { if (TextUtils.isEmpty(filePath)) { throw new IllegalArgumentException("empty file path"); } @@ -54,16 +58,18 @@ public class DelayedDiskWrite { mDiskWriteHandler.post(new Runnable() { @Override public void run() { - doWrite(filePath, w); + doWrite(filePath, w, open); } }); } - private void doWrite(String filePath, Writer w) { + private void doWrite(String filePath, Writer w, boolean open) { DataOutputStream out = null; try { - out = new DataOutputStream(new BufferedOutputStream( + if (open) { + out = new DataOutputStream(new BufferedOutputStream( new FileOutputStream(filePath))); + } w.onWriteCalled(out); } catch (IOException e) { loge("Error writing data file " + filePath); diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index cd10050..3060f40 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -339,6 +339,7 @@ public abstract class Connection implements Conferenceable { public void onConferenceParticipantsChanged(Connection c, List<ConferenceParticipant> participants) {} public void onConferenceStarted() {} + public void onConferenceMergeFailed(Connection c) {} } public static abstract class VideoProvider { @@ -1544,6 +1545,17 @@ public abstract class Connection implements Conferenceable { } /** + * Notifies listeners that the merge request failed. + * + * @hide + */ + protected final void notifyConferenceMergeFailed() { + for (Listener l : mListeners) { + l.onConferenceMergeFailed(this); + } + } + + /** * Notifies listeners of a change to conference participant(s). * * @param conferenceParticipants The participants. diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index c039acf..4185651 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -562,6 +562,14 @@ public abstract class ConnectionService extends Service { mAdapter.setIsConferenced(id, conferenceId); } } + + @Override + public void onConferenceMergeFailed(Connection connection) { + String id = mIdByConnection.get(connection); + if (id != null) { + mAdapter.onConferenceMergeFailed(id); + } + } }; /** {@inheritDoc} */ diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapter.java b/telecomm/java/android/telecom/ConnectionServiceAdapter.java index d026a28..a87dbe7 100644 --- a/telecomm/java/android/telecom/ConnectionServiceAdapter.java +++ b/telecomm/java/android/telecom/ConnectionServiceAdapter.java @@ -203,6 +203,21 @@ final class ConnectionServiceAdapter implements DeathRecipient { } /** + * Indicates that the merge request on this call has failed. + * + * @param callId The unique ID of the call being conferenced. + */ + void onConferenceMergeFailed(String callId) { + for (IConnectionServiceAdapter adapter : mAdapters) { + try { + Log.d(this, "merge failed for call %s", callId); + adapter.setConferenceMergeFailed(callId); + } catch (RemoteException ignored) { + } + } + } + + /** * Indicates that the call no longer exists. Can be used with either a call or a conference * call. * diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java index 429f296..db815ba 100644 --- a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +++ b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java @@ -59,6 +59,7 @@ final class ConnectionServiceAdapterServant { private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20; private static final int MSG_ADD_EXISTING_CONNECTION = 21; private static final int MSG_ON_POST_DIAL_CHAR = 22; + private static final int MSG_SET_CONFERENCE_MERGE_FAILED = 23; private final IConnectionServiceAdapter mDelegate; @@ -220,6 +221,15 @@ final class ConnectionServiceAdapterServant { } break; } + case MSG_SET_CONFERENCE_MERGE_FAILED: { + SomeArgs args = (SomeArgs) msg.obj; + try { + mDelegate.setConferenceMergeFailed((String) args.arg1); + } finally { + args.recycle(); + } + break; + } } } }; @@ -280,6 +290,13 @@ final class ConnectionServiceAdapterServant { } @Override + public void setConferenceMergeFailed(String callId) { + SomeArgs args = SomeArgs.obtain(); + args.arg1 = callId; + mHandler.obtainMessage(MSG_SET_CONFERENCE_MERGE_FAILED, args).sendToTarget(); + } + + @Override public void setIsConferenced(String callId, String conferenceCallId) { SomeArgs args = SomeArgs.obtain(); args.arg1 = callId; diff --git a/telecomm/java/android/telecom/ParcelableConference.java b/telecomm/java/android/telecom/ParcelableConference.java index e54e79d..3d0c558 100644 --- a/telecomm/java/android/telecom/ParcelableConference.java +++ b/telecomm/java/android/telecom/ParcelableConference.java @@ -121,11 +121,10 @@ public final class ParcelableConference implements Parcelable { List<String> connectionIds = new ArrayList<>(2); source.readList(connectionIds, classLoader); long connectTimeMillis = source.readLong(); - StatusHints statusHints = source.readParcelable(classLoader); - IVideoProvider videoCallProvider = IVideoProvider.Stub.asInterface(source.readStrongBinder()); int videoState = source.readInt(); + StatusHints statusHints = source.readParcelable(classLoader); return new ParcelableConference(phoneAccount, state, capabilities, connectionIds, videoCallProvider, videoState, connectTimeMillis, statusHints); diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java index a9b725b..0208744 100644 --- a/telecomm/java/android/telecom/RemoteConnectionService.java +++ b/telecomm/java/android/telecom/RemoteConnectionService.java @@ -176,6 +176,13 @@ final class RemoteConnectionService { } @Override + public void setConferenceMergeFailed(String callId) { + // Nothing to do here. + // The event has already been handled and there is no state to update + // in the underlying connection or conference objects + } + + @Override public void addConferenceCall( final String callId, ParcelableConference parcel) { diff --git a/telecomm/java/android/telecom/VideoProfile.java b/telecomm/java/android/telecom/VideoProfile.java index 2fd438a..902fddb 100644 --- a/telecomm/java/android/telecom/VideoProfile.java +++ b/telecomm/java/android/telecom/VideoProfile.java @@ -144,6 +144,17 @@ public class VideoProfile implements Parcelable { dest.writeInt(mQuality); } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("[VideoProfile videoState = "); + sb.append(VideoState.videoStateToString(mVideoState)); + sb.append(" videoQuality = "); + sb.append(mQuality); + sb.append("]"); + return sb.toString(); + } + /** * The video state of the call, stored as a bit-field describing whether video transmission and * receipt it enabled, as well as whether the video is currently muted. @@ -241,5 +252,30 @@ public class VideoProfile implements Parcelable { private static boolean hasState(int videoState, int state) { return (videoState & state) == state; } + + /** + * Generates a string representation of a {@link VideoState}. + * + * @param videoState The video state. + * @return String representation of the {@link VideoState}. + */ + public static String videoStateToString(int videoState) { + StringBuilder sb = new StringBuilder(); + sb.append("Audio"); + + if (VideoProfile.VideoState.isTransmissionEnabled(videoState)) { + sb.append(" Tx"); + } + + if (VideoProfile.VideoState.isReceptionEnabled(videoState)) { + sb.append(" Rx"); + } + + if (VideoProfile.VideoState.isPaused(videoState)) { + sb.append(" Pause"); + } + + return sb.toString(); + } } } diff --git a/telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl b/telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl index 7e7e9cc..67e2edb 100644 --- a/telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl +++ b/telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl @@ -56,6 +56,8 @@ oneway interface IConnectionServiceAdapter { void setIsConferenced(String callId, String conferenceCallId); + void setConferenceMergeFailed(String callId); + void addConferenceCall(String callId, in ParcelableConference conference); void removeCall(String callId); diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index e4c003a..33e52bf 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -1129,5 +1129,19 @@ public class SubscriptionManager { logd("getSimStateForSubscriber: simState=" + simState + " subId=" + subId); return simState; } + + /** + * @return true if the sub ID is active. i.e. The sub ID corresponds to a known subscription + * and the SIM providing the subscription is present in a slot and in "LOADED" state. + * @hide + */ + public boolean isActiveSubId(int subId) { + try { + ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); + return iSub.isActiveSubId(subId); + } catch (RemoteException ex) { + } + return false; + } } diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl index 24bdb7a..21c94c2 100644 --- a/telephony/java/com/android/internal/telephony/ISms.aidl +++ b/telephony/java/com/android/internal/telephony/ISms.aidl @@ -37,13 +37,6 @@ import com.android.internal.telephony.SmsRawData; interface ISms { /** * Retrieves all messages currently stored on ICC. - * - * @return list of SmsRawData of all sms on ICC - */ - List<SmsRawData> getAllMessagesFromIccEf(String callingPkg); - - /** - * Retrieves all messages currently stored on ICC. * @param subId the subId id. * @return list of SmsRawData of all sms on ICC */ @@ -57,20 +50,6 @@ interface ISms { * STATUS_ON_ICC_UNREAD, STATUS_ON_ICC_SENT, * STATUS_ON_ICC_UNSENT, STATUS_ON_ICC_FREE) * @param pdu the raw PDU to store - * @return success or not - * - */ - boolean updateMessageOnIccEf(String callingPkg, int messageIndex, int newStatus, - in byte[] pdu); - - /** - * Update the specified message on the ICC. - * - * @param messageIndex record index of message to update - * @param newStatus new message status (STATUS_ON_ICC_READ, - * STATUS_ON_ICC_UNREAD, STATUS_ON_ICC_SENT, - * STATUS_ON_ICC_UNSENT, STATUS_ON_ICC_FREE) - * @param pdu the raw PDU to store * @param subId the subId id. * @return success or not * @@ -84,17 +63,6 @@ interface ISms { * @param pdu the raw PDU to store * @param status message status (STATUS_ON_ICC_READ, STATUS_ON_ICC_UNREAD, * STATUS_ON_ICC_SENT, STATUS_ON_ICC_UNSENT) - * @return success or not - * - */ - boolean copyMessageToIccEf(String callingPkg, int status, in byte[] pdu, in byte[] smsc); - - /** - * Copy a raw SMS PDU to the ICC. - * - * @param pdu the raw PDU to store - * @param status message status (STATUS_ON_ICC_READ, STATUS_ON_ICC_UNREAD, - * STATUS_ON_ICC_SENT, STATUS_ON_ICC_UNSENT) * @param subId the subId id. * @return success or not * @@ -124,32 +92,6 @@ interface ISms { * @param deliveryIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is delivered to the recipient. The * raw pdu of the status report is in the extended data ("pdu"). - */ - void sendData(String callingPkg, in String destAddr, in String scAddr, in int destPort, - in byte[] data, in PendingIntent sentIntent, in PendingIntent deliveryIntent); - - /** - * Send a data SMS. - * - * @param smsc the SMSC to send the message through, or NULL for the - * default SMSC - * @param data the body of the message to send - * @param sentIntent if not NULL this <code>PendingIntent</code> is - * broadcast when the message is sucessfully sent, or failed. - * The result code will be <code>Activity.RESULT_OK<code> for success, - * or one of these errors:<br> - * <code>RESULT_ERROR_GENERIC_FAILURE</code><br> - * <code>RESULT_ERROR_RADIO_OFF</code><br> - * <code>RESULT_ERROR_NULL_PDU</code><br> - * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include - * the extra "errorCode" containing a radio technology specific value, - * generally only useful for troubleshooting.<br> - * The per-application based SMS control checks sentIntent. If sentIntent - * is NULL the caller will be checked against all unknown applicaitons, - * which cause smaller number of SMS to be sent in checking period. - * @param deliveryIntent if not NULL this <code>PendingIntent</code> is - * broadcast when the message is delivered to the recipient. The - * raw pdu of the status report is in the extended data ("pdu"). * @param subId the subId id. */ void sendDataForSubscriber(int subId, String callingPkg, in String destAddr, @@ -206,32 +148,6 @@ interface ISms { * @param deliveryIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is delivered to the recipient. The * raw pdu of the status report is in the extended data ("pdu"). - */ - void sendText(String callingPkg, in String destAddr, in String scAddr, in String text, - in PendingIntent sentIntent, in PendingIntent deliveryIntent); - - /** - * Send an SMS. - * - * @param smsc the SMSC to send the message through, or NULL for the - * default SMSC - * @param text the body of the message to send - * @param sentIntent if not NULL this <code>PendingIntent</code> is - * broadcast when the message is sucessfully sent, or failed. - * The result code will be <code>Activity.RESULT_OK<code> for success, - * or one of these errors:<br> - * <code>RESULT_ERROR_GENERIC_FAILURE</code><br> - * <code>RESULT_ERROR_RADIO_OFF</code><br> - * <code>RESULT_ERROR_NULL_PDU</code><br> - * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include - * the extra "errorCode" containing a radio technology specific value, - * generally only useful for troubleshooting.<br> - * The per-application based SMS control checks sentIntent. If sentIntent - * is NULL the caller will be checked against all unknown applications, - * which cause smaller number of SMS to be sent in checking period. - * @param deliveryIntent if not NULL this <code>PendingIntent</code> is - * broadcast when the message is delivered to the recipient. The - * raw pdu of the status report is in the extended data ("pdu"). * @param subId the subId on which the SMS has to be sent. */ void sendTextForSubscriber(in int subId, String callingPkg, in String destAddr, @@ -269,6 +185,7 @@ interface ISms { /** * Inject an SMS PDU into the android platform. * + * @param subId the subId on which the SMS has to be injected. * @param pdu is the byte array of pdu to be injected into android application framework * @param format is the format of SMS pdu (android.telephony.SmsMessage.FORMAT_3GPP or * android.telephony.SmsMessage.FORMAT_3GPP2) @@ -277,33 +194,8 @@ interface ISms { * android application framework. This intent is broadcasted at * the same time an SMS received from radio is acknowledged back. */ - void injectSmsPdu(in byte[] pdu, String format, in PendingIntent receivedIntent); - - /** - * Send a multi-part text based SMS. - * - * @param destinationAddress the address to send the message to - * @param scAddress is the service center address or null to use - * the current default SMSC - * @param parts an <code>ArrayList</code> of strings that, in order, - * comprise the original message - * @param sentIntents if not null, an <code>ArrayList</code> of - * <code>PendingIntent</code>s (one for each message part) that is - * broadcast when the corresponding message part has been sent. - * The result code will be <code>Activity.RESULT_OK<code> for success, - * or one of these errors: - * <code>RESULT_ERROR_GENERIC_FAILURE</code> - * <code>RESULT_ERROR_RADIO_OFF</code> - * <code>RESULT_ERROR_NULL_PDU</code>. - * @param deliveryIntents if not null, an <code>ArrayList</code> of - * <code>PendingIntent</code>s (one for each message part) that is - * broadcast when the corresponding message part has been delivered - * to the recipient. The raw pdu of the status report is in the - * extended data ("pdu"). - */ - void sendMultipartText(String callingPkg, in String destinationAddress, in String scAddress, - in List<String> parts, in List<PendingIntent> sentIntents, - in List<PendingIntent> deliveryIntents); + void injectSmsPduForSubscriber( + int subId, in byte[] pdu, String format, in PendingIntent receivedIntent); /** * Send a multi-part text based SMS. @@ -342,31 +234,13 @@ interface ISms { * * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or * C.R1001-G (3GPP2) - * @param ranType as defined in class SmsManager, the value can be one of these: - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA - * @return true if successful, false otherwise - * - * @see #disableCellBroadcast(int, int) - */ - boolean enableCellBroadcast(int messageIdentifier, int ranType); - - /** - * Enable reception of cell broadcast (SMS-CB) messages with the given - * message identifier and RAN type. The RAN type specify this message ID - * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients - * enable the same message identifier, they must both disable it for the - * device to stop receiving those messages. - * - * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or - * C.R1001-G (3GPP2) * @param subId for which the broadcast has to be enabled * @param ranType as defined in class SmsManager, the value can be one of these: * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA * @return true if successful, false otherwise * - * @see #disableCellBroadcast(int, int) + * @see #disableCellBroadcastForSubscriber(int, int, int) */ boolean enableCellBroadcastForSubscriber(int subId, int messageIdentifier, int ranType); @@ -379,56 +253,18 @@ interface ISms { * * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or * C.R1001-G (3GPP2) - * @param ranType as defined in class SmsManager, the value can be one of these: - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA - * @return true if successful, false otherwise - * - * @see #enableCellBroadcast(int, int) - */ - boolean disableCellBroadcast(int messageIdentifier, int ranType); - - /** - * Disable reception of cell broadcast (SMS-CB) messages with the given - * message identifier and RAN type. The RAN type specify this message ID - * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients - * enable the same message identifier, they must both disable it for the - * device to stop receiving those messages. - * - * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or - * C.R1001-G (3GPP2) * @param subId for which the broadcast has to be disabled * @param ranType as defined in class SmsManager, the value can be one of these: * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA * @return true if successful, false otherwise * - * @see #enableCellBroadcast(int, int) + * @see #enableCellBroadcastForSubscriber(int, int, int) */ boolean disableCellBroadcastForSubscriber(int subId, int messageIdentifier, int ranType); /* * Enable reception of cell broadcast (SMS-CB) messages with the given - * message identifier range and RAN type. The RAN type specify this message - * ID range belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different - * clients enable a message identifier range, they must both disable it for - * the device to stop receiving those messages. - * - * @param startMessageId first message identifier as specified in TS 23.041 (3GPP) or - * C.R1001-G (3GPP2) - * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or - * C.R1001-G (3GPP2) - * @param ranType as defined in class SmsManager, the value can be one of these: - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA - * @return true if successful, false otherwise - * - * @see #disableCellBroadcastRange(int, int, int) - */ - boolean enableCellBroadcastRange(int startMessageId, int endMessageId, int ranType); - - /* - * Enable reception of cell broadcast (SMS-CB) messages with the given * message identifier range and RAN type. The RAN type specify this message ID range * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients enable * a message identifier range, they must both disable it for the device @@ -444,7 +280,7 @@ interface ISms { * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA * @return true if successful, false otherwise * - * @see #disableCellBroadcastRange(int, int, int) + * @see #disableCellBroadcastRangeForSubscriber(int, int, int, int) */ boolean enableCellBroadcastRangeForSubscriber(int subId, int startMessageId, int endMessageId, int ranType); @@ -460,33 +296,13 @@ interface ISms { * C.R1001-G (3GPP2) * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or * C.R1001-G (3GPP2) - * @param ranType as defined in class SmsManager, the value can be one of these: - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM - * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA - * @return true if successful, false otherwise - * - * @see #enableCellBroadcastRange(int, int, int) - */ - boolean disableCellBroadcastRange(int startMessageId, int endMessageId, int ranType); - - /** - * Disable reception of cell broadcast (SMS-CB) messages with the given - * message identifier range and RAN type. The RAN type specify this message ID range - * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients enable - * a message identifier range, they must both disable it for the device - * to stop receiving those messages. - * - * @param startMessageId first message identifier as specified in TS 23.041 (3GPP) or - * C.R1001-G (3GPP2) - * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or - * C.R1001-G (3GPP2) * @param subId for which the broadcast has to be disabled * @param ranType as defined in class SmsManager, the value can be one of these: * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM * android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA * @return true if successful, false otherwise * - * @see #enableCellBroadcastRange(int, int, int, int) + * @see #enableCellBroadcastRangeForSubscriber(int, int, int, int) */ boolean disableCellBroadcastRangeForSubscriber(int subId, int startMessageId, int endMessageId, int ranType); @@ -518,20 +334,10 @@ interface ISms { /** * SMS over IMS is supported if IMS is registered and SMS is supported * on IMS. - * - * @return true if SMS over IMS is supported, false otherwise - * - * @see #getImsSmsFormat() - */ - boolean isImsSmsSupported(); - - /** - * SMS over IMS is supported if IMS is registered and SMS is supported - * on IMS. * @param subId for subId which isImsSmsSupported is queried * @return true if SMS over IMS is supported, false otherwise * - * @see #getImsSmsFormat() + * @see #getImsSmsFormatForSubscriber(int) */ boolean isImsSmsSupportedForSubscriber(int subId); @@ -552,24 +358,12 @@ interface ISms { /** * Gets SMS format supported on IMS. SMS over IMS format is * either 3GPP or 3GPP2. - * - * @return android.telephony.SmsMessage.FORMAT_3GPP, - * android.telephony.SmsMessage.FORMAT_3GPP2 - * or android.telephony.SmsMessage.FORMAT_UNKNOWN - * - * @see #isImsSmsSupported() - */ - String getImsSmsFormat(); - - /** - * Gets SMS format supported on IMS. SMS over IMS format is - * either 3GPP or 3GPP2. * @param subId for subId which getImsSmsFormat is queried * @return android.telephony.SmsMessage.FORMAT_3GPP, * android.telephony.SmsMessage.FORMAT_3GPP2 * or android.telephony.SmsMessage.FORMAT_UNKNOWN * - * @see #isImsSmsSupported() + * @see #isImsSmsSupportedForSubscriber(int) */ String getImsSmsFormatForSubscriber(int subId); diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl index 3f8aca0..1037f2d 100755 --- a/telephony/java/com/android/internal/telephony/ISub.aidl +++ b/telephony/java/com/android/internal/telephony/ISub.aidl @@ -185,4 +185,5 @@ interface ISub { */ int getSimStateForSubscriber(int subId); + boolean isActiveSubId(int subId); } diff --git a/wifi/java/android/net/wifi/RttManager.java b/wifi/java/android/net/wifi/RttManager.java index d2fb0dd..dde8dba 100644 --- a/wifi/java/android/net/wifi/RttManager.java +++ b/wifi/java/android/net/wifi/RttManager.java @@ -134,6 +134,8 @@ public class RttManager { public static final int REASON_NOT_AVAILABLE = -2; public static final int REASON_INVALID_LISTENER = -3; public static final int REASON_INVALID_REQUEST = -4; + /** Do not have required permission */ + public static final int REASON_PERMISSION_DENIED = -5; public static final String DESCRIPTION_KEY = "android.net.wifi.RttManager.Description"; diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index b731316..a38a96e 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -926,7 +926,7 @@ public class WifiConfiguration implements Parcelable { public boolean isValid() { String reason = strIsValid(); if (reason != null) { - Log.e("WFII", "WiFi Config not valid: " + reason); + Log.e(TAG, "WiFi Config not valid: " + reason); return false; } else { |