Merge "API review cleanups/changes." am: 9324d6513b am: dd4bc7c69c
am: c49b011151
Change-Id: Ib3d76474bef8c911b2ec6a61b916e38af0a3b861
This commit is contained in:
@@ -222,6 +222,7 @@ public abstract class ConnectionService extends Service {
|
||||
|
||||
@Override
|
||||
public void createConnectionFailed(
|
||||
PhoneAccountHandle connectionManagerPhoneAccount,
|
||||
String callId,
|
||||
ConnectionRequest request,
|
||||
boolean isIncoming,
|
||||
@@ -232,6 +233,7 @@ public abstract class ConnectionService extends Service {
|
||||
args.arg1 = callId;
|
||||
args.arg2 = request;
|
||||
args.arg3 = Log.createSubsession();
|
||||
args.arg4 = connectionManagerPhoneAccount;
|
||||
args.argi1 = isIncoming ? 1 : 0;
|
||||
mHandler.obtainMessage(MSG_CREATE_CONNECTION_FAILED, args).sendToTarget();
|
||||
} finally {
|
||||
@@ -636,6 +638,8 @@ public abstract class ConnectionService extends Service {
|
||||
final String id = (String) args.arg1;
|
||||
final ConnectionRequest request = (ConnectionRequest) args.arg2;
|
||||
final boolean isIncoming = args.argi1 == 1;
|
||||
final PhoneAccountHandle connectionMgrPhoneAccount =
|
||||
(PhoneAccountHandle) args.arg4;
|
||||
if (!mAreAccountsInitialized) {
|
||||
Log.d(this, "Enqueueing pre-init request %s", id);
|
||||
mPreInitializationConnectionRequests.add(
|
||||
@@ -644,12 +648,14 @@ public abstract class ConnectionService extends Service {
|
||||
null /*lock*/) {
|
||||
@Override
|
||||
public void loggedRun() {
|
||||
createConnectionFailed(id, request, isIncoming);
|
||||
createConnectionFailed(connectionMgrPhoneAccount, id,
|
||||
request, isIncoming);
|
||||
}
|
||||
}.prepare());
|
||||
} else {
|
||||
Log.i(this, "createConnectionFailed %s", id);
|
||||
createConnectionFailed(id, request, isIncoming);
|
||||
createConnectionFailed(connectionMgrPhoneAccount, id, request,
|
||||
isIncoming);
|
||||
}
|
||||
} finally {
|
||||
args.recycle();
|
||||
@@ -1355,14 +1361,15 @@ public abstract class ConnectionService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
private void createConnectionFailed(final String callId, final ConnectionRequest request,
|
||||
boolean isIncoming) {
|
||||
private void createConnectionFailed(final PhoneAccountHandle callManagerAccount,
|
||||
final String callId, final ConnectionRequest request,
|
||||
boolean isIncoming) {
|
||||
|
||||
Log.i(this, "createConnectionFailed %s", callId);
|
||||
if (isIncoming) {
|
||||
onCreateIncomingConnectionFailed(request);
|
||||
onCreateIncomingConnectionFailed(callManagerAccount, request);
|
||||
} else {
|
||||
onCreateOutgoingConnectionFailed(request);
|
||||
onCreateOutgoingConnectionFailed(callManagerAccount, request);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1839,9 +1846,12 @@ public abstract class ConnectionService extends Service {
|
||||
* <p>
|
||||
* See {@link TelecomManager#isIncomingCallPermitted(PhoneAccountHandle)} for more information.
|
||||
*
|
||||
* @param connectionManagerPhoneAccount See description at
|
||||
* {@link #onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)}.
|
||||
* @param request The incoming connection request.
|
||||
*/
|
||||
public void onCreateIncomingConnectionFailed(ConnectionRequest request) {
|
||||
public void onCreateIncomingConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount,
|
||||
ConnectionRequest request) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1855,9 +1865,12 @@ public abstract class ConnectionService extends Service {
|
||||
* <p>
|
||||
* See {@link TelecomManager#isOutgoingCallPermitted(PhoneAccountHandle)} for more information.
|
||||
*
|
||||
* @param connectionManagerPhoneAccount See description at
|
||||
* {@link #onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)}.
|
||||
* @param request The outgoing connection request.
|
||||
*/
|
||||
public void onCreateOutgoingConnectionFailed(ConnectionRequest request) {
|
||||
public void onCreateOutgoingConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount,
|
||||
ConnectionRequest request) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user