List of usage examples for android.widget ActivityChooserModel getActivity
@UnsupportedAppUsage public ResolveInfo getActivity(int index)
From source file:com.android.gallery3d.app.PhotoPage.java
private String getErrMsgWhenStartActivityFail(ActivityChooserModel host, Intent intent) { int count = host.getActivityCount(); for (int i = 0; i < count; i++) { ResolveInfo rInfo = host.getActivity(i); if (rInfo != null && rInfo.activityInfo != null && rInfo.activityInfo.name != null && rInfo.activityInfo.name.equals(intent.getComponent().getClassName())) { String res = mActivity.getString( com.android.internal.R.string.activitychooserview_choose_application_error, rInfo.loadLabel(mActivity.getPackageManager())); Log.i(TAG, "<getErrMsgWhenStartActivityFail> return " + res); return res; }/*from ww w . j a v a 2s . c o m*/ } Log.i(TAG, "<getErrMsgWhenStartActivityFail> return null"); return null; }