Add new filter to list private space apps when not in quite mode
This change handles listing of private space apps in Settings > Sound & vibration > Do Not Disturb > Apps page. Based on the new filter this page - lists the apps from private space whenever profile is unlocked. - when quite mode enabled privat space apps in the list is hidden. Recording Link: b/322316632#comment3 Bug: 322316632 Test: Manual Change-Id: Ie8a7b3376351c031a1abb8488eceb7859a1930fd
This commit is contained in:
@@ -118,7 +118,10 @@ public class ZenModeAddBypassingAppsPreferenceController extends AbstractPrefere
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplicationsState.AppFilter filter = ApplicationsState.FILTER_ALL_ENABLED;
|
ApplicationsState.AppFilter filter = android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||||
|
&& android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()
|
||||||
|
? ApplicationsState.FILTER_ENABLED_NOT_QUIET
|
||||||
|
: ApplicationsState.FILTER_ALL_ENABLED;
|
||||||
mAppSession.rebuild(filter, ApplicationsState.ALPHA_COMPARATOR);
|
mAppSession.rebuild(filter, ApplicationsState.ALPHA_COMPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,7 +45,6 @@ import com.android.settingslib.widget.AppPreference;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a preference to the PreferenceScreen for each notification channel that can bypass DND.
|
* Adds a preference to the PreferenceScreen for each notification channel that can bypass DND.
|
||||||
*/
|
*/
|
||||||
@@ -107,7 +106,10 @@ public class ZenModeAllBypassingAppsPreferenceController extends AbstractPrefere
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplicationsState.AppFilter filter = ApplicationsState.FILTER_ALL_ENABLED;
|
ApplicationsState.AppFilter filter = android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||||
|
&& android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()
|
||||||
|
? ApplicationsState.FILTER_ENABLED_NOT_QUIET
|
||||||
|
: ApplicationsState.FILTER_ALL_ENABLED;
|
||||||
mAppSession.rebuild(filter, ApplicationsState.ALPHA_COMPARATOR);
|
mAppSession.rebuild(filter, ApplicationsState.ALPHA_COMPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -82,7 +82,10 @@ public class ZenModeBypassingAppsPreferenceController extends AbstractZenModePre
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplicationsState.AppFilter filter = ApplicationsState.FILTER_ALL_ENABLED;
|
ApplicationsState.AppFilter filter = android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||||
|
&& android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()
|
||||||
|
? ApplicationsState.FILTER_ENABLED_NOT_QUIET
|
||||||
|
: ApplicationsState.FILTER_ALL_ENABLED;
|
||||||
List<ApplicationsState.AppEntry> apps = mAppSession.rebuild(filter,
|
List<ApplicationsState.AppEntry> apps = mAppSession.rebuild(filter,
|
||||||
ApplicationsState.ALPHA_COMPARATOR);
|
ApplicationsState.ALPHA_COMPARATOR);
|
||||||
updateAppsBypassingDndSummaryText(apps);
|
updateAppsBypassingDndSummaryText(apps);
|
||||||
|
@@ -162,4 +162,7 @@ public class ZenModeAddBypassingAppsPreferenceControllerTest {
|
|||||||
assertThat(pref.getKey()).isEqualTo(
|
assertThat(pref.getKey()).isEqualTo(
|
||||||
ZenModeAddBypassingAppsPreferenceController.KEY_NO_APPS);
|
ZenModeAddBypassingAppsPreferenceController.KEY_NO_APPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(b/331624810): Add tests to verify updateAppList() when the filter is
|
||||||
|
// ApplicationsState.FILTER_ENABLED_NOT_QUIET
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user