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

Commit a07cc761 authored by Jernej Virag's avatar Jernej Virag Committed by Android Build Coastguard Worker
Browse files

Size restrict right icon size in notification

This is to prevent large bitmaps from using too much memory in
notifications.

Bug:210690571
Bug:218845090

Test: Tested on device
      atest android.app.cts.NotificationTemplateTest

Change-Id: I2f3d04546af58edbe7bae2b7d856ab3d87365fdf
(cherry picked from commit d6842211)
Merged-In: I2f3d04546af58edbe7bae2b7d856ab3d87365fdf
parent a6d0f6e5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -138,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"
@@ -150,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"
    />