@@ -150,8 +150,7 @@ protected void onCreate(Bundle savedInstanceState, Intent intent,
150150
151151 resizeGrid ();
152152 } else if (count == 1 ) {
153- startActivityAsUser (mAdapter .intentForPosition (0 ),
154- new UserHandle (UserHandle .getUserId (mLaunchedFromUid )));
153+ startActivity (mAdapter .intentForPosition (0 ));
155154 mPackageMonitor .unregister ();
156155 mRegistered = false ;
157156 finish ();
@@ -364,20 +363,20 @@ protected void onIntentSelected(ResolveInfo ri, Intent intent, boolean alwaysChe
364363 if (r .match > bestMatch ) bestMatch = r .match ;
365364 }
366365 getPackageManager ().addPreferredActivity (filter , bestMatch , set ,
367- intent .getComponent (), UserHandle . getUserId ( mLaunchedFromUid ) );
366+ intent .getComponent ());
368367 }
369368 }
370369
371370 if (intent != null ) {
372- startActivityAsUser (intent , new UserHandle ( UserHandle . getUserId ( mLaunchedFromUid )) );
371+ startActivity (intent );
373372 }
374373 }
375374
376375 void showAppDetails (ResolveInfo ri ) {
377376 Intent in = new Intent ().setAction ("android.settings.APPLICATION_DETAILS_SETTINGS" )
378377 .setData (Uri .fromParts ("package" , ri .activityInfo .packageName , null ))
379378 .addFlags (Intent .FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET );
380- startActivityAsUser (in , new UserHandle ( UserHandle . getUserId ( mLaunchedFromUid )) );
379+ startActivity (in );
381380 }
382381
383382 private final class DisplayResolveInfo {
@@ -436,10 +435,9 @@ private void rebuildList() {
436435 if (mBaseResolveList != null ) {
437436 mCurrentResolveList = mBaseResolveList ;
438437 } else {
439- mCurrentResolveList = mPm .queryIntentActivitiesAsUser (
438+ mCurrentResolveList = mPm .queryIntentActivities (
440439 mIntent , PackageManager .MATCH_DEFAULT_ONLY
441- | (mAlwaysUseOption ? PackageManager .GET_RESOLVED_FILTER : 0 ),
442- UserHandle .getUserId (mLaunchedFromUid ));
440+ | (mAlwaysUseOption ? PackageManager .GET_RESOLVED_FILTER : 0 ));
443441 // Filter out any activities that the launched uid does not
444442 // have permission for. We don't do this when we have an explicit
445443 // list of resolved activities, because that only happens when
0 commit comments