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

Commit 49ae8f2e authored by Daniel Sandler's avatar Daniel Sandler Committed by Android Git Automerger
Browse files

am d7468176: am 5bba07eb: am ad7719de: Merge "Crash apps with bad notification icons." into mnc-dev

* commit 'd7468176':
  Crash apps with bad notification icons.
parents 413493b5 d7468176
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -41,6 +41,7 @@ import android.content.res.Resources;
import android.database.ContentObserver;
import android.database.ContentObserver;
import android.graphics.PorterDuff;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.AsyncTask;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Build;
import android.os.Bundle;
import android.os.Bundle;
@@ -1713,10 +1714,16 @@ public abstract class BaseStatusBar extends SystemUI implements
                sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), n);
                sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), n);
        iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
        iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);


        final Icon smallIcon = n.getSmallIcon();
        if (smallIcon == null) {
            handleNotificationError(sbn,
                    "No small icon in notification from " + sbn.getPackageName());
            return null;
        }
        final StatusBarIcon ic = new StatusBarIcon(
        final StatusBarIcon ic = new StatusBarIcon(
                sbn.getUser(),
                sbn.getUser(),
                sbn.getPackageName(),
                sbn.getPackageName(),
                n.getSmallIcon(),
                smallIcon,
                n.iconLevel,
                n.iconLevel,
                n.number,
                n.number,
                n.tickerText);
                n.tickerText);