Use hasSentValidBubble in settings

This change makes it such that bubble settings will only be available once
the app has sent a bubble notification.

Test: atest BubbleSummaryPreferenceControllerTest
Bug: 178387292
Change-Id: I459ffcedc4194d953e8b7170937e2eb5334d1422
This commit is contained in:
Mady Mellor
2022-01-12 14:05:35 -08:00
parent 3ae979bf27
commit f9fc2e0d1e
3 changed files with 13 additions and 4 deletions

View File

@@ -361,6 +361,15 @@ public class NotificationBackend {
}
}
public boolean hasSentValidBubble(String pkg, int uid) {
try {
return sINM.hasSentValidBubble(pkg, uid);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
return false;
}
}
/**
* Returns all notification channels associated with the package and uid that will bypass DND
*/