title: getLaunchIntentForPackage is null for apps
body: <ol>
  <li><p>I'm building installed apps in alert grid view. and I am selecting
  some favorite apps and adding into another grid view after that if
  I select any app from new gridview app its getting Intent value (<strong>getLaunchIntentForPackage</strong>) is null.</p>
  
  <pre><code>quick_links_alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int whichButton) {
              List&lt;String&gt; mArrayProducts = clad.getCheckedItems();
              final QuickLinksGridViewAdaptor selected_apps = new QuickLinksGridViewAdaptor(HomeActivity.this, mArrayProducts);
              gv_shortcut.setAdapter(selected_apps);
              Toast.makeText(getApplicationContext(),"Selected Items--&gt;:"+mArrayProducts,Toast.LENGTH_LONG).show();
              PackageManager pm = HomeActivity.this.getPackageManager();
              Intent quick_intent = new Intent(Intent.ACTION_MAIN, null);
              final List&lt;ResolveInfo&gt; list = pm.queryIntentActivities(quick_intent, PackageManager.PERMISSION_GRANTED);
              gv_shortcut.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                      final String packageName = list.get(position).activityInfo.packageName;
                      Intent PackageManagerIntent = getPackageManager().getLaunchIntentForPackage(packageName);
                      if (PackageManagerIntent != null) {
                          startActivity(PackageManagerIntent);
                      }
                      else {
                          Toast.makeText(getApplicationContext(),"NULL",Toast.LENGTH_LONG).show();
                      }
                  }
              });
          }
  In my grid view 8 applications are available.If I click any application its PackageManagerIntent is getting null and 1 and 3 position application its always open google search engine and player application is opening.
  </code></pre></li>
  </ol>