Revert "Remove deprecated Telecom APIs"

This reverts commit a7c9046973.

Change-Id: I66d3d961988ff8dd330c9482c070bfca055f6cb8
This commit is contained in:
Narayan Kamath
2015-01-30 13:07:32 +00:00
parent a7c9046973
commit 12ca74e2a0
5 changed files with 39 additions and 3 deletions

View File

@@ -54,9 +54,14 @@ public final class AudioState implements Parcelable {
public static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET |
ROUTE_SPEAKER;
private final boolean isMuted;
private final int route;
private final int supportedRouteMask;
/** Note: Deprecated, please do not use if possible. */
@SystemApi public final boolean isMuted;
/** Note: Deprecated, please do not use if possible. */
@SystemApi public final int route;
/** Note: Deprecated, please do not use if possible. */
@SystemApi public final int supportedRouteMask;
public AudioState(boolean muted, int route, int supportedRouteMask) {
this.isMuted = muted;

View File

@@ -112,6 +112,11 @@ public abstract class Conference implements IConferenceable {
return mState;
}
/** @hide */
@Deprecated public final int getCapabilities() {
return getConnectionCapabilities();
}
/**
* Returns the capabilities of a conference. See {@code CAPABILITY_*} constants in class
* {@link Connection} for valid values.
@@ -276,6 +281,11 @@ public abstract class Conference implements IConferenceable {
return mDisconnectCause;
}
/** @hide */
@Deprecated public final void setCapabilities(int connectionCapabilities) {
setConnectionCapabilities(connectionCapabilities);
}
/**
* Sets the capabilities of a conference. See {@code CAPABILITY_*} constants of class
* {@link Connection} for valid values.

View File

@@ -839,6 +839,11 @@ public abstract class Connection implements IConferenceable {
return mConnectionCapabilities;
}
/** @hide */
@SystemApi @Deprecated public final int getCallCapabilities() {
return getConnectionCapabilities();
}
/**
* Sets the value of the {@link #getAddress()} property.
*
@@ -1026,6 +1031,11 @@ public abstract class Connection implements IConferenceable {
}
}
/** @hide */
@SystemApi @Deprecated public final void setCallCapabilities(int connectionCapabilities) {
setConnectionCapabilities(connectionCapabilities);
}
/**
* Sets the connection's capabilities as a bit mask of the {@code CAPABILITY_*} constants.
*

View File

@@ -164,6 +164,11 @@ public final class RemoteConference {
return mState;
}
/** @hide */
@Deprecated public final int getCallCapabilities() {
return getConnectionCapabilities();
}
public final int getConnectionCapabilities() {
return mConnectionCapabilities;
}

View File

@@ -73,6 +73,11 @@ public final class RemoteConnection {
*/
public void onRingbackRequested(RemoteConnection connection, boolean ringback) {}
/** @hide */
@Deprecated public void onCallCapabilitiesChanged(
RemoteConnection connection,
int callCapabilities) {}
/**
* Indicates that the call capabilities of this {@code RemoteConnection} have changed.
* See {@link #getConnectionCapabilities()}.
@@ -837,6 +842,7 @@ public final class RemoteConnection {
mConnectionCapabilities = connectionCapabilities;
for (Callback c : mCallbacks) {
c.onConnectionCapabilitiesChanged(this, connectionCapabilities);
c.onCallCapabilitiesChanged(this, connectionCapabilities);
}
}