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

Commit c682034a authored by Mady Mellor's avatar Mady Mellor
Browse files

Add a check at the global level for notification bubbles being enabled

None of the checks in NoManService for 'flag bubble' encorporated the
global setting... this CL adds a check for that.

Test changes:
* Moves prefs set up into a helper function so it's clear whether
  bubbles are enabled / disabled at different levels:
  - global
  - app
  - channel
* Adds an additional test to make sure flag isn't applied when disabled
  at app level

Test: atest NotificationManagerServiceTest
Bug: 132699005
Change-Id: I937b6984f4698cfe026d3e34f4808adfb969392d
parent 8281f9c4
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -4818,6 +4818,7 @@ public class NotificationManagerService extends SystemService {
        // Does the app want to bubble & is able to bubble
        // Does the app want to bubble & is able to bubble
        boolean canBubble = notification.getBubbleMetadata() != null
        boolean canBubble = notification.getBubbleMetadata() != null
                && mPreferencesHelper.areBubblesAllowed(pkg, userId)
                && mPreferencesHelper.areBubblesAllowed(pkg, userId)
                && mPreferencesHelper.bubblesEnabled(r.sbn.getUser())
                && r.getChannel().canBubble()
                && r.getChannel().canBubble()
                && !mActivityManager.isLowRamDevice();
                && !mActivityManager.isLowRamDevice();


+59 −146

File changed.

Preview size limit exceeded, changes collapsed.