diff --git a/AndroidManifest.xml b/AndroidManifest.xml index a1698f89..56557fb6 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -241,7 +241,7 @@ android:value="com.android.messaging.ui.conversation.ConversationActivity" /> - + + + + + + @@ -60,6 +65,14 @@ + + + + + + + + @@ -137,6 +150,14 @@ + + + + + + + + @@ -154,6 +175,9 @@ + + + @@ -192,6 +216,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -290,6 +338,22 @@ + + + + + + + + + + + + + + + + @@ -348,6 +412,22 @@ + + + + + + + + + + + + + + + + @@ -439,6 +519,11 @@ + + + + + @@ -626,6 +711,14 @@ + + + + + + + + @@ -658,6 +751,22 @@ + + + + + + + + + + + + + + + + @@ -1215,6 +1324,14 @@ + + + + + + + + @@ -2614,6 +2731,11 @@ + + + + + @@ -2942,6 +3064,14 @@ + + + + + + + + @@ -2974,6 +3104,14 @@ + + + + + + + + diff --git a/res/layout/add_contacts_confirmation_dialog_body.xml b/res/layout/add_contacts_confirmation_dialog_body.xml index 07f3d0f7..72023e59 100644 --- a/res/layout/add_contacts_confirmation_dialog_body.xml +++ b/res/layout/add_contacts_confirmation_dialog_body.xml @@ -28,7 +28,7 @@ android:layout_width="@dimen/conversation_list_contact_icon_size" android:layout_height="@dimen/conversation_list_contact_icon_size" android:importantForAccessibility="no" - app:iconSize="large" + app:iconSize="@dimen/icon_large_size" android:layout_gravity="center_vertical" android:clickable="true" /> diff --git a/res/layout/blocked_participant_list_item_view.xml b/res/layout/blocked_participant_list_item_view.xml index 7ac0ec92..4a21e637 100644 --- a/res/layout/blocked_participant_list_item_view.xml +++ b/res/layout/blocked_participant_list_item_view.xml @@ -26,7 +26,7 @@ android:layout_width="@dimen/contact_list_icon_size" android:layout_height="@dimen/contact_list_icon_size" android:importantForAccessibility="no" - app:iconSize="normal" + app:iconSize="@dimen/icon_normal_size" android:layout_gravity="center_vertical"/> + android:contentDescription="@null"/> @@ -64,10 +64,10 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" > - + + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="@android:color/transparent"> + android:id="@+id/work_profile_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:background="@android:color/transparent" + android:scaleType="center" + android:src="@drawable/ic_work_profile" + android:visibility="gone"/> diff --git a/res/layout/person_item_view.xml b/res/layout/person_item_view.xml index 9645024a..05327903 100644 --- a/res/layout/person_item_view.xml +++ b/res/layout/person_item_view.xml @@ -26,7 +26,7 @@ android:layout_width="@dimen/contact_list_icon_size" android:layout_height="@dimen/contact_list_icon_size" android:importantForAccessibility="no" - app:iconSize="normal" + app:iconSize="@dimen/icon_normal_size" android:layout_gravity="center_vertical" /> + app:iconSize="@dimen/icon_normal_size" /> diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml new file mode 100644 index 00000000..53e3ae62 --- /dev/null +++ b/res/values-v31/colors.xml @@ -0,0 +1,185 @@ + + + + @color/material_dynamic_primary40 + @color/material_dynamic_secondary40 + @color/material_dynamic_neutral40 + @color/material_dynamic_tertiary40 + + @color/material_dynamic_primary30 + @color/material_dynamic_secondary30 + @color/material_dynamic_neutral30 + @color/material_dynamic_tertiary30 + + @color/primary_color + + + #ffffff + @color/primary_color + @color/primary_color + #ffffff + @color/background_color + @color/background_color_dark + + + #636363 + #323232 + #F05A24 + #DE000000 + #8A000000 + + #44000000 + + #000000 + #99323232 + #99ffffff + #99ff0000 + #000000 + + #ff323232 + #000000 + #99ffffff + #6a6a6a + #007fce + #99ff0000 + #ffffffff + #99ffffff + #ffffffff + + @android:color/transparent + #670099cc + #cc0099cc + #6733b5e5 + + #ffffffff + #ffffffff + #6a6a6a + #ff323232 + #eeeeee + #9d9d9d + @color/primary_color + #999999 + #ffffffff + #e2e2e2 + #ffffffff + @color/primary_color_dark + @color/primary_color_dark + #ff808080 + + + #ff0000 + + + #7f040000 + + #d2d2d2 + #40000000 + #4d4d4d + #999999 + + @android:color/white + #a0ffffff + #44000000 + #ddffffff + @android:color/white + @color/primary_color + #ffffff + #4285f4 + #ededed + #33000000 + @android:color/white + + #80000000 + + #80ffffff + + #eeeeee + #6733b5e5 + #44000000 + + #ffffff + + #29000000 + #30000000 + #40000000 + #323232 + #323232 + @color/primary_color + + #40000000 + + #DE000000 + #8A000000 + #8A000000 + #a2a2a2 + @color/primary_color + #ff0000 + #DE000000 + + #4d4d4d + #6d6d6d + #6d6d6d + #cccccc + + @color/tertiary_color + @color/tertiary_color_dark + @color/background_color + + #555555 + @color/tertiary_color + #6d6d6d + #ff000000 + @color/tertiary_color + #40000000 + @color/primary_color + + #4d4d4d + #999999 + #cceeeeee + #ffeeeeee + #ffffff + #323232 + + @color/tertiary_color_dark + #b0dddddd + + #03a9f4 + #4d4d4d + + #4d4d4d + #6d6d6d + #333333 + #000000 + + @color/primary_color + + #424242 + @android:color/white + #424242 + #ffffff + #40000000 + #FFFFFF + + #eeeeee + #eeeeee + + #1e000000 + #42000000 + #ffffff + + #F1F1F1 + diff --git a/res/values/attrs.xml b/res/values/attrs.xml index d02cfab0..2888e21c 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -16,7 +16,7 @@ --> - + diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 59a4148f..a6f988a2 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -16,6 +16,9 @@ --> + 42dp + 56dp + 12dp 56dp 8dp 20sp diff --git a/src/com/android/messaging/BugleApplication.java b/src/com/android/messaging/BugleApplication.java index 8470ca19..848066ce 100644 --- a/src/com/android/messaging/BugleApplication.java +++ b/src/com/android/messaging/BugleApplication.java @@ -26,6 +26,7 @@ import android.os.Looper; import android.telephony.CarrierConfigManager; +import com.google.android.material.color.DynamicColors; import com.android.messaging.datamodel.DataModel; import com.android.messaging.receiver.SmsReceiver; import com.android.messaging.sms.BugleUserAgentInfoLoader; @@ -71,6 +72,7 @@ public static boolean isRunningTests() { @Override public void onCreate() { Trace.beginSection("app.onCreate"); + DynamicColors.applyToActivitiesIfAvailable(this); super.onCreate(); // Note onCreate is called in both test and real application environments @@ -195,14 +197,14 @@ private void maybeStartProfiling() { if (file != null) { android.os.Debug.startMethodTracing(file.getAbsolutePath(), 160 * 1024 * 1024); new Handler(Looper.getMainLooper()).postDelayed( - new Runnable() { + new Runnable() { @Override public void run() { android.os.Debug.stopMethodTracing(); // Allow world to see trace file DebugUtils.ensureReadable(file); LogUtil.d(LogUtil.PROFILE_TAG, "Tracing complete - " - + file.getAbsolutePath()); + + file.getAbsolutePath()); } }, 30000); } diff --git a/src/com/android/messaging/ui/ContactIconView.java b/src/com/android/messaging/ui/ContactIconView.java index 44983ab5..64fd3ddc 100644 --- a/src/com/android/messaging/ui/ContactIconView.java +++ b/src/com/android/messaging/ui/ContactIconView.java @@ -57,7 +57,7 @@ public ContactIconView(final Context context, final AttributeSet attrs) { final Resources resources = context.getResources(); final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ContactIconView); - final int iconSizeId = a.getInt(R.styleable.ContactIconView_iconSize, 0); + final int iconSizeId = a.getInt(R.styleable.ContactIconView_contactIconSize, 0); switch (iconSizeId) { case NORMAL_ICON_SIZE_ID: mIconSize = (int) resources.getDimension(