From 2827dd135647dab6f414f06b38f80537bff9a58a Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Thu, 26 Oct 2017 09:37:50 -0700 Subject: Display CDMA voice privacy icon on notification bar. The locked phone icon will be shown for voice privacy call on CDMA for non-hold status(dialing, ongoing etc.) The onhold icon is same as usual. This change also update on hold icon to quantum vector drawable resources. WANT_LGTM=all Bug: 37529280 Test: StatusBarNotifierTest PiperOrigin-RevId: 173451922 Change-Id: I71d4c03b6953ca72def339c9c0a77bacbaf145f8 --- java/com/android/incallui/StatusBarNotifier.java | 7 +++++-- .../res/drawable-hdpi/ic_phone_paused_white_24dp.png | Bin 458 -> 0 bytes .../res/drawable-mdpi/ic_phone_paused_white_24dp.png | Bin 346 -> 0 bytes .../res/drawable-xhdpi/ic_phone_paused_white_24dp.png | Bin 584 -> 0 bytes .../res/drawable-xxhdpi/ic_phone_paused_white_24dp.png | Bin 842 -> 0 bytes 5 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_phone_paused_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-mdpi/ic_phone_paused_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-xhdpi/ic_phone_paused_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-xxhdpi/ic_phone_paused_white_24dp.png (limited to 'java') diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java index 4ce43935e..bb3ef4333 100644 --- a/java/com/android/incallui/StatusBarNotifier.java +++ b/java/com/android/incallui/StatusBarNotifier.java @@ -624,7 +624,8 @@ public class StatusBarNotifier * Returns the appropriate icon res Id to display based on the call for which we want to display * information. */ - private int getIconToDisplay(DialerCall call) { + @VisibleForTesting + public int getIconToDisplay(DialerCall call) { // Even if both lines are in use, we only show a single item in // the expanded Notifications UI. It's labeled "Ongoing call" // (or "On hold" if there's only one call, and it's on hold.) @@ -633,7 +634,7 @@ public class StatusBarNotifier // from the foreground call. And if there's a ringing call, // display that regardless of the state of the other calls. if (call.getState() == DialerCall.State.ONHOLD) { - return R.drawable.ic_phone_paused_white_24dp; + return R.drawable.quantum_ic_phone_paused_vd_theme_24; } else if (call.getVideoTech().getSessionModificationState() == SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST || call.isVideoCall()) { @@ -644,6 +645,8 @@ public class StatusBarNotifier // helpful hint for users so they know how to get back to the call. For Sprint HD calls, we // replace this icon with an icon of a phone with a HD badge. This is a carrier requirement. return R.drawable.ic_hd_call; + } else if (call.hasProperty(Details.PROPERTY_HAS_CDMA_VOICE_PRIVACY)) { + return R.drawable.quantum_ic_phone_locked_vd_theme_24; } // If ReturnToCall is enabled, use the static icon. The animated one will show in the bubble. if (ReturnToCallController.isEnabled(mContext) diff --git a/java/com/android/incallui/res/drawable-hdpi/ic_phone_paused_white_24dp.png b/java/com/android/incallui/res/drawable-hdpi/ic_phone_paused_white_24dp.png deleted file mode 100644 index a2177f58a..000000000 Binary files a/java/com/android/incallui/res/drawable-hdpi/ic_phone_paused_white_24dp.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-mdpi/ic_phone_paused_white_24dp.png b/java/com/android/incallui/res/drawable-mdpi/ic_phone_paused_white_24dp.png deleted file mode 100644 index 7dc920b2b..000000000 Binary files a/java/com/android/incallui/res/drawable-mdpi/ic_phone_paused_white_24dp.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xhdpi/ic_phone_paused_white_24dp.png b/java/com/android/incallui/res/drawable-xhdpi/ic_phone_paused_white_24dp.png deleted file mode 100644 index a8becf485..000000000 Binary files a/java/com/android/incallui/res/drawable-xhdpi/ic_phone_paused_white_24dp.png and /dev/null differ diff --git a/java/com/android/incallui/res/drawable-xxhdpi/ic_phone_paused_white_24dp.png b/java/com/android/incallui/res/drawable-xxhdpi/ic_phone_paused_white_24dp.png deleted file mode 100644 index baf0cf27f..000000000 Binary files a/java/com/android/incallui/res/drawable-xxhdpi/ic_phone_paused_white_24dp.png and /dev/null differ -- cgit v1.2.3