Move 'show hidden channels' option

Make it more prominent to make it more clear what's happening
when you unblock an app

Test: DeletedChannelsPreferenceControllerTest
Test: ShowMorePreferenceControllerTest
Flag: com.android.server.notification.notification_hide_unused_channels
Bug: 322536537
Change-Id: I745b2037b4dc907a4307fa7f70ecc3a4c9db2dd2
This commit is contained in:
Julia Reynolds
2024-06-25 16:46:41 -04:00
parent add6f2d24f
commit 477ebd25f2
9 changed files with 227 additions and 45 deletions

View File

@@ -21,6 +21,8 @@ import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_CACHED;
import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_DYNAMIC;
import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED_BY_ANY_LAUNCHER;
import static com.android.server.notification.Flags.notificationHideUnusedChannels;
import android.app.INotificationManager;
import android.app.NotificationChannel;
import android.app.NotificationChannelGroup;
@@ -78,6 +80,9 @@ public class NotificationBackend {
public AppRow loadAppRow(Context context, PackageManager pm, ApplicationInfo app) {
final AppRow row = new AppRow();
if (notificationHideUnusedChannels()) {
row.showAllChannels = false;
}
row.pkg = app.packageName;
row.uid = app.uid;
try {
@@ -686,5 +691,6 @@ public class NotificationBackend {
public int channelCount;
public Map<String, NotificationsSentState> sentByChannel;
public NotificationsSentState sentByApp;
public boolean showAllChannels = true;
}
}