Merge "Add debounce to start of phone call ops" into sc-dev
diff --git a/src/com/android/server/telecom/Call.java b/src/com/android/server/telecom/Call.java
index e481202..8fae923 100644
--- a/src/com/android/server/telecom/Call.java
+++ b/src/com/android/server/telecom/Call.java
@@ -164,6 +164,7 @@
void onBluetoothCallQualityReport(Call call, BluetoothCallQualityReport report);
void onReceivedDeviceToDeviceMessage(Call call, int messageType, int messageValue);
void onReceivedCallQualityReport(Call call, CallQuality callQuality);
+ void onCallerNumberVerificationStatusChanged(Call call, int callerNumberVerificationStatus);
}
public abstract static class ListenerBase implements Listener {
@@ -258,6 +259,9 @@
public void onReceivedDeviceToDeviceMessage(Call call, int messageType, int messageValue) {}
@Override
public void onReceivedCallQualityReport(Call call, CallQuality callQuality) {}
+ @Override
+ public void onCallerNumberVerificationStatusChanged(Call call,
+ int callerNumberVerificationStatus) {}
}
private final CallerInfoLookupHelper.OnQueryCompleteListener mCallerInfoQueryListener =
@@ -1323,6 +1327,8 @@
public void setCallerNumberVerificationStatus(
@Connection.VerificationStatus int callerNumberVerificationStatus) {
mCallerNumberVerificationStatus = callerNumberVerificationStatus;
+ mListeners.forEach(l -> l.onCallerNumberVerificationStatusChanged(this,
+ callerNumberVerificationStatus));
}
public @Connection.VerificationStatus int getCallerNumberVerificationStatus() {
@@ -2754,6 +2760,16 @@
setOriginalConnectionId(extras.getString(Connection.EXTRA_ORIGINAL_CONNECTION_ID));
}
+ if (extras.containsKey(Connection.EXTRA_CALLER_NUMBER_VERIFICATION_STATUS)
+ && source == SOURCE_CONNECTION_SERVICE) {
+ int callerNumberVerificationStatus =
+ extras.getInt(Connection.EXTRA_CALLER_NUMBER_VERIFICATION_STATUS);
+ if (mCallerNumberVerificationStatus != callerNumberVerificationStatus) {
+ Log.addEvent(this, LogUtils.Events.VERSTAT_CHANGED, callerNumberVerificationStatus);
+ setCallerNumberVerificationStatus(callerNumberVerificationStatus);
+ }
+ }
+
// The remote connection service API can track the phone account which was originally
// requested to create a connection via the remote connection service API; we store that so
// we have some visibility into how a call was actually placed.
diff --git a/src/com/android/server/telecom/InCallController.java b/src/com/android/server/telecom/InCallController.java
index c207940..ce5e7e9 100644
--- a/src/com/android/server/telecom/InCallController.java
+++ b/src/com/android/server/telecom/InCallController.java
@@ -894,6 +894,12 @@
public void onRemoteRttRequest(Call call, int requestId) {
notifyRemoteRttRequest(call, requestId);
}
+
+ @Override
+ public void onCallerNumberVerificationStatusChanged(Call call,
+ int callerNumberVerificationStatus) {
+ updateCall(call);
+ }
};
private BroadcastReceiver mPackageChangedReceiver = new BroadcastReceiver() {
diff --git a/src/com/android/server/telecom/LogUtils.java b/src/com/android/server/telecom/LogUtils.java
index 6270828..138e441 100644
--- a/src/com/android/server/telecom/LogUtils.java
+++ b/src/com/android/server/telecom/LogUtils.java
@@ -201,6 +201,7 @@
public static final String OVERRIDE_DISCONNECT_MESSAGE = "OVERRIDE_DISCONNECT_MSG";
public static final String CALL_DIAGNOSTIC_SERVICE_TIMEOUT =
"CALL_DIAGNOSTIC_SERVICE_TIMEOUT";
+ public static final String VERSTAT_CHANGED = "VERSTAT_CHANGED";
public static class Timings {
public static final String ACCEPT_TIMING = "accept";