Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8b5c05f authored by Anna Zappone's avatar Anna Zappone Committed by Android (Google) Code Review
Browse files

Merge "Fix LTR & conversation updates on main thread" into sc-dev

parents fd4a4a3e 4a6e13f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
        <LinearLayout
            android:orientation="vertical"
            android:paddingEnd="20dp"
            android:gravity="bottom"
            android:gravity="start|bottom"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">

+5 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@
                    android:id="@+id/name"
                    android:layout_gravity="start|center_vertical"
                    android:gravity="start|center_vertical"
                    android:layout_weight="1"
                    android:text="@string/empty_user_name"
                    android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
                    android:textColor="?android:attr/textColorPrimary"
@@ -123,9 +122,14 @@
                    android:paddingEnd="8dp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />
                <TextView
                    android:layout_weight="1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />
                <TextView
                    android:id="@+id/messages_count"
                    android:gravity="end"
                    android:layout_weight="1"
                    android:paddingStart="8dp"
                    android:paddingEnd="8dp"
                    android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
+4 −4
Original line number Diff line number Diff line
@@ -348,7 +348,7 @@ public class PeopleTileViewHelper {
        if (mWidth >= getSizeInDp(R.dimen.required_width_for_medium)) {
            int spaceAvailableForPadding =
                    mHeight - (getSizeInDp(R.dimen.avatar_size_for_medium)
                            + getLineHeightFromResource(
                            + 4 + getLineHeightFromResource(
                            R.dimen.name_text_size_for_content));
            if (DEBUG) {
                Log.d(TAG, "Medium view for mWidth: " + mWidth + " mHeight: " + mHeight
@@ -558,9 +558,6 @@ public class PeopleTileViewHelper {
        }
        views.setViewVisibility(R.id.predefined_icon, View.VISIBLE);
        views.setTextViewText(R.id.text_content, statusText);
        if (mLayoutSize == LAYOUT_LARGE) {
            views.setInt(R.id.content, "setGravity", Gravity.BOTTOM);
        }

        Icon statusIcon = status.getIcon();
        if (statusIcon != null) {
@@ -570,6 +567,7 @@ public class PeopleTileViewHelper {
            // Show 1-line subtext on large layout with status images.
            if (mLayoutSize == LAYOUT_LARGE) {
                if (DEBUG) Log.d(TAG, "Remove name for large");
                views.setInt(R.id.content, "setGravity", Gravity.BOTTOM);
                views.setViewVisibility(R.id.name, View.GONE);
                views.setColorAttr(R.id.text_content, "setTextColor",
                        android.R.attr.textColorPrimary);
@@ -830,6 +828,8 @@ public class PeopleTileViewHelper {
            views.setViewPadding(R.id.name, 0, 0, 0,
                    mContext.getResources().getDimensionPixelSize(
                            R.dimen.below_name_text_padding));
            // All large layouts besides missed calls & statuses with images, have gravity top.
            views.setInt(R.id.content, "setGravity", Gravity.TOP);
        }

        // For all layouts except Missed Calls, ensure predefined icon is regular sized.
+2 −1
Original line number Diff line number Diff line
@@ -199,7 +199,8 @@ public class PeopleSpaceWidgetManager {
                        "Received updated conversation: "
                                + conversation.getShortcutInfo().getLabel());
            }
            updateWidgetsWithConversationChanged(conversation);
            mBgExecutor.execute(() ->
                    updateWidgetsWithConversationChanged(conversation));
        }
    }