diff options
author | Andrew Lee <anwlee@google.com> | 2014-08-28 18:39:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-28 18:39:16 +0000 |
commit | 81289efcae107c292dfbff6fb7ee342848cdd5c9 (patch) | |
tree | ad9c1ddc27b901893ec49769e4c30640b8254448 /telecomm | |
parent | 832d351ca5e52aad640989c4b16298d3a9d119b6 (diff) | |
parent | 223ad1455ada00feee1ca89ccd7bad5afd8c680a (diff) | |
download | frameworks_base-81289efcae107c292dfbff6fb7ee342848cdd5c9.zip frameworks_base-81289efcae107c292dfbff6fb7ee342848cdd5c9.tar.gz frameworks_base-81289efcae107c292dfbff6fb7ee342848cdd5c9.tar.bz2 |
Merge "Add CallProperties class, and use to on ParcelableCall." into lmp-dev
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecomm/Call.java | 14 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/CallProperties.java | 26 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/ParcelableCall.java | 16 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/PhoneCapabilities.java | 1 |
4 files changed, 52 insertions, 5 deletions
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java index ecb0d4b..7c596c1 100644 --- a/telecomm/java/android/telecomm/Call.java +++ b/telecomm/java/android/telecomm/Call.java @@ -89,6 +89,7 @@ public final class Call { private final int mCallerDisplayNamePresentation; private final PhoneAccountHandle mAccountHandle; private final int mCallCapabilities; + private final int mCallProperties; private final int mDisconnectCauseCode; private final String mDisconnectCauseMessage; private final long mConnectTimeMillis; @@ -145,6 +146,14 @@ public final class Call { } /** + * @return A bitmask of the properties of the {@code Call}, as defined in + * {@link CallProperties}. + */ + public int getCallProperties() { + return mCallProperties; + } + + /** * @return For a {@link #STATE_DISCONNECTED} {@code Call}, the disconnect cause expressed * as a code chosen from among those declared in {@link DisconnectCause}. */ @@ -210,6 +219,7 @@ public final class Call { d.mCallerDisplayNamePresentation) && Objects.equals(mAccountHandle, d.mAccountHandle) && Objects.equals(mCallCapabilities, d.mCallCapabilities) && + Objects.equals(mCallProperties, d.mCallProperties) && Objects.equals(mDisconnectCauseCode, d.mDisconnectCauseCode) && Objects.equals(mDisconnectCauseMessage, d.mDisconnectCauseMessage) && Objects.equals(mConnectTimeMillis, d.mConnectTimeMillis) && @@ -230,6 +240,7 @@ public final class Call { Objects.hashCode(mCallerDisplayNamePresentation) + Objects.hashCode(mAccountHandle) + Objects.hashCode(mCallCapabilities) + + Objects.hashCode(mCallProperties) + Objects.hashCode(mDisconnectCauseCode) + Objects.hashCode(mDisconnectCauseMessage) + Objects.hashCode(mConnectTimeMillis) + @@ -247,6 +258,7 @@ public final class Call { int callerDisplayNamePresentation, PhoneAccountHandle accountHandle, int capabilities, + int properties, int disconnectCauseCode, String disconnectCauseMessage, long connectTimeMillis, @@ -260,6 +272,7 @@ public final class Call { mCallerDisplayNamePresentation = callerDisplayNamePresentation; mAccountHandle = accountHandle; mCallCapabilities = capabilities; + mCallProperties = properties; mDisconnectCauseCode = disconnectCauseCode; mDisconnectCauseMessage = disconnectCauseMessage; mConnectTimeMillis = connectTimeMillis; @@ -642,6 +655,7 @@ public final class Call { parcelableCall.getCallerDisplayNamePresentation(), parcelableCall.getAccountHandle(), parcelableCall.getCapabilities(), + parcelableCall.getProperties(), parcelableCall.getDisconnectCauseCode(), parcelableCall.getDisconnectCauseMsg(), parcelableCall.getConnectTimeMillis(), diff --git a/telecomm/java/android/telecomm/CallProperties.java b/telecomm/java/android/telecomm/CallProperties.java new file mode 100644 index 0000000..90eb0cb --- /dev/null +++ b/telecomm/java/android/telecomm/CallProperties.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package android.telecomm; + +/** + * Defines properties of a phone call which may be affected by changes to the call. + * @hide + */ +public class CallProperties { + /** Call is currently in a conference call. */ + public static final int CONFERENCE = 0x00000001; +} diff --git a/telecomm/java/android/telecomm/ParcelableCall.java b/telecomm/java/android/telecomm/ParcelableCall.java index 8098b94..a2aa192 100644 --- a/telecomm/java/android/telecomm/ParcelableCall.java +++ b/telecomm/java/android/telecomm/ParcelableCall.java @@ -40,6 +40,7 @@ public final class ParcelableCall implements Parcelable { private final String mDisconnectCauseMsg; private final List<String> mCannedSmsResponses; private final int mCapabilities; + private final int mProperties; private final long mConnectTimeMillis; private final Uri mHandle; private final int mHandlePresentation; @@ -63,6 +64,7 @@ public final class ParcelableCall implements Parcelable { String disconnectCauseMsg, List<String> cannedSmsResponses, int capabilities, + int properties, long connectTimeMillis, Uri handle, int handlePresentation, @@ -83,6 +85,7 @@ public final class ParcelableCall implements Parcelable { mDisconnectCauseMsg = disconnectCauseMsg; mCannedSmsResponses = cannedSmsResponses; mCapabilities = capabilities; + mProperties = properties; mConnectTimeMillis = connectTimeMillis; mHandle = handle; mHandlePresentation = handlePresentation; @@ -137,6 +140,9 @@ public final class ParcelableCall implements Parcelable { return mCapabilities; } + /** Bitmask of properties of the call. */ + public int getProperties() { return mProperties; } + /** The time that the call switched to the active state. */ public long getConnectTimeMillis() { return mConnectTimeMillis; @@ -246,6 +252,7 @@ public final class ParcelableCall implements Parcelable { List<String> cannedSmsResponses = new ArrayList<>(); source.readList(cannedSmsResponses, classLoader); int capabilities = source.readInt(); + int properties = source.readInt(); long connectTimeMillis = source.readLong(); Uri handle = source.readParcelable(classLoader); int handlePresentation = source.readInt(); @@ -264,10 +271,10 @@ public final class ParcelableCall implements Parcelable { source.readList(conferenceableCallIds, classLoader); Bundle extras = source.readParcelable(classLoader); return new ParcelableCall(id, state, disconnectCauseCode, disconnectCauseMsg, - cannedSmsResponses, capabilities, connectTimeMillis, handle, handlePresentation, - callerDisplayName, callerDisplayNamePresentation, gatewayInfo, - accountHandle, videoCallProvider, parentCallId, childCallIds, statusHints, - videoState, conferenceableCallIds, extras); + cannedSmsResponses, capabilities, properties, connectTimeMillis, handle, + handlePresentation, callerDisplayName, callerDisplayNamePresentation, + gatewayInfo, accountHandle, videoCallProvider, parentCallId, childCallIds, + statusHints, videoState, conferenceableCallIds, extras); } @Override @@ -291,6 +298,7 @@ public final class ParcelableCall implements Parcelable { destination.writeString(mDisconnectCauseMsg); destination.writeList(mCannedSmsResponses); destination.writeInt(mCapabilities); + destination.writeInt(mProperties); destination.writeLong(mConnectTimeMillis); destination.writeParcelable(mHandle, 0); destination.writeInt(mHandlePresentation); diff --git a/telecomm/java/android/telecomm/PhoneCapabilities.java b/telecomm/java/android/telecomm/PhoneCapabilities.java index 45168d5..0c6a1ef 100644 --- a/telecomm/java/android/telecomm/PhoneCapabilities.java +++ b/telecomm/java/android/telecomm/PhoneCapabilities.java @@ -19,7 +19,6 @@ package android.telecomm; /** * Defines capabilities a phone call can support, such as conference calling and video telephony. * Also defines properties of a phone call, such as whether it is using VoLTE technology. - */ public final class PhoneCapabilities { /** Call can currently be put on hold or unheld. */ |