From 4fa8a61fdf20f90e2242938bacb3ca110ca4e874 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Wed, 23 Jan 2019 15:28:30 -0800 Subject: [PATCH] Ignore the storage group in the Privacy bar chart. We already filter out the storage group in the Permissions Hub because it's going away and it produces false events. This also filters it out in the privacy bar chart so the two are consistent. Test: Do not see the storage group in the privacy bar chart. Change-Id: I6d6bc5a767db06a738ae978cb086dad685cff386 --- .../privacy/PermissionBarChartPreferenceController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/settings/privacy/PermissionBarChartPreferenceController.java b/src/com/android/settings/privacy/PermissionBarChartPreferenceController.java index 3fac672b608..f815c5461bd 100644 --- a/src/com/android/settings/privacy/PermissionBarChartPreferenceController.java +++ b/src/com/android/settings/privacy/PermissionBarChartPreferenceController.java @@ -111,6 +111,9 @@ public class PermissionBarChartPreferenceController extends BasePreferenceContro return null; } + // STOPSHIP: Ignore the STORAGE group since it's going away. + usageInfos.removeIf(usage -> usage.getName().equals("android.permission-group.STORAGE")); + final BarViewInfo[] barViewInfos = new BarViewInfo[ Math.min(BarChartPreference.MAXIMUM_BAR_VIEWS, usageInfos.size())];