am 3441f3c5: am 9eb532f5: Merge "Pass through video state when answering a call." into lmp-dev
* commit '3441f3c5da64c441f1fe9c4be06e3aeac87b9f5f': Pass through video state when answering a call.
This commit is contained in:
@@ -28027,7 +28027,7 @@ package android.telecomm {
|
||||
|
||||
public final class Call {
|
||||
method public void addListener(android.telecomm.Call.Listener);
|
||||
method public void answer();
|
||||
method public void answer(int);
|
||||
method public void conference();
|
||||
method public void disconnect();
|
||||
method public android.telecomm.RemoteCallVideoProvider getCallVideoProvider();
|
||||
@@ -28195,7 +28195,7 @@ package android.telecomm {
|
||||
method public final boolean isConferenceConnection();
|
||||
method public final boolean isRequestingRingback();
|
||||
method protected void onAbort();
|
||||
method protected void onAnswer();
|
||||
method protected void onAnswer(int);
|
||||
method protected void onChildrenChanged(java.util.List<android.telecomm.Connection>);
|
||||
method protected void onDisconnect();
|
||||
method protected void onHold();
|
||||
@@ -28282,7 +28282,7 @@ package android.telecomm {
|
||||
}
|
||||
|
||||
public final class InCallAdapter {
|
||||
method public void answerCall(java.lang.String);
|
||||
method public void answerCall(java.lang.String, int);
|
||||
method public void disconnectCall(java.lang.String);
|
||||
method public void holdCall(java.lang.String);
|
||||
method public void mute(boolean);
|
||||
@@ -28396,7 +28396,7 @@ package android.telecomm {
|
||||
public final class RemoteConnection {
|
||||
method public void abort();
|
||||
method public void addListener(android.telecomm.RemoteConnection.Listener);
|
||||
method public void answer();
|
||||
method public void answer(int);
|
||||
method public void disconnect();
|
||||
method public boolean getAudioModeIsVoip();
|
||||
method public int getCallCapabilities();
|
||||
|
||||
@@ -354,9 +354,10 @@ public final class Call {
|
||||
|
||||
/**
|
||||
* Instructs this {@link #STATE_RINGING} {@code Call} to answer.
|
||||
* @param videoState The video state in which to answer the call.
|
||||
*/
|
||||
public void answer() {
|
||||
mInCallAdapter.answerCall(mTelecommCallId);
|
||||
public void answer(int videoState) {
|
||||
mInCallAdapter.answerCall(mTelecommCallId, videoState);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -486,8 +486,10 @@ public abstract class Connection {
|
||||
/**
|
||||
* Notifies this Connection, which is in {@link State#RINGING}, of
|
||||
* a request to accept.
|
||||
*
|
||||
* @param videoState The video state in which to answer the call.
|
||||
*/
|
||||
protected void onAnswer() {}
|
||||
protected void onAnswer(int videoState) {}
|
||||
|
||||
/**
|
||||
* Notifies this Connection, which is in {@link State#RINGING}, of
|
||||
|
||||
@@ -121,8 +121,11 @@ public abstract class ConnectionService extends Service {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void answer(String callId) {
|
||||
mHandler.obtainMessage(MSG_ANSWER, callId).sendToTarget();
|
||||
public void answer(String callId, int videoState) {
|
||||
SomeArgs args = SomeArgs.obtain();
|
||||
args.arg1 = callId;
|
||||
args.arg2 = videoState;
|
||||
mHandler.obtainMessage(MSG_ANSWER, args).sendToTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -209,9 +212,17 @@ public abstract class ConnectionService extends Service {
|
||||
case MSG_ABORT:
|
||||
abort((String) msg.obj);
|
||||
break;
|
||||
case MSG_ANSWER:
|
||||
answer((String) msg.obj);
|
||||
case MSG_ANSWER: {
|
||||
SomeArgs args = (SomeArgs) msg.obj;
|
||||
try {
|
||||
String callId = (String) args.arg1;
|
||||
int videoState = (int) args.arg2;
|
||||
answer(callId, videoState);
|
||||
} finally {
|
||||
args.recycle();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MSG_REJECT:
|
||||
reject((String) msg.obj);
|
||||
break;
|
||||
@@ -428,9 +439,9 @@ public abstract class ConnectionService extends Service {
|
||||
findConnectionForAction(callId, "abort").onAbort();
|
||||
}
|
||||
|
||||
private void answer(String callId) {
|
||||
private void answer(String callId, int videoState) {
|
||||
Log.d(this, "answer %s", callId);
|
||||
findConnectionForAction(callId, "answer").onAnswer();
|
||||
findConnectionForAction(callId, "answer").onAnswer(videoState);
|
||||
}
|
||||
|
||||
private void reject(String callId) {
|
||||
|
||||
@@ -45,10 +45,11 @@ public final class InCallAdapter {
|
||||
* Instructs Telecomm to answer the specified call.
|
||||
*
|
||||
* @param callId The identifier of the call to answer.
|
||||
* @param videoState The video state in which to answer the call.
|
||||
*/
|
||||
public void answerCall(String callId) {
|
||||
public void answerCall(String callId, int videoState) {
|
||||
try {
|
||||
mAdapter.answerCall(callId);
|
||||
mAdapter.answerCall(callId, videoState);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,10 +129,10 @@ public final class RemoteConnection {
|
||||
}
|
||||
}
|
||||
|
||||
public void answer() {
|
||||
public void answer(int videoState) {
|
||||
try {
|
||||
if (mConnected) {
|
||||
mConnectionService.answer(mConnectionId);
|
||||
mConnectionService.answer(mConnectionId, videoState);
|
||||
}
|
||||
} catch (RemoteException ignored) {
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ oneway interface IConnectionService {
|
||||
|
||||
void abort(String callId);
|
||||
|
||||
void answer(String callId);
|
||||
void answer(String callId, int videoState);
|
||||
|
||||
void reject(String callId);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import android.telecomm.PhoneAccount;
|
||||
* {@hide}
|
||||
*/
|
||||
oneway interface IInCallAdapter {
|
||||
void answerCall(String callId);
|
||||
void answerCall(String callId, int videoState);
|
||||
|
||||
void rejectCall(String callId, boolean rejectWithMessage, String textMessage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user