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

Commit 3daed108 authored by e.min's avatar e.min
Browse files

Delete size limitation for ContrastColorUtil.isGrayScale() method.

loss of performance is tiny because, image will be resized at ImageUtil.isGrayscale() method.

Test: situation that one notification is sended to other resoltion devices, ex) using DEX mode,
Test: notification can be inflated at different resolution context.
Test: and app can have notification icon that is made dynamically.
Test: (it doesn't have resource for each resolution. ex: calendar notice icon with number)
Test: at this moment, judgement for grayscale can be differed from each device.
Change-Id: I2755c56869aba58287137f683a81ec4ddfd3d7c1
parent 15863274
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ public class ContrastColorUtil {

    private ContrastColorUtil(Context context) {
        mGrayscaleIconMaxSize = context.getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.notification_large_icon_width);
                com.android.internal.R.dimen.notification_grayscale_icon_max_size);
    }

    /**
+2 −0
Original line number Diff line number Diff line
@@ -680,6 +680,8 @@
    <dimen name="notification_media_image_max_width_low_ram">100dp</dimen>
    <!-- The size of the right icon image when on low ram -->
    <dimen name="notification_right_icon_size_low_ram">@dimen/notification_right_icon_size</dimen>
    <!-- The maximum size of the grayscale icon -->
    <dimen name="notification_grayscale_icon_max_size">256dp</dimen>

    <dimen name="messaging_avatar_size">@dimen/notification_right_icon_size</dimen>

+1 −0
Original line number Diff line number Diff line
@@ -3388,6 +3388,7 @@
  <java-symbol type="dimen" name="notification_media_image_max_width_low_ram"/>
  <java-symbol type="dimen" name="notification_media_image_max_height_low_ram"/>
  <java-symbol type="dimen" name="notification_right_icon_size_low_ram"/>
  <java-symbol type="dimen" name="notification_grayscale_icon_max_size"/>
  <java-symbol type="dimen" name="notification_custom_view_max_image_height_low_ram"/>
  <java-symbol type="dimen" name="notification_custom_view_max_image_width_low_ram"/>