Loading src/com/android/server/telecom/Call.java +11 −0 Original line number Diff line number Diff line Loading @@ -405,6 +405,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { private Analytics.CallInfo mAnalytics; private boolean mWasConferencePreviouslyMerged = false; private boolean mWasHighDefAudio = false; // For conferences which support merge/swap at their level, we retain a notion of an active // call. This is used for BluetoothPhoneService. In order to support hold/merge, it must have Loading Loading @@ -1328,6 +1329,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { mConnectionProperties = connectionProperties; setRttStreams((mConnectionProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT); mWasHighDefAudio = (connectionProperties & Connection.PROPERTY_HIGH_DEF_AUDIO) == Connection.PROPERTY_HIGH_DEF_AUDIO; boolean didRttChange = (changedProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT; for (Listener l : mListeners) { Loading Loading @@ -2780,4 +2783,12 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { mVideoStateHistory |= mVideoState; } /** * Returns whether or not high definition audio was used. * * @return true if high definition audio was used during this call. */ boolean wasHighDefAudio() { return mWasHighDefAudio; } } src/com/android/server/telecom/CallLogManager.java +23 −2 Original line number Diff line number Diff line Loading @@ -226,7 +226,8 @@ public final class CallLogManager extends CallsManagerListenerBase { call.getCallDataUsage(); int callFeatures = getCallFeatures(call.getVideoStateHistory(), call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED); call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED, shouldSaveHdInfo(call, accountHandle)); logCall(call.getCallerInfo(), logNumber, call.getPostDialDigits(), formattedViaNumber, call.getHandlePresentation(), callLogType, callFeatures, accountHandle, creationTime, age, callDataUsage, call.isEmergencyCall(), call.getInitiatingUser(), Loading Loading @@ -301,9 +302,10 @@ public final class CallLogManager extends CallsManagerListenerBase { * * @param videoState The video state. * @param isPulledCall {@code true} if this call was pulled to another device. * @param isStoreHd {@code true} if this call was used HD. * @return The call features. */ private static int getCallFeatures(int videoState, boolean isPulledCall) { private static int getCallFeatures(int videoState, boolean isPulledCall, boolean isStoreHd) { int features = 0; if (VideoProfile.isVideo(videoState)) { features |= Calls.FEATURES_VIDEO; Loading @@ -311,9 +313,28 @@ public final class CallLogManager extends CallsManagerListenerBase { if (isPulledCall) { features |= Calls.FEATURES_PULLED_EXTERNALLY; } if (isStoreHd) { features |= Calls.FEATURES_HD_CALL; } return features; } private boolean shouldSaveHdInfo(Call call, PhoneAccountHandle accountHandle) { CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService( Context.CARRIER_CONFIG_SERVICE); PersistableBundle configBundle = null; if (configManager != null) { configBundle = configManager.getConfigForSubId( mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle)); } if (configBundle != null && configBundle.getBoolean( CarrierConfigManager.KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL) && call.wasHighDefAudio()) { return true; } return false; } /** * Retrieve the phone number from the call, and then process it before returning the * actual number that is to be logged. Loading Loading
src/com/android/server/telecom/Call.java +11 −0 Original line number Diff line number Diff line Loading @@ -405,6 +405,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { private Analytics.CallInfo mAnalytics; private boolean mWasConferencePreviouslyMerged = false; private boolean mWasHighDefAudio = false; // For conferences which support merge/swap at their level, we retain a notion of an active // call. This is used for BluetoothPhoneService. In order to support hold/merge, it must have Loading Loading @@ -1328,6 +1329,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { mConnectionProperties = connectionProperties; setRttStreams((mConnectionProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT); mWasHighDefAudio = (connectionProperties & Connection.PROPERTY_HIGH_DEF_AUDIO) == Connection.PROPERTY_HIGH_DEF_AUDIO; boolean didRttChange = (changedProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT; for (Listener l : mListeners) { Loading Loading @@ -2780,4 +2783,12 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { mVideoStateHistory |= mVideoState; } /** * Returns whether or not high definition audio was used. * * @return true if high definition audio was used during this call. */ boolean wasHighDefAudio() { return mWasHighDefAudio; } }
src/com/android/server/telecom/CallLogManager.java +23 −2 Original line number Diff line number Diff line Loading @@ -226,7 +226,8 @@ public final class CallLogManager extends CallsManagerListenerBase { call.getCallDataUsage(); int callFeatures = getCallFeatures(call.getVideoStateHistory(), call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED); call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED, shouldSaveHdInfo(call, accountHandle)); logCall(call.getCallerInfo(), logNumber, call.getPostDialDigits(), formattedViaNumber, call.getHandlePresentation(), callLogType, callFeatures, accountHandle, creationTime, age, callDataUsage, call.isEmergencyCall(), call.getInitiatingUser(), Loading Loading @@ -301,9 +302,10 @@ public final class CallLogManager extends CallsManagerListenerBase { * * @param videoState The video state. * @param isPulledCall {@code true} if this call was pulled to another device. * @param isStoreHd {@code true} if this call was used HD. * @return The call features. */ private static int getCallFeatures(int videoState, boolean isPulledCall) { private static int getCallFeatures(int videoState, boolean isPulledCall, boolean isStoreHd) { int features = 0; if (VideoProfile.isVideo(videoState)) { features |= Calls.FEATURES_VIDEO; Loading @@ -311,9 +313,28 @@ public final class CallLogManager extends CallsManagerListenerBase { if (isPulledCall) { features |= Calls.FEATURES_PULLED_EXTERNALLY; } if (isStoreHd) { features |= Calls.FEATURES_HD_CALL; } return features; } private boolean shouldSaveHdInfo(Call call, PhoneAccountHandle accountHandle) { CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService( Context.CARRIER_CONFIG_SERVICE); PersistableBundle configBundle = null; if (configManager != null) { configBundle = configManager.getConfigForSubId( mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle)); } if (configBundle != null && configBundle.getBoolean( CarrierConfigManager.KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL) && call.wasHighDefAudio()) { return true; } return false; } /** * Retrieve the phone number from the call, and then process it before returning the * actual number that is to be logged. Loading