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

Commit 003859cd authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Show remote action's description in SearchResultIconRow

Validated against Pixel Tips corpus

Change-Id: I3c3f8eb69007a97e55e2ef08e7f4e0b800bfe247
parent 984e0d0a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
            android:id="@id/title"
            android:layout_height="wrap_content"
            android:gravity="start|center_vertical"
            android:maxLines="1"
            android:textAlignment="viewStart"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="@dimen/search_hero_title_size" />
@@ -45,6 +46,7 @@
        <TextView
            android:layout_width="wrap_content"
            android:id="@+id/desc"
            android:maxLines="1"
            android:textColor="?android:attr/textColorTertiary"
            android:textSize="@dimen/search_hero_subtitle_size"
            android:layout_height="wrap_content" />
+7 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ShortcutInfo;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Pair;
import android.view.View;
@@ -125,6 +126,12 @@ public class SearchResultIconRow extends LinearLayout implements
                    shortcutInfo.getUserHandle());
        } else if (itemType.equals(SearchResultIcon.TARGET_TYPE_HERO_APP)) {
            showInlineShortcuts(mSearchTarget.getShortcutInfos());
        } else if (itemType.equals(SearchResultIcon.TARGET_TYPE_REMOTE_ACTION)) {
            CharSequence desc = mSearchTarget.getRemoteAction().getContentDescription();
            if (!TextUtils.isEmpty(desc)) {
                mDescriptionView.setVisibility(VISIBLE);
                mDescriptionView.setText(desc);
            }
        }
        if (!itemType.equals(SearchResultIcon.TARGET_TYPE_HERO_APP)) {
            showInlineShortcuts(new ArrayList<>());