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

Commit 75c4c6e6 authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge "Add toggle for bundling test apk notifs and debug logging" into main

parents 2a11ba71 d4689ff4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -289,6 +289,9 @@ public class ShadeListBuilder implements Dumpable, PipelineDumpable {

        mIdToBundleEntry.clear();
        for (String id: mNotifBundler.getBundleIds()) {
            if (BundleCoordinator.debugBundleUi) {
                Log.i(TAG, "create BundleEntry with id: " + id);
            }
            mIdToBundleEntry.put(id, new BundleEntry(id));
        }
    }
+11 −1
Original line number Diff line number Diff line
@@ -98,9 +98,14 @@ class BundleCoordinator @Inject constructor(
        object : NotifBundler("NotifBundler") {

            // Use list instead of set to keep fixed order
            override val bundleIds: List<String> = SYSTEM_RESERVED_IDS
            override val bundleIds: List<String> =
                if (debugBundleUi) SYSTEM_RESERVED_IDS + "notify"
                else SYSTEM_RESERVED_IDS

            override fun getBundleIdOrNull(entry: NotificationEntry?): String? {
                if (debugBundleUi && entry?.key?.contains("notify") == true) {
                    return "notify"
                }
                return entry?.representativeEntry?.channel?.id?.takeIf { it in this.bundleIds }
            }
        }
@@ -110,4 +115,9 @@ class BundleCoordinator @Inject constructor(
            pipeline.setNotifBundler(bundler)
        }
    }

    companion object {
        @kotlin.jvm.JvmField
        var debugBundleUi: Boolean = true
    }
}