Log if a call is IMS reachable.
And fix a related test in ImsVideoTechTest.
LOG_STORAGE_INCREASE(GB/week): 0.7
5M active block user/day * 10 events/active = 350M event/wk
350M event/wk * (2 [bool])/event = 0.7GB/wk
Test: LoggerUtilsTest
PiperOrigin-RevId: 169153878
Change-Id: Ia8038a5b0961f1a5572541f21df7a2680d85bbbb
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 9f89925..ee9a926 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -153,6 +153,8 @@
private int secondCallWithoutAnswerAndReleasedButtonTimes = 0;
private VideoTech videoTech;
+ private boolean isImsReachable;
+
public static String getNumberFromHandle(Uri handle) {
return handle == null ? "" : handle.getSchemeSpecificPart();
}
@@ -1297,6 +1299,14 @@
mVideoTechManager.dispatchRemovedFromCallList();
}
+ public boolean isImsReachable() {
+ return isImsReachable;
+ }
+
+ private void setImsReachable(boolean imsReachable) {
+ isImsReachable = imsReachable;
+ }
+
/**
* Specifies whether a number is in the call history or not. {@link #CALL_HISTORY_STATUS_UNKNOWN}
* means there is no result.
@@ -1502,7 +1512,11 @@
// Insert order here determines the priority of that video tech option
videoTechs = new ArrayList<>();
- videoTechs.add(new ImsVideoTech(Logger.get(call.mContext), call, call.mTelecomCall));
+
+ ImsVideoTech imsVideoTech =
+ new ImsVideoTech(Logger.get(call.mContext), call, call.mTelecomCall);
+ call.setImsReachable(imsVideoTech.isAvailable(context));
+ videoTechs.add(imsVideoTech);
VideoTech rcsVideoTech =
EnrichedCallComponent.get(call.mContext)