Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android notifs: Fix regression where notifs dropped when avatar not fetched #5138

Merged
merged 2 commits into from
Nov 23, 2021

Commits on Nov 23, 2021

  1. android notif: Fix regression where notifs dropped when avatar not fe…

    …tched
    
    `IconCompat.createWithBitmap` [1] expects a non-null Bitmap object.
    Since abd605d, we've been directly passing the value returned from
    our own `fetchBitmap` function, which sometimes returns null. It
    seems like the symptom would be a failure to deliver a notification
    when the value is null.
    
    So, go back to not calling `IconCompat.createWithBitmap` unless we
    get a non-null value from `fetchBitmap`.
    
    See discussion at
      https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/sentry.20IllegalArgumentException.3A.20Bitmap.20must.20not.20be.20null.2E/near/1283842.
    
    [1] https://developer.android.com/reference/androidx/core/graphics/drawable/IconCompat#createWithBitmap(android.graphics.Bitmap)
    chrisbobbe authored and gnprice committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    246e555 View commit details
    Browse the repository at this point in the history
  2. android notif [nfc]: Tweak formatting on builder usage

    This makes the boring parts of this pattern a bit more compact
    (just a single line at the start and another at the end), and
    the same as we do for the notification builders below.
    gnprice committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    503b06a View commit details
    Browse the repository at this point in the history