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

Commit 5943bac5 authored by Jernej Virag's avatar Jernej Virag
Browse files

Size restrict right notification icon size

Right now the right notification icon is always loaded at full resolution. This will downsample the icon to displayed size if the user passes a bitmap that's large.

Bug:218845090
Bug:210690571

Test: Manually on device

Change-Id: Ie759b99519ad77ee2af75c02b60d5db947808ed7
parent 6f2b34ba
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@
        android:layout_marginStart="@dimen/notification_icon_circle_start"
        android:background="@drawable/notification_icon_circle"
        android:padding="@dimen/notification_icon_circle_padding"
        android:maxDrawableWidth="@dimen/notification_icon_circle_size"
        android:maxDrawableHeight="@dimen/notification_icon_circle_size"
        />

    <!-- extends ViewGroup -->
+5 −1
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@
        android:layout_marginStart="@dimen/notification_icon_circle_start"
        android:background="@drawable/notification_icon_circle"
        android:padding="@dimen/notification_icon_circle_padding"
        android:maxDrawableWidth="@dimen/notification_icon_circle_size"
        android:maxDrawableHeight="@dimen/notification_icon_circle_size"
        />

    <FrameLayout
@@ -136,7 +138,7 @@

        </LinearLayout>

        <ImageView
        <com.android.internal.widget.CachingIconView
            android:id="@+id/right_icon"
            android:layout_width="@dimen/notification_right_icon_size"
            android:layout_height="@dimen/notification_right_icon_size"
@@ -148,6 +150,8 @@
            android:clipToOutline="true"
            android:importantForAccessibility="no"
            android:scaleType="centerCrop"
            android:maxDrawableWidth="@dimen/notification_right_icon_size"
            android:maxDrawableHeight="@dimen/notification_right_icon_size"
            />

        <FrameLayout
+3 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<ImageView
<com.android.internal.widget.CachingIconView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/right_icon"
    android:layout_width="@dimen/notification_right_icon_size"
@@ -25,4 +25,6 @@
    android:clipToOutline="true"
    android:importantForAccessibility="no"
    android:scaleType="centerCrop"
    android:maxDrawableWidth="@dimen/notification_right_icon_size"
    android:maxDrawableHeight="@dimen/notification_right_icon_size"
    />