Merge "Only show Bubbles link for messaging apps" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
73b6bfc1e8
@@ -72,9 +72,20 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
if (!super.isAvailable()) {
|
||||
// copy rather than inherit super's isAvailable because apps can link to this page
|
||||
// as part of onboarding, before they send a valid conversation notification
|
||||
if (mAppRow == null) {
|
||||
return false;
|
||||
}
|
||||
if (mAppRow.banned) {
|
||||
return false;
|
||||
}
|
||||
if (mChannel != null) {
|
||||
if (mBackend.onlyHasDefaultChannel(mAppRow.pkg, mAppRow.uid)
|
||||
|| NotificationChannel.DEFAULT_CHANNEL_ID.equals(mChannel.getId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (mAppRow.bubblePreference == BUBBLE_PREFERENCE_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user