Strange force close on acore when adding a home screen shortcut
<p>I want to add home screen shortcuts to individual chat rooms, in my app.  Here's my code to do so:</p>

<pre><code>Intent roomIntent = roomIntent(room).putExtra("shortcut", true);

Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, roomIntent);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, room.name);

Parcelable resource = Intent.ShortcutIconResource.fromContext(this, R.drawable.icon);
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, resource);

setResult(RESULT_OK, intent);       
finish();
</code></pre>

<p>When I go to add the shortcut to my home screen, I get a Force Close, not on my own process, but on com.android.acore(!).  I've run the debugger and verified that my code gets executed all the way to the call to finish().</p>

<p>If I do this instead for the EXTRA_SHORTCUT_ICON:</p>

<pre><code>intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, R.drawable.icon);
</code></pre>

<p>It works fine and places the shortcut, and the shortcut behaves correctly -- but of course the shortcut has the stock Android icon, not mine, since this isn't the proper way to specify the icon.</p>

<p>When I look at the source code of other apps that have done this, and at <a href="http://dev.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/LauncherShortcuts.html" rel="nofollow">the one example</a> of it in the official Android reference area, my code looks identical.  My icon's a standard 48x48 png that I use for the app's main icon, without problems.  I've verified this problem on an emulator running stock 1.6, haven't tested other versions.</p>

<p>I have no idea what I'm doing wrong.  Any ideas?</p>
