am da5e8ba0: am f3280041: Merge "Add Properties to Call.Details." into mnc-dev

* commit 'da5e8ba09879f6801566a0e00199dff33f1cb384':
  Add Properties to Call.Details.
This commit is contained in:
Andrew Lee
2015-05-01 18:48:25 +00:00
committed by Android Git Automerger
4 changed files with 99 additions and 80 deletions

View File

@@ -30327,17 +30327,17 @@ package android.telecom {
method public int getHandlePresentation(); method public int getHandlePresentation();
method public android.telecom.StatusHints getStatusHints(); method public android.telecom.StatusHints getStatusHints();
method public int getVideoState(); method public int getVideoState();
method public static boolean hasProperty(int, int);
method public boolean hasProperty(int);
method public static java.lang.String propertiesToString(int);
field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000 field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000 field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
field public static final int CAPABILITY_GENERIC_CONFERENCE = 16384; // 0x4000
field public static final int CAPABILITY_HIGH_DEF_AUDIO = 32768; // 0x8000
field public static final int CAPABILITY_HOLD = 1; // 0x1 field public static final int CAPABILITY_HOLD = 1; // 0x1
field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80 field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4 field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
field public static final int CAPABILITY_MUTE = 64; // 0x40 field public static final int CAPABILITY_MUTE = 64; // 0x40
field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20 field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000 field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
field public static final int CAPABILITY_SHOW_CALLBACK_NUMBER = 131072; // 0x20000
field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300 field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300
field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100 field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100
field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200 field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200
@@ -30346,12 +30346,11 @@ package android.telecom {
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800 field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2 field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8 field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
field public static final int CAPABILITY_WIFI = 65536; // 0x10000 field public static final int PROPERTY_CONFERENCE = 1; // 0x1
} field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
public class CallProperties { field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
ctor public CallProperties(); field public static final int PROPERTY_WIFI = 8; // 0x8
field public static final int CONFERENCE = 1; // 0x1
} }
public final class CameraCapabilities implements android.os.Parcelable { public final class CameraCapabilities implements android.os.Parcelable {

View File

@@ -32443,17 +32443,17 @@ package android.telecom {
method public int getHandlePresentation(); method public int getHandlePresentation();
method public android.telecom.StatusHints getStatusHints(); method public android.telecom.StatusHints getStatusHints();
method public int getVideoState(); method public int getVideoState();
method public static boolean hasProperty(int, int);
method public boolean hasProperty(int);
method public static java.lang.String propertiesToString(int);
field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000 field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000 field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
field public static final int CAPABILITY_GENERIC_CONFERENCE = 16384; // 0x4000
field public static final int CAPABILITY_HIGH_DEF_AUDIO = 32768; // 0x8000
field public static final int CAPABILITY_HOLD = 1; // 0x1 field public static final int CAPABILITY_HOLD = 1; // 0x1
field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80 field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4 field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
field public static final int CAPABILITY_MUTE = 64; // 0x40 field public static final int CAPABILITY_MUTE = 64; // 0x40
field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20 field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000 field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
field public static final int CAPABILITY_SHOW_CALLBACK_NUMBER = 131072; // 0x20000
field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300 field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300
field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100 field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100
field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200 field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200
@@ -32462,18 +32462,17 @@ package android.telecom {
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800 field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2 field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8 field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
field public static final int CAPABILITY_WIFI = 65536; // 0x10000 field public static final int PROPERTY_CONFERENCE = 1; // 0x1
field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_WIFI = 8; // 0x8
} }
public static abstract deprecated class Call.Listener extends android.telecom.Call.Callback { public static abstract deprecated class Call.Listener extends android.telecom.Call.Callback {
ctor public Call.Listener(); ctor public Call.Listener();
} }
public class CallProperties {
ctor public CallProperties();
field public static final int CONFERENCE = 1; // 0x1
}
public final class CameraCapabilities implements android.os.Parcelable { public final class CameraCapabilities implements android.os.Parcelable {
ctor public CameraCapabilities(int, int); ctor public CameraCapabilities(int, int);
method public int describeContents(); method public int describeContents();

View File

@@ -132,7 +132,7 @@ public final class Call {
/** /**
* @hide * @hide
*/ */
public static final int CAPABILITY_UNUSED = 0x00000010; public static final int CAPABILITY_UNUSED_1 = 0x00000010;
/** Call supports responding via text option. */ /** Call supports responding via text option. */
public static final int CAPABILITY_RESPOND_VIA_TEXT = 0x00000020; public static final int CAPABILITY_RESPOND_VIA_TEXT = 0x00000020;
@@ -188,27 +188,6 @@ public final class Call {
*/ */
public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 0x00002000; public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 0x00002000;
/**
* Whether the call is a generic conference, where we do not know the precise state of
* participants in the conference (eg. on CDMA).
*/
public static final int CAPABILITY_GENERIC_CONFERENCE = 0x00004000;
/**
* Call is using high definition audio.
*/
public static final int CAPABILITY_HIGH_DEF_AUDIO = 0x00008000;
/**
* Call is using WIFI.
*/
public static final int CAPABILITY_WIFI = 0x00010000;
/**
* Indicates that the current device callback number should be shown.
*/
public static final int CAPABILITY_SHOW_CALLBACK_NUMBER = 0x00020000;
/** /**
* Speed up audio setup for MT call. * Speed up audio setup for MT call.
* @hide * @hide
@@ -228,7 +207,37 @@ public final class Call {
public static final int CAPABILITY_CAN_PAUSE_VIDEO = 0x00100000; public static final int CAPABILITY_CAN_PAUSE_VIDEO = 0x00100000;
//****************************************************************************************** //******************************************************************************************
// Next CAPABILITY value: 0x00200000 // Next CAPABILITY value: 0x00004000
//******************************************************************************************
/**
* Whether the call is currently a conference.
*/
public static final int PROPERTY_CONFERENCE = 0x00000001;
/**
* Whether the call is a generic conference, where we do not know the precise state of
* participants in the conference (eg. on CDMA).
*/
public static final int PROPERTY_GENERIC_CONFERENCE = 0x00000002;
/**
* Whether the call is made while the device is in emergency callback mode.
*/
public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 0x00000004;
/**
* Connection is using WIFI.
*/
public static final int PROPERTY_WIFI = 0x00000008;
/**
* Call is using high definition audio.
*/
public static final int PROPERTY_HIGH_DEF_AUDIO = 0x00000010;
//******************************************************************************************
// Next PROPERTY value: 0x00000020
//****************************************************************************************** //******************************************************************************************
private final Uri mHandle; private final Uri mHandle;
@@ -314,18 +323,6 @@ public final class Call {
if (can(capabilities, CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL)) { if (can(capabilities, CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL)) {
builder.append(" CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL"); builder.append(" CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL");
} }
if (can(capabilities, CAPABILITY_HIGH_DEF_AUDIO)) {
builder.append(" CAPABILITY_HIGH_DEF_AUDIO");
}
if (can(capabilities, CAPABILITY_WIFI)) {
builder.append(" CAPABILITY_WIFI");
}
if (can(capabilities, CAPABILITY_GENERIC_CONFERENCE)) {
builder.append(" CAPABILITY_GENERIC_CONFERENCE");
}
if (can(capabilities, CAPABILITY_SHOW_CALLBACK_NUMBER)) {
builder.append(" CAPABILITY_SHOW_CALLBACK_NUMBER");
}
if (can(capabilities, CAPABILITY_SPEED_UP_MT_AUDIO)) { if (can(capabilities, CAPABILITY_SPEED_UP_MT_AUDIO)) {
builder.append(" CAPABILITY_SPEED_UP_MT_AUDIO"); builder.append(" CAPABILITY_SPEED_UP_MT_AUDIO");
} }
@@ -339,6 +336,55 @@ public final class Call {
return builder.toString(); return builder.toString();
} }
/**
* Whether the supplied properties includes the specified property.
*
* @param properties A bit field of properties.
* @param property The property to check properties for.
* @return Whether the specified property is supported.
*/
public static boolean hasProperty(int properties, int property) {
return (properties & property) != 0;
}
/**
* Whether the properties of this {@code Details} includes the specified property.
*
* @param property The property to check properties for.
* @return Whether the specified property is supported.
*/
public boolean hasProperty(int property) {
return hasProperty(mCallProperties, property);
}
/**
* Render a set of property bits ({@code PROPERTY_*}) as a human readable string.
*
* @param properties A property bit field.
* @return A human readable string representation.
*/
public static String propertiesToString(int properties) {
StringBuilder builder = new StringBuilder();
builder.append("[Properties:");
if (hasProperty(properties, PROPERTY_CONFERENCE)) {
builder.append(" PROPERTY_CONFERENCE");
}
if (hasProperty(properties, PROPERTY_GENERIC_CONFERENCE)) {
builder.append(" PROPERTY_GENERIC_CONFERENCE");
}
if (hasProperty(properties, PROPERTY_WIFI)) {
builder.append(" PROPERTY_WIFI");
}
if (hasProperty(properties, PROPERTY_HIGH_DEF_AUDIO)) {
builder.append(" PROPERTY_HIGH_DEF_AUDIO");
}
if (hasProperty(properties, PROPERTY_EMERGENCY_CALLBACK_MODE)) {
builder.append(" EMERGENCY_CALLBACK_MODE");
}
builder.append("]");
return builder.toString();
}
/** /**
* @return The handle (e.g., phone number) to which the {@code Call} is currently * @return The handle (e.g., phone number) to which the {@code Call} is currently
* connected. * connected.
@@ -387,8 +433,8 @@ public final class Call {
} }
/** /**
* @return A bitmask of the properties of the {@code Call}, as defined in * @return A bitmask of the properties of the {@code Call}, as defined by the various
* {@link CallProperties}. * {@code PROPERTY_*} constants in this class.
*/ */
public int getCallProperties() { public int getCallProperties() {
return mCallProperties; return mCallProperties;

View File

@@ -1,25 +0,0 @@
/*
* 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.telecom;
/**
* Defines properties of a phone call which may be affected by changes to the call.
*/
public class CallProperties {
/** Call is currently in a conference call. */
public static final int CONFERENCE = 0x00000001;
}