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

Commit b87d34a3 authored by Stefan Andonian's avatar Stefan Andonian
Browse files

Add Debug Logs to AllAppsStore's dump for Bitmap flags

Bitmap flag state determines whether or not the work badge is shown.
Sometimes, it is not present when it should be. This state is necessary
for determining why the badges are not showing.

Bug: 377618519
Test: Verified that the logs don't crash the app when they are printed. Used command: adb shell dumpsys activity com.google.android.apps.nexuslauncher.NexusLauncherActivity | grep -A 68 "AllAppsStore"
Flag: EXEMPT bug logs
Change-Id: Ie52ccb899ac822b91eb1dbe4a60b7e238824401b
parent 8bc864a4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -63,6 +63,10 @@ public class BitmapInfo {
    private ThemedBitmap mThemedBitmap;

    public @BitmapInfoFlags int flags;

    // b/377618519: These are saved to debug why work badges sometimes don't show up on work apps
    public @DrawableCreationFlags int creationFlags;

    private BitmapInfo badgeInfo;

    public BitmapInfo(Bitmap icon, int color) {
@@ -152,6 +156,7 @@ public class BitmapInfo {

    protected void applyFlags(Context context, FastBitmapDrawable drawable,
            @DrawableCreationFlags int creationFlags) {
        this.creationFlags = creationFlags;
        drawable.mDisabledAlpha = GraphicsUtils.getFloat(context, R.attr.disabledIconAlpha, 1f);
        drawable.mCreationFlags = creationFlags;
        if ((creationFlags & FLAG_NO_BADGE) == 0) {