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

Commit 9bcfc69a authored by lyn's avatar lyn
Browse files

Remove debug toggle for bitmap expiration time

Bug: 303716154
Bug: 409605823
Test: presubmit
Flag: EXEMPT removing debug option
Change-Id: I4b7b16c7292fa8662bae13cd56baa79043ed5eb5
parent e6db6afc
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -84,10 +84,6 @@ public class SystemUiSystemPropertiesFlags {
        /** Value used by polite notif. feature */
        public static final Flag NOTIF_AVALANCHE_TIMEOUT = devFlag(
                "persist.debug.sysui.notification.notif_avalanche_timeout", 120_000);

        /** b/303716154: For debugging only: use short bitmap duration. */
        public static final Flag DEBUG_SHORT_BITMAP_DURATION = devFlag(
                "persist.sysui.notification.debug_short_bitmap_duration");
    }

    //// == End of flags.  Everything below this line is the implementation. == ////
+2 −21
Original line number Diff line number Diff line
@@ -3539,20 +3539,9 @@ public class NotificationManagerService extends SystemService {
            mPreferencesHelper.updateFixedImportance(mUm.getUsers());
            mPreferencesHelper.migrateNotificationPermissions(mUm.getUsers());
        } else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
            if (mFlagResolver.isEnabled(NotificationFlags.DEBUG_SHORT_BITMAP_DURATION)) {
                new Thread(() -> {
                    while (true) {
                        try {
                            Thread.sleep(5000);
                        } catch (InterruptedException e) { }
                        mInternalService.removeBitmaps();
                    }
                }).start();
            } else {
            NotificationBitmapJobService.scheduleJob(getContext());
        }
    }
    }
    @Override
    public void onUserUnlocked(@NonNull TargetUser user) {
@@ -8531,15 +8520,7 @@ public class NotificationManagerService extends SystemService {
                    // System#currentTimeMillis when posted
                    final long timePostedMs = r.getSbn().getPostTime();
                    final long timeNowMs = System.currentTimeMillis();
                    final long bitmapDuration;
                    if (mFlagResolver.isEnabled(NotificationFlags.DEBUG_SHORT_BITMAP_DURATION)) {
                        bitmapDuration = Duration.ofSeconds(5).toMillis();
                    } else {
                        bitmapDuration = BITMAP_DURATION.toMillis();
                    }
                    if (isBitmapExpired(timePostedMs, timeNowMs, bitmapDuration)) {
                    if (isBitmapExpired(timePostedMs, timeNowMs, BITMAP_DURATION.toMillis())) {
                        removeBitmapAndRepost(r);
                    }
                }