Loading src/com/android/server/telecom/Call.java +11 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, private boolean mWasConferencePreviouslyMerged = false; private boolean mWasHighDefAudio = false; private boolean mWasWifi = 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 @@ -1598,6 +1599,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, } mWasHighDefAudio = (connectionProperties & Connection.PROPERTY_HIGH_DEF_AUDIO) == Connection.PROPERTY_HIGH_DEF_AUDIO; mWasWifi = (connectionProperties & Connection.PROPERTY_WIFI) > 0; for (Listener l : mListeners) { l.onConnectionPropertiesChanged(this, didRttChange); } Loading Loading @@ -3232,6 +3234,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, return mWasHighDefAudio; } /** * Returns wether or not Wifi call was used. * * @return true if wifi call was used during this call. */ boolean wasWifi() { return mWasWifi; } public void setIsUsingCallFiltering(boolean isUsingCallFiltering) { mIsUsingCallFiltering = isUsingCallFiltering; } Loading src/com/android/server/telecom/CallLogManager.java +6 −18 Original line number Diff line number Diff line Loading @@ -325,7 +325,7 @@ public final class CallLogManager extends CallsManagerListenerBase { int callFeatures = getCallFeatures(call.getVideoStateHistory(), call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED, shouldSaveHdInfo(call, accountHandle), call.wasHighDefAudio(), call.wasWifi(), (call.getConnectionProperties() & Connection.PROPERTY_ASSISTED_DIALING_USED) == Connection.PROPERTY_ASSISTED_DIALING_USED, call.wasEverRttCall()); Loading Loading @@ -448,11 +448,12 @@ 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. * @param isWifi {@code true} if this call was used wifi. * @param isUsingAssistedDialing {@code true} if this call used assisted dialing. * @return The call features. */ private static int getCallFeatures(int videoState, boolean isPulledCall, boolean isStoreHd, boolean isUsingAssistedDialing, boolean isRtt) { boolean isWifi, boolean isUsingAssistedDialing, boolean isRtt) { int features = 0; if (VideoProfile.isVideo(videoState)) { features |= Calls.FEATURES_VIDEO; Loading @@ -463,6 +464,9 @@ public final class CallLogManager extends CallsManagerListenerBase { if (isStoreHd) { features |= Calls.FEATURES_HD_CALL; } if (isWifi) { features |= Calls.FEATURES_WIFI; } if (isUsingAssistedDialing) { features |= Calls.FEATURES_ASSISTED_DIALING_USED; } Loading @@ -472,22 +476,6 @@ public final class CallLogManager extends CallsManagerListenerBase { 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 @@ -439,6 +439,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, private boolean mWasConferencePreviouslyMerged = false; private boolean mWasHighDefAudio = false; private boolean mWasWifi = 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 @@ -1598,6 +1599,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, } mWasHighDefAudio = (connectionProperties & Connection.PROPERTY_HIGH_DEF_AUDIO) == Connection.PROPERTY_HIGH_DEF_AUDIO; mWasWifi = (connectionProperties & Connection.PROPERTY_WIFI) > 0; for (Listener l : mListeners) { l.onConnectionPropertiesChanged(this, didRttChange); } Loading Loading @@ -3232,6 +3234,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, return mWasHighDefAudio; } /** * Returns wether or not Wifi call was used. * * @return true if wifi call was used during this call. */ boolean wasWifi() { return mWasWifi; } public void setIsUsingCallFiltering(boolean isUsingCallFiltering) { mIsUsingCallFiltering = isUsingCallFiltering; } Loading
src/com/android/server/telecom/CallLogManager.java +6 −18 Original line number Diff line number Diff line Loading @@ -325,7 +325,7 @@ public final class CallLogManager extends CallsManagerListenerBase { int callFeatures = getCallFeatures(call.getVideoStateHistory(), call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED, shouldSaveHdInfo(call, accountHandle), call.wasHighDefAudio(), call.wasWifi(), (call.getConnectionProperties() & Connection.PROPERTY_ASSISTED_DIALING_USED) == Connection.PROPERTY_ASSISTED_DIALING_USED, call.wasEverRttCall()); Loading Loading @@ -448,11 +448,12 @@ 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. * @param isWifi {@code true} if this call was used wifi. * @param isUsingAssistedDialing {@code true} if this call used assisted dialing. * @return The call features. */ private static int getCallFeatures(int videoState, boolean isPulledCall, boolean isStoreHd, boolean isUsingAssistedDialing, boolean isRtt) { boolean isWifi, boolean isUsingAssistedDialing, boolean isRtt) { int features = 0; if (VideoProfile.isVideo(videoState)) { features |= Calls.FEATURES_VIDEO; Loading @@ -463,6 +464,9 @@ public final class CallLogManager extends CallsManagerListenerBase { if (isStoreHd) { features |= Calls.FEATURES_HD_CALL; } if (isWifi) { features |= Calls.FEATURES_WIFI; } if (isUsingAssistedDialing) { features |= Calls.FEATURES_ASSISTED_DIALING_USED; } Loading @@ -472,22 +476,6 @@ public final class CallLogManager extends CallsManagerListenerBase { 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