Reading a contact as vcard on emulator
<p>Here is the snipped of code (which I tried to minimize, just to show the problem. And that's the reason why Uri is hardcoded. Real code receives Uri from Contacts application when a user does "Share" on a contact).</p>

<pre><code>    Uri uri = Uri.parse("content://com.android.contacts/contacts/as_vcard/0r1-47532F494753492F475349532F492F53492F3D533B49393B3D47532F");
    try {

        InputStream fis = getContentResolver().openInputStream(uri);

        byte[] buffer = new byte[1024];
        fis.read(buffer);
    } catch (Exception e)
    {
        Log.d("zzz", e.getMessage());
    }
</code></pre>

<p>Such code throws "java.io.IOException: read failed: EINVAL (Invalid argument)" on fis.read operation ONLY on emulator (and works fine on a real device). I tried it on Android 4.0.3 and 4.1.2 emulators (both of them fail)</p>

<p>I saw a similar questions (description of this problem):
<a href="http://stackoverflow.com/questions/12097692/android-read-failed-exception-when-trying-to-read-vcard-contact-data">Android read failed exception when trying to read vCard contact data</a></p>

<p>And a bug, which could be related (or not):
<a href="http://code.google.com/p/android/issues/detail?id=26480" rel="nofollow">http://code.google.com/p/android/issues/detail?id=26480</a></p>

<p>I am running automated tests on emulator and this problem prevents me from running couple of tests.</p>

<p>Two questions:</p>

<p>a) Have you seen this behavior?</p>

<p>b) Do you know any workaround for this problem?</p>
