title: Package manager has died
body: <p>I got mail from a user who has a lot of apps installed that he has problems when my app gathers activity info with this code:</p>
  
  <pre><code>getPackageManager().queryIntentActivities(mAinIntent, 0)
  </code></pre>
  
  <p>whole source here: <a href="https://github.com/ligi/FAST" rel="noreferrer">https://github.com/ligi/FAST</a></p>
  
  <p>this is what happens</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Package manager has died
  at android.app.ApplicationPackageManager.queryIntentActivities(ApplicationPackageManager.java:479)
  at org.ligi.fast.BaseAppGatherAsyncTask.doInBackground(BaseAppGatherAsyncTask.java:34)
  at org.ligi.fast.BaseAppGatherAsyncTask.doInBackground(BaseAppGatherAsyncTask.java:1)
  at android.os.AsyncTask$2.call(AsyncTask.java:287)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
  ... 5 more
  Caused by: android.os.TransactionTooLargeExceptionTransactionTooLargeException
  at android.os.BinderProxy.transact(Native Method)
  at android.content.pm.IPackageManager$Stub$Proxy.queryIntentActivities(IPackageManager.java:2230)
  at android.app.ApplicationPackageManager.queryIntentActivities(ApplicationPackageManager.java:473)
  ... 9 more
  Log:
  0 D: Writing unhandled exception to: /data/data/org.ligi.fast/files/3.7-1364933885194.tracedroid
  </code></pre>
  
  <p>there seems to be a problem that I am running against the 1mb border, but how to get out of there? How else can I get the needed info? Is there a way to chunk up the data?</p>