summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rwxr-xr-xtelecomm/java/android/telecom/ConnectionService.java45
1 files changed, 21 insertions, 24 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index ce9ce7b6c092..bf4d9fb1f6c8 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
@@ -758,19 +759,15 @@ public abstract class ConnectionService extends Service {
}
@Override
- public void onCallFilteringCompleted(String callId, boolean isBlocked, boolean isInContacts,
- CallScreeningService.ParcelableCallResponse callScreeningResponse,
- boolean isResponseFromSystemDialer,
+ public void onCallFilteringCompleted(String callId,
+ Connection.CallFilteringCompletionInfo completionInfo,
Session.Info sessionInfo) {
Log.startSession(sessionInfo, SESSION_CALL_FILTERING_COMPLETED);
try {
SomeArgs args = SomeArgs.obtain();
args.arg1 = callId;
- args.arg2 = isBlocked;
- args.arg3 = isInContacts;
- args.arg4 = callScreeningResponse;
- args.arg5 = isResponseFromSystemDialer;
- args.arg6 = Log.createSubsession();
+ args.arg2 = completionInfo;
+ args.arg3 = Log.createSubsession();
mHandler.obtainMessage(MSG_ON_CALL_FILTERING_COMPLETED, args).sendToTarget();
} finally {
Log.endSession();
@@ -1441,16 +1438,12 @@ public abstract class ConnectionService extends Service {
case MSG_ON_CALL_FILTERING_COMPLETED: {
SomeArgs args = (SomeArgs) msg.obj;
try {
- Log.continueSession((Session) args.arg6,
+ Log.continueSession((Session) args.arg3,
SESSION_HANDLER + SESSION_CALL_FILTERING_COMPLETED);
String callId = (String) args.arg1;
- boolean isBlocked = (boolean) args.arg2;
- boolean isInContacts = (boolean) args.arg3;
- CallScreeningService.ParcelableCallResponse callScreeningResponse =
- (CallScreeningService.ParcelableCallResponse) args.arg4;
- boolean isResponseFromSystemDialer = (boolean) args.arg5;
- onCallFilteringCompleted(callId, isBlocked, isInContacts,
- callScreeningResponse, isResponseFromSystemDialer);
+ Connection.CallFilteringCompletionInfo completionInfo =
+ (Connection.CallFilteringCompletionInfo) args.arg2;
+ onCallFilteringCompleted(callId, completionInfo);
} finally {
args.recycle();
Log.endSession();
@@ -1927,6 +1920,7 @@ public abstract class ConnectionService extends Service {
/** {@inheritDoc} */
@Override
public final IBinder onBind(Intent intent) {
+ onBindClient(intent);
return mBinder;
}
@@ -1937,6 +1931,13 @@ public abstract class ConnectionService extends Service {
return super.onUnbind(intent);
}
+ /**
+ * Used for testing to let the test suite know when the connection service has been bound.
+ * @hide
+ */
+ @TestApi
+ public void onBindClient(@Nullable Intent intent) {
+ }
/**
* This can be used by telecom to either create a new outgoing conference call or attach
@@ -2470,16 +2471,12 @@ public abstract class ConnectionService extends Service {
}
}
- private void onCallFilteringCompleted(String callId, boolean isBlocked, boolean isInContacts,
- CallScreeningService.ParcelableCallResponse callScreeningResponse,
- boolean isResponseFromSystemDialer) {
- Log.i(this, "onCallFilteringCompleted(%s, %b, %b, %s, %b)", callId,
- isBlocked, isInContacts, callScreeningResponse, isResponseFromSystemDialer);
+ private void onCallFilteringCompleted(String callId, Connection.CallFilteringCompletionInfo
+ callFilteringCompletionInfo) {
+ Log.i(this, "onCallFilteringCompleted(%s, %s)", callId, callFilteringCompletionInfo);
Connection connection = findConnectionForAction(callId, "onCallFilteringCompleted");
if (connection != null) {
- connection.onCallFilteringCompleted(isBlocked, isInContacts,
- callScreeningResponse == null ? null : callScreeningResponse.toCallResponse(),
- isResponseFromSystemDialer);
+ connection.onCallFilteringCompleted(callFilteringCompletionInfo);
}
}