Merge "Don't query direct share for work profile when its turned off" into rvc-dev

This commit is contained in:
Antoan Angelov
2020-06-02 10:33:55 +00:00
committed by Android (Google) Code Review

View File

@@ -2784,6 +2784,13 @@ public class ChooserActivity extends ResolverActivity implements
return;
}
// no need to query direct share for work profile when its turned off
UserManager userManager = getSystemService(UserManager.class);
if (userManager.isQuietModeEnabled(chooserListAdapter.getUserHandle())) {
getChooserActivityLogger().logSharesheetAppLoadComplete();
return;
}
if (ChooserFlags.USE_SHORTCUT_MANAGER_FOR_DIRECT_TARGETS
|| ChooserFlags.USE_PREDICTION_MANAGER_FOR_DIRECT_TARGETS) {
if (DEBUG) {