Loading InCallUI/src/com/android/incallui/Call.java +4 −4 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.hardware.camera2.CameraCharacteristics; import android.net.Uri; import android.os.Bundle; import android.os.Trace; import android.telecom.CallProperties; import android.telecom.DisconnectCause; import android.telecom.GatewayInfo; import android.telecom.InCallService.VideoCall; Loading Loading @@ -425,8 +424,8 @@ public class Call { return (capabilities == (capabilities & mTelecommCall.getDetails().getCallCapabilities())); } private boolean hasProperty(int property) { return property == (property & mTelecommCall.getDetails().getCallProperties()); public boolean hasProperty(int property) { return mTelecommCall.getDetails().hasProperty(property); } /** Gets the time when the call first became active. */ Loading @@ -435,7 +434,8 @@ public class Call { } public boolean isConferenceCall() { return hasProperty(CallProperties.CONFERENCE); return mTelecommCall.getDetails().hasProperty( android.telecom.Call.Details.PROPERTY_CONFERENCE); } public GatewayInfo getGatewayInfo() { Loading InCallUI/src/com/android/incallui/CallCardPresenter.java +5 −9 Original line number Diff line number Diff line Loading @@ -304,11 +304,11 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> getConnectionLabel(), getCallStateIcon(), getGatewayNumber(), primaryCallCan(Details.CAPABILITY_WIFI), mPrimary.hasProperty(Details.PROPERTY_WIFI), mPrimary.isConferenceCall()); boolean showHdAudioIndicator = isPrimaryCallActive() && primaryCallCan(Details.CAPABILITY_HIGH_DEF_AUDIO); isPrimaryCallActive() && mPrimary.hasProperty(Details.PROPERTY_HIGH_DEF_AUDIO); getUi().showHdAudioIndicator(showHdAudioIndicator); setCallbackNumber(); Loading Loading @@ -353,7 +353,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> // number. boolean isEmergencyCall = PhoneNumberUtils.isEmergencyNumber( getNumberFromHandle(mPrimary.getHandle())); boolean showCallbackNumber = mPrimary.can(Details.CAPABILITY_SHOW_CALLBACK_NUMBER); boolean showCallbackNumber = mPrimary.hasProperty(Details.PROPERTY_EMERGENCY_CALLBACK_MODE); if (isEmergencyCall || showCallbackNumber) { callbackNumber = getSubscriptionNumber(); Loading Loading @@ -735,12 +735,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> return mPrimary != null && mPrimary.getState() == Call.State.ACTIVE; } private boolean primaryCallCan(int capability) { return mPrimary.getTelecommCall().getDetails().can(capability); } private String getConferenceString(Call call) { boolean isGenericConference = call.can(Details.CAPABILITY_GENERIC_CONFERENCE); boolean isGenericConference = call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE); Log.v(this, "getConferenceString: " + isGenericConference); final int resId = isGenericConference Loading @@ -749,7 +745,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } private Drawable getConferencePhoto(Call call) { boolean isGenericConference = call.can(Details.CAPABILITY_GENERIC_CONFERENCE); boolean isGenericConference = call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE); Log.v(this, "getConferencePhoto: " + isGenericConference); final int resId = isGenericConference Loading InCallUI/src/com/android/incallui/StatusBarNotifier.java +4 −4 Original line number Diff line number Diff line Loading @@ -308,7 +308,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { * Returns the main string to use in the notification. */ private String getContentTitle(ContactCacheEntry contactInfo, Call call) { if (call.isConferenceCall() && !call.can(Details.CAPABILITY_GENERIC_CONFERENCE)) { if (call.isConferenceCall() && !call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE)) { return mContext.getResources().getString(R.string.card_title_conf_call); } if (TextUtils.isEmpty(contactInfo.name)) { Loading @@ -335,7 +335,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { */ private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo, Call call) { Bitmap largeIcon = null; if (call.isConferenceCall() && !call.can(Details.CAPABILITY_GENERIC_CONFERENCE)) { if (call.isConferenceCall() && !call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE)) { largeIcon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.img_conference); } Loading Loading @@ -379,12 +379,12 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { */ private int getContentString(Call call) { int resId = R.string.notification_ongoing_call; if (call.can(Details.CAPABILITY_WIFI)) { if (call.hasProperty(Details.PROPERTY_WIFI)) { resId = R.string.notification_ongoing_call_wifi; } if (call.getState() == Call.State.INCOMING || call.getState() == Call.State.CALL_WAITING) { if (call.can(Details.CAPABILITY_WIFI)) { if (call.hasProperty(Details.PROPERTY_WIFI)) { resId = R.string.notification_incoming_call_wifi; } else { resId = R.string.notification_incoming_call; Loading Loading
InCallUI/src/com/android/incallui/Call.java +4 −4 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.hardware.camera2.CameraCharacteristics; import android.net.Uri; import android.os.Bundle; import android.os.Trace; import android.telecom.CallProperties; import android.telecom.DisconnectCause; import android.telecom.GatewayInfo; import android.telecom.InCallService.VideoCall; Loading Loading @@ -425,8 +424,8 @@ public class Call { return (capabilities == (capabilities & mTelecommCall.getDetails().getCallCapabilities())); } private boolean hasProperty(int property) { return property == (property & mTelecommCall.getDetails().getCallProperties()); public boolean hasProperty(int property) { return mTelecommCall.getDetails().hasProperty(property); } /** Gets the time when the call first became active. */ Loading @@ -435,7 +434,8 @@ public class Call { } public boolean isConferenceCall() { return hasProperty(CallProperties.CONFERENCE); return mTelecommCall.getDetails().hasProperty( android.telecom.Call.Details.PROPERTY_CONFERENCE); } public GatewayInfo getGatewayInfo() { Loading
InCallUI/src/com/android/incallui/CallCardPresenter.java +5 −9 Original line number Diff line number Diff line Loading @@ -304,11 +304,11 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> getConnectionLabel(), getCallStateIcon(), getGatewayNumber(), primaryCallCan(Details.CAPABILITY_WIFI), mPrimary.hasProperty(Details.PROPERTY_WIFI), mPrimary.isConferenceCall()); boolean showHdAudioIndicator = isPrimaryCallActive() && primaryCallCan(Details.CAPABILITY_HIGH_DEF_AUDIO); isPrimaryCallActive() && mPrimary.hasProperty(Details.PROPERTY_HIGH_DEF_AUDIO); getUi().showHdAudioIndicator(showHdAudioIndicator); setCallbackNumber(); Loading Loading @@ -353,7 +353,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> // number. boolean isEmergencyCall = PhoneNumberUtils.isEmergencyNumber( getNumberFromHandle(mPrimary.getHandle())); boolean showCallbackNumber = mPrimary.can(Details.CAPABILITY_SHOW_CALLBACK_NUMBER); boolean showCallbackNumber = mPrimary.hasProperty(Details.PROPERTY_EMERGENCY_CALLBACK_MODE); if (isEmergencyCall || showCallbackNumber) { callbackNumber = getSubscriptionNumber(); Loading Loading @@ -735,12 +735,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> return mPrimary != null && mPrimary.getState() == Call.State.ACTIVE; } private boolean primaryCallCan(int capability) { return mPrimary.getTelecommCall().getDetails().can(capability); } private String getConferenceString(Call call) { boolean isGenericConference = call.can(Details.CAPABILITY_GENERIC_CONFERENCE); boolean isGenericConference = call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE); Log.v(this, "getConferenceString: " + isGenericConference); final int resId = isGenericConference Loading @@ -749,7 +745,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } private Drawable getConferencePhoto(Call call) { boolean isGenericConference = call.can(Details.CAPABILITY_GENERIC_CONFERENCE); boolean isGenericConference = call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE); Log.v(this, "getConferencePhoto: " + isGenericConference); final int resId = isGenericConference Loading
InCallUI/src/com/android/incallui/StatusBarNotifier.java +4 −4 Original line number Diff line number Diff line Loading @@ -308,7 +308,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { * Returns the main string to use in the notification. */ private String getContentTitle(ContactCacheEntry contactInfo, Call call) { if (call.isConferenceCall() && !call.can(Details.CAPABILITY_GENERIC_CONFERENCE)) { if (call.isConferenceCall() && !call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE)) { return mContext.getResources().getString(R.string.card_title_conf_call); } if (TextUtils.isEmpty(contactInfo.name)) { Loading @@ -335,7 +335,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { */ private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo, Call call) { Bitmap largeIcon = null; if (call.isConferenceCall() && !call.can(Details.CAPABILITY_GENERIC_CONFERENCE)) { if (call.isConferenceCall() && !call.hasProperty(Details.PROPERTY_GENERIC_CONFERENCE)) { largeIcon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.img_conference); } Loading Loading @@ -379,12 +379,12 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { */ private int getContentString(Call call) { int resId = R.string.notification_ongoing_call; if (call.can(Details.CAPABILITY_WIFI)) { if (call.hasProperty(Details.PROPERTY_WIFI)) { resId = R.string.notification_ongoing_call_wifi; } if (call.getState() == Call.State.INCOMING || call.getState() == Call.State.CALL_WAITING) { if (call.can(Details.CAPABILITY_WIFI)) { if (call.hasProperty(Details.PROPERTY_WIFI)) { resId = R.string.notification_incoming_call_wifi; } else { resId = R.string.notification_incoming_call; Loading