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: Ia52ae49cdf9dcfda7ffbef1e7c71f2a17782fbae
This commit is contained in:
Stefan Andonian
2024-12-19 19:06:57 +00:00
parent 8da7f25ccb
commit a87a57277d
@@ -261,12 +261,14 @@ public class AllAppsStore<T extends Context & ActivityContext> {
writer.println(prefix + "\tAllAppsStore Apps[] size: " + mApps.length);
for (int i = 0; i < mApps.length; i++) {
writer.println(String.format(Locale.getDefault(),
"%s\tPackage index, name, class, and description: %d/%s:%s, %s",
"%s\tPackage index, name, class, description, bitmap flag: %d/%s:%s, %s, %s+%s",
prefix,
i,
mApps[i].componentName.getPackageName(),
mApps[i].componentName.getClassName(),
mApps[i].contentDescription));
mApps[i].contentDescription,
Integer.toBinaryString(mApps[i].bitmap.flags),
Integer.toBinaryString(mApps[i].bitmap.creationFlags)));
}
}
}