Merge "Fix crash in secondary user"

This commit is contained in:
TreeHugger Robot
2017-03-03 23:10:28 +00:00
committed by Android (Google) Code Review

View File

@@ -1035,7 +1035,8 @@ public class ChooserActivity extends ResolverActivity {
LauncherApps.ShortcutQuery query = new LauncherApps.ShortcutQuery();
query.setIntent(getTargetIntent());
query.setQueryFlags(LauncherApps.ShortcutQuery.FLAG_MATCH_CHOOSER);
List<ShortcutInfo> shortcuts = launcherApps.getShortcuts(query, UserHandle.SYSTEM);
List<ShortcutInfo> shortcuts = launcherApps.getShortcuts(query,
android.os.Process.myUserHandle());
if (DEBUG) Log.d(TAG, "Adding " + shortcuts.size() + " chooser shortcuts");
addShortcuts(shortcuts);
mAreChooserShortcutsRetrieved = true;