Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +17 −7 Original line number Diff line number Diff line Loading @@ -354,11 +354,18 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { private long mCachedTime; private long mConnectTime; private long mConnectElapsedTime; /** * The direction of the call; * {@link android.telecom.Call.Details#DIRECTION_INCOMING} for incoming calls, or * {@link android.telecom.Call.Details#DIRECTION_OUTGOING} for outgoing calls. */ private int mCallDirection; CacheEntry(long cachedTime, long connectTime, long connectElapsedTime) { CacheEntry(long cachedTime, long connectTime, long connectElapsedTime, int callDirection) { mCachedTime = cachedTime; mConnectTime = connectTime; mConnectElapsedTime = connectElapsedTime; mCallDirection = callDirection; } } Loading Loading @@ -1335,8 +1342,11 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } private void cacheConnectionTimeWithPhoneNumber(@NonNull ImsPhoneConnection connection) { int callDirection = connection.isIncoming() ? android.telecom.Call.Details.DIRECTION_INCOMING : android.telecom.Call.Details.DIRECTION_OUTGOING; CacheEntry cachedConnectTime = new CacheEntry(SystemClock.elapsedRealtime(), connection.getConnectTime(), connection.getConnectTimeReal()); connection.getConnectTime(), connection.getConnectTimeReal(), callDirection); maintainConnectTimeCache(); if (PhoneConstants.PRESENTATION_ALLOWED == connection.getNumberPresentation()) { // In case of merging calls with the same number, use the latest connect time. Since Loading Loading @@ -1364,13 +1374,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { return null; } String numParts = PhoneNumberUtils .extractNetworkPortion(participant.getHandle().getSchemeSpecificPart()); if (TextUtils.isEmpty(numParts)) { String number = ConferenceParticipant.getParticipantAddress(participant.getHandle(), getCountryIso()).getSchemeSpecificPart(); if (TextUtils.isEmpty(number)) { return null; } String formattedNumber = getFormattedPhoneNumber(numParts); String formattedNumber = getFormattedPhoneNumber(number); return mPhoneNumAndConnTime.get(formattedNumber); } else { return mUnknownPeerConnTime.poll(); Loading Loading @@ -2752,6 +2761,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { if (cachedConnectTime != null) { participant.setConnectTime(cachedConnectTime.mConnectTime); participant.setConnectElapsedTime(cachedConnectTime.mConnectElapsedTime); participant.setCallDirection(cachedConnectTime.mCallDirection); } } } Loading Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +17 −7 Original line number Diff line number Diff line Loading @@ -354,11 +354,18 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { private long mCachedTime; private long mConnectTime; private long mConnectElapsedTime; /** * The direction of the call; * {@link android.telecom.Call.Details#DIRECTION_INCOMING} for incoming calls, or * {@link android.telecom.Call.Details#DIRECTION_OUTGOING} for outgoing calls. */ private int mCallDirection; CacheEntry(long cachedTime, long connectTime, long connectElapsedTime) { CacheEntry(long cachedTime, long connectTime, long connectElapsedTime, int callDirection) { mCachedTime = cachedTime; mConnectTime = connectTime; mConnectElapsedTime = connectElapsedTime; mCallDirection = callDirection; } } Loading Loading @@ -1335,8 +1342,11 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } private void cacheConnectionTimeWithPhoneNumber(@NonNull ImsPhoneConnection connection) { int callDirection = connection.isIncoming() ? android.telecom.Call.Details.DIRECTION_INCOMING : android.telecom.Call.Details.DIRECTION_OUTGOING; CacheEntry cachedConnectTime = new CacheEntry(SystemClock.elapsedRealtime(), connection.getConnectTime(), connection.getConnectTimeReal()); connection.getConnectTime(), connection.getConnectTimeReal(), callDirection); maintainConnectTimeCache(); if (PhoneConstants.PRESENTATION_ALLOWED == connection.getNumberPresentation()) { // In case of merging calls with the same number, use the latest connect time. Since Loading Loading @@ -1364,13 +1374,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { return null; } String numParts = PhoneNumberUtils .extractNetworkPortion(participant.getHandle().getSchemeSpecificPart()); if (TextUtils.isEmpty(numParts)) { String number = ConferenceParticipant.getParticipantAddress(participant.getHandle(), getCountryIso()).getSchemeSpecificPart(); if (TextUtils.isEmpty(number)) { return null; } String formattedNumber = getFormattedPhoneNumber(numParts); String formattedNumber = getFormattedPhoneNumber(number); return mPhoneNumAndConnTime.get(formattedNumber); } else { return mUnknownPeerConnTime.poll(); Loading Loading @@ -2752,6 +2761,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { if (cachedConnectTime != null) { participant.setConnectTime(cachedConnectTime.mConnectTime); participant.setConnectElapsedTime(cachedConnectTime.mConnectElapsedTime); participant.setCallDirection(cachedConnectTime.mCallDirection); } } } Loading