From aef646dee7f4363f38166e9306075f759052c5df Mon Sep 17 00:00:00 2001 From: wangqi Date: Mon, 26 Mar 2018 15:21:32 -0700 Subject: Replace png icon with vector drawable for voice call screen. Icons in video call screen will be replaced in following change. Bug: 76221932 Test: manual PiperOrigin-RevId: 190534558 Change-Id: Ia8abb468c71ffa4f6322043bc3bbbbe475b20a1f --- .../quantum_ic_call_merge_white_36.png | Bin 258 -> 0 bytes .../drawable-hdpi/quantum_ic_dialpad_white_36.png | Bin 549 -> 0 bytes .../drawable-hdpi/quantum_ic_group_white_36.png | Bin 341 -> 0 bytes .../drawable-hdpi/quantum_ic_pause_white_36.png | Bin 124 -> 0 bytes .../drawable-hdpi/quantum_ic_videocam_white_36.png | Bin 222 -> 0 bytes .../quantum_ic_call_merge_white_36.png | Bin 208 -> 0 bytes .../drawable-mdpi/quantum_ic_dialpad_white_36.png | Bin 264 -> 0 bytes .../drawable-mdpi/quantum_ic_group_white_36.png | Bin 236 -> 0 bytes .../drawable-mdpi/quantum_ic_pause_white_36.png | Bin 105 -> 0 bytes .../drawable-mdpi/quantum_ic_videocam_white_36.png | Bin 173 -> 0 bytes .../quantum_ic_call_merge_white_36.png | Bin 287 -> 0 bytes .../drawable-xhdpi/quantum_ic_dialpad_white_36.png | Bin 362 -> 0 bytes .../drawable-xhdpi/quantum_ic_group_white_36.png | Bin 417 -> 0 bytes .../drawable-xhdpi/quantum_ic_pause_white_36.png | Bin 92 -> 0 bytes .../quantum_ic_videocam_white_36.png | Bin 234 -> 0 bytes .../quantum_ic_call_merge_white_36.png | Bin 388 -> 0 bytes .../quantum_ic_dialpad_white_36.png | Bin 452 -> 0 bytes .../drawable-xxhdpi/quantum_ic_group_white_36.png | Bin 581 -> 0 bytes .../drawable-xxhdpi/quantum_ic_pause_white_36.png | Bin 158 -> 0 bytes .../quantum_ic_videocam_white_36.png | Bin 350 -> 0 bytes .../quantum_ic_call_merge_white_36.png | Bin 435 -> 0 bytes .../quantum_ic_dialpad_white_36.png | Bin 754 -> 0 bytes .../drawable-xxxhdpi/quantum_ic_group_white_36.png | Bin 809 -> 0 bytes .../drawable-xxxhdpi/quantum_ic_pause_white_36.png | Bin 110 -> 0 bytes .../quantum_ic_videocam_white_36.png | Bin 437 -> 0 bytes .../drawable/quantum_ic_call_merge_vd_theme_24.xml | 25 +++++++++++++++++++++ .../incallui/incall/impl/ButtonController.java | 18 +++++++-------- .../incall/impl/CheckableLabeledButton.java | 5 +++-- .../incallui/incall/impl/res/values/dimens.xml | 1 + 29 files changed, 38 insertions(+), 11 deletions(-) delete mode 100644 assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png delete mode 100644 assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png delete mode 100644 assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png delete mode 100644 assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png delete mode 100644 assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png delete mode 100644 assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png delete mode 100644 assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png delete mode 100644 assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png delete mode 100644 assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png delete mode 100644 assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png delete mode 100644 assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png delete mode 100644 assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png delete mode 100644 assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png delete mode 100644 assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png delete mode 100644 assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png delete mode 100644 assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png delete mode 100644 assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png delete mode 100644 assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png delete mode 100644 assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png delete mode 100644 assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png delete mode 100644 assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png delete mode 100644 assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png delete mode 100644 assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png delete mode 100644 assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png delete mode 100644 assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png create mode 100644 assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png deleted file mode 100644 index b7aba8072..000000000 Binary files a/assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png deleted file mode 100644 index 82710e72a..000000000 Binary files a/assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png deleted file mode 100644 index f98a074ac..000000000 Binary files a/assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png deleted file mode 100644 index 1d024393a..000000000 Binary files a/assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png deleted file mode 100644 index 49562a640..000000000 Binary files a/assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png deleted file mode 100644 index a2eb54bab..000000000 Binary files a/assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png deleted file mode 100644 index 9037f94e8..000000000 Binary files a/assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png deleted file mode 100644 index 25e443424..000000000 Binary files a/assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png deleted file mode 100644 index 4d2ea05c4..000000000 Binary files a/assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png deleted file mode 100644 index d83e0d50c..000000000 Binary files a/assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png deleted file mode 100644 index 01daecf65..000000000 Binary files a/assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png deleted file mode 100644 index 175000510..000000000 Binary files a/assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png deleted file mode 100644 index 7f0b7e903..000000000 Binary files a/assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png deleted file mode 100644 index 7192ad487..000000000 Binary files a/assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png deleted file mode 100644 index 44c28e2f2..000000000 Binary files a/assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png deleted file mode 100644 index cefef6551..000000000 Binary files a/assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png deleted file mode 100644 index 54ebbafae..000000000 Binary files a/assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png deleted file mode 100644 index 952e15fa6..000000000 Binary files a/assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png deleted file mode 100644 index a03bad27e..000000000 Binary files a/assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png deleted file mode 100644 index 839af26f8..000000000 Binary files a/assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png deleted file mode 100644 index 9419ffbbc..000000000 Binary files a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png deleted file mode 100644 index a53aeb1d3..000000000 Binary files a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png deleted file mode 100644 index dacf29932..000000000 Binary files a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png deleted file mode 100644 index 3ea7e03e5..000000000 Binary files a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png deleted file mode 100644 index eff5923da..000000000 Binary files a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png and /dev/null differ diff --git a/assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml new file mode 100644 index 000000000..660faf4d6 --- /dev/null +++ b/assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml @@ -0,0 +1,25 @@ + + + + diff --git a/java/com/android/incallui/incall/impl/ButtonController.java b/java/com/android/incallui/incall/impl/ButtonController.java index 5e37a492b..dd11fff33 100644 --- a/java/com/android/incallui/incall/impl/ButtonController.java +++ b/java/com/android/incallui/incall/impl/ButtonController.java @@ -293,7 +293,7 @@ interface ButtonController { R.string.incall_content_description_muted, R.string.incall_content_description_unmuted, R.string.incall_label_mute, - R.drawable.quantum_ic_mic_off_white_36); + R.drawable.quantum_ic_mic_off_vd_theme_24); } @Override @@ -312,7 +312,7 @@ interface ButtonController { private CheckableLabeledButton button; @StringRes private int label = R.string.incall_label_speaker; - @DrawableRes private int icon = R.drawable.quantum_ic_volume_up_white_36; + @DrawableRes private int icon = R.drawable.quantum_ic_volume_up_vd_theme_24; private boolean checkable; private CharSequence contentDescription; private CharSequence checkedContentDescription; @@ -421,7 +421,7 @@ interface ButtonController { 0, 0, R.string.incall_label_dialpad, - R.drawable.quantum_ic_dialpad_white_36); + R.drawable.quantum_ic_dialpad_vd_theme_24); } @Override @@ -439,7 +439,7 @@ interface ButtonController { R.string.incall_content_description_unhold, R.string.incall_content_description_hold, R.string.incall_label_hold, - R.drawable.quantum_ic_pause_white_36); + R.drawable.quantum_ic_pause_vd_theme_24); } @Override @@ -474,7 +474,7 @@ interface ButtonController { InCallButtonIds.BUTTON_SWAP, R.string.incall_content_description_swap_calls, R.string.incall_label_swap, - R.drawable.quantum_ic_swap_calls_white_36); + R.drawable.quantum_ic_swap_calls_vd_theme_24); Assert.isNotNull(delegate); } @@ -492,7 +492,7 @@ interface ButtonController { InCallButtonIds.BUTTON_MERGE, R.string.incall_content_description_merge_calls, R.string.incall_label_merge, - R.drawable.quantum_ic_call_merge_white_36); + R.drawable.quantum_ic_call_merge_vd_theme_24); Assert.isNotNull(delegate); } @@ -510,7 +510,7 @@ interface ButtonController { InCallButtonIds.BUTTON_UPGRADE_TO_VIDEO, 0, R.string.incall_label_videocall, - R.drawable.quantum_ic_videocam_white_36); + R.drawable.quantum_ic_videocam_vd_theme_24); Assert.isNotNull(delegate); } @@ -530,7 +530,7 @@ interface ButtonController { InCallButtonIds.BUTTON_MANAGE_VOICE_CONFERENCE, R.string.a11y_description_incall_label_manage_content, R.string.incall_label_manage, - R.drawable.quantum_ic_group_white_36); + R.drawable.quantum_ic_group_vd_theme_24); Assert.isNotNull(inCallScreenDelegate); this.inCallScreenDelegate = inCallScreenDelegate; } @@ -551,7 +551,7 @@ interface ButtonController { InCallButtonIds.BUTTON_SWITCH_TO_SECONDARY, R.string.incall_content_description_swap_calls, R.string.incall_label_swap, - R.drawable.quantum_ic_swap_calls_white_36); + R.drawable.quantum_ic_swap_calls_vd_theme_24); Assert.isNotNull(inCallScreenDelegate); this.inCallScreenDelegate = inCallScreenDelegate; } diff --git a/java/com/android/incallui/incall/impl/CheckableLabeledButton.java b/java/com/android/incallui/incall/impl/CheckableLabeledButton.java index ca018acc2..03e6e3700 100644 --- a/java/com/android/incallui/incall/impl/CheckableLabeledButton.java +++ b/java/com/android/incallui/incall/impl/CheckableLabeledButton.java @@ -34,7 +34,6 @@ import android.view.Gravity; import android.view.SoundEffectConstants; import android.widget.Checkable; import android.widget.ImageView; -import android.widget.ImageView.ScaleType; import android.widget.LinearLayout; import android.widget.TextView; @@ -82,13 +81,15 @@ public class CheckableLabeledButton extends LinearLayout implements Checkable { setPadding(paddingSize, paddingSize, paddingSize, paddingSize); int iconSize = getResources().getDimensionPixelSize(R.dimen.incall_labeled_button_size); + int imageSize = getResources().getDimensionPixelSize(R.dimen.incall_labeled_button_icon_size); + int iconPadding = (iconSize - imageSize) / 2; iconView = new ImageView(context, null, android.R.style.Widget_Material_Button_Colored); LayoutParams iconParams = generateDefaultLayoutParams(); iconParams.width = iconSize; iconParams.height = iconSize; iconView.setLayoutParams(iconParams); - iconView.setScaleType(ScaleType.CENTER_INSIDE); + iconView.setPadding(iconPadding, iconPadding, iconPadding, iconPadding); iconView.setImageDrawable(icon); iconView.setImageTintMode(Mode.SRC_IN); iconView.setImageTintList(getResources().getColorStateList(R.color.incall_button_icon, null)); diff --git a/java/com/android/incallui/incall/impl/res/values/dimens.xml b/java/com/android/incallui/incall/impl/res/values/dimens.xml index 076a7d7dd..439dc1d33 100644 --- a/java/com/android/incallui/incall/impl/res/values/dimens.xml +++ b/java/com/android/incallui/incall/impl/res/values/dimens.xml @@ -23,6 +23,7 @@ 8dp 0dp 48dp + 36dp 76dp 24dp -- cgit v1.2.3 From bcf4f6b018f2311959ff203a547480d6940f6557 Mon Sep 17 00:00:00 2001 From: linyuh Date: Mon, 26 Mar 2018 16:29:10 -0700 Subject: Change the maximum number of notifications per tag from 10 to 8. For grouped notifications, the system UI only displays the last 8. Bug: 74132249 Test: NotificationThrottlerTest PiperOrigin-RevId: 190544350 Change-Id: Idc52f4e98c1262bcb16a7a5052829b0a0faaacc6 --- java/com/android/dialer/notification/NotificationThrottler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/com/android/dialer/notification/NotificationThrottler.java b/java/com/android/dialer/notification/NotificationThrottler.java index 9db744df6..329a084e8 100644 --- a/java/com/android/dialer/notification/NotificationThrottler.java +++ b/java/com/android/dialer/notification/NotificationThrottler.java @@ -41,7 +41,7 @@ import java.util.List; * unbundled notifications, the system displays all notifications until a global maximum of 50 is * reached. */ - private static final int MAX_NOTIFICATIONS_PER_TAG = 10; + private static final int MAX_NOTIFICATIONS_PER_TAG = 8; private static final int HIGH_GLOBAL_NOTIFICATION_COUNT = 45; -- cgit v1.2.3 From 1a8ee5e9b5395e485bcadb38cb716e4731591b44 Mon Sep 17 00:00:00 2001 From: linyuh Date: Mon, 26 Mar 2018 22:12:59 -0700 Subject: Remove TODOs left for M in the new call log as the min SDK has been bumped to N. Bug: 72125574 Test: None. PiperOrigin-RevId: 190572832 Change-Id: I581d3c9e366a1190c1608b369700aeb511fe51d1 --- .../calllog/datasources/systemcalllog/SystemCallLogDataSource.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java index dce51b750..9332acdb1 100644 --- a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java +++ b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java @@ -271,7 +271,6 @@ public class SystemCallLogDataSource implements CallLogDataSource { .query( Calls.CONTENT_URI_WITH_VOICEMAIL, getProjection(), - // TODO(a bug): LAST_MODIFIED not available on M Calls.LAST_MODIFIED + " > ? AND " + Voicemails.DELETED + " = 0", new String[] {String.valueOf(previousTimestampProcessed)}, Calls.LAST_MODIFIED + " DESC LIMIT 1000")) { @@ -399,7 +398,7 @@ public class SystemCallLogDataSource implements CallLogDataSource { new String[] { Calls._ID, Calls.DATE, - Calls.LAST_MODIFIED, // TODO(a bug): Not available in M + Calls.LAST_MODIFIED, Calls.NUMBER, Calls.NUMBER_PRESENTATION, Calls.TYPE, @@ -414,7 +413,7 @@ public class SystemCallLogDataSource implements CallLogDataSource { Calls.PHONE_ACCOUNT_COMPONENT_NAME, Calls.PHONE_ACCOUNT_ID, Calls.FEATURES, - Calls.POST_DIAL_DIGITS // TODO(a bug): Not available in M + Calls.POST_DIAL_DIGITS }; @RequiresApi(VERSION_CODES.O) -- cgit v1.2.3