List of usage examples for android.widget ActivityChooserModel getActivityCount
@UnsupportedAppUsage public int getActivityCount()
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; }/* w w w .j a v a 2 s. c o m*/ } Log.i(TAG, "<getErrMsgWhenStartActivityFail> return null"); return null; }