summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/StatusBarNotifier.java
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-10-12 23:02:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-10-12 23:02:32 +0000
commit5f57e30484848b7b0b8d3fbdfe8b32338aa641a5 (patch)
tree5a37619a955212672a57d86ef50587b3545805ac /java/com/android/incallui/StatusBarNotifier.java
parent2633778c274746a35e4a54266a3319c53fd1cded (diff)
parent392f8cd64936a626cc035ac9bb0302094d8dd957 (diff)
Merge changes I14a2c0b6,Ic67566c2,Id0ef9164,Iec48f030,Ibe1f9de6, ...
* changes: Handle invalid PhoneAccountHandle component name in MissedCallNotifier Use TelephonyManagerCompat for IS_REFRESH Updated animation to enter and exit search ui. Optimization for incoming call latency. Fix for voice screen showing for a short time when making a video call Fix incallui to use latest ux mocks for assisted dialing. Remove voicemail count changed check for legacy notifications
Diffstat (limited to 'java/com/android/incallui/StatusBarNotifier.java')
-rw-r--r--java/com/android/incallui/StatusBarNotifier.java24
1 files changed, 19 insertions, 5 deletions
diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java
index 7146c7235..e5908f12e 100644
--- a/java/com/android/incallui/StatusBarNotifier.java
+++ b/java/com/android/incallui/StatusBarNotifier.java
@@ -541,6 +541,18 @@ public class StatusBarNotifier
|| !Objects.equals(mRingtone, ringtone)
|| !Objects.equals(savedCallAudioState, callAudioState);
+ LogUtil.d(
+ "StatusBarNotifier.checkForChangeAndSaveData",
+ "data changed: icon: %b, content: %b, state: %b, largeIcon: %b, title: %b, ringtone: %b, "
+ + "audioState: %b, type: %b",
+ (mSavedIcon != icon),
+ !Objects.equals(mSavedContent, content),
+ (mCallState != state),
+ largeIconChanged,
+ contentTitleChanged,
+ !Objects.equals(mRingtone, ringtone),
+ !Objects.equals(savedCallAudioState, callAudioState),
+ mCurrentNotification != notificationType);
// If we aren't showing a notification right now or the notification type is changing,
// definitely do an update.
if (mCurrentNotification != notificationType) {
@@ -614,7 +626,7 @@ public class StatusBarNotifier
@ContactType
int contactType =
LetterTileDrawable.getContactTypeFromPrimitives(
- CallerInfoUtils.isVoiceMailNumber(context, call),
+ call.isVoiceMailNumber(),
call.isSpam(),
contactInfo.isBusiness,
call.getNumberPresentation(),
@@ -709,7 +721,7 @@ public class StatusBarNotifier
resId = getECIncomingCallText(call.getEnrichedCallSession());
} else if (call.hasProperty(Details.PROPERTY_WIFI)) {
resId = R.string.notification_incoming_call_wifi_template;
- } else if (call.getAccountHandle() != null && hasMultiplePhoneAccounts()) {
+ } else if (call.getAccountHandle() != null && hasMultiplePhoneAccounts(call)) {
return getMultiSimIncomingText(call);
} else if (call.isVideoCall()) {
resId = R.string.notification_incoming_video_call;
@@ -1043,9 +1055,11 @@ public class StatusBarNotifier
mStatusBarCallListener = listener;
}
- @SuppressWarnings("MissingPermission")
- private boolean hasMultiplePhoneAccounts() {
- return mContext.getSystemService(TelecomManager.class).getCallCapablePhoneAccounts().size() > 1;
+ private boolean hasMultiplePhoneAccounts(DialerCall call) {
+ if (call.getCallCapableAccounts() == null) {
+ return false;
+ }
+ return call.getCallCapableAccounts().size() > 1;
}
@Override