@@ -0,0 +1,1818 @@
+package com.xtremelabs.robolectric.res;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport com.xtremelabs.robolectric.Robolectric;%0Aimport com.xtremelabs.robolectric.WithTestDefaultsRunner;%0A%0Aimport android.content.pm.ApplicationInfo;%0Aimport android.content.pm.PackageInfo;%0A%0Aimport static org.hamcrest.CoreMatchers.*;%0Aimport static org.junit.Assert.assertThat;%0A%0A@RunWith(WithTestDefaultsRunner.class)%0Apublic class RobolectricPackageManagerTest %7B%0A%09%0A%09private static final String TEST_PACKAGE_NAME = %22com.some.other.package%22; %0A%09private static final String TEST_PACKAGE_LABEL = %22My Little App%22; %0A%09%0A%09RobolectricPackageManager rpm;%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%09rpm = (RobolectricPackageManager) Robolectric.application.getPackageManager();%0A%09%7D%0A%0A%09@After%0A%09public void tearDown() throws Exception %7B%0A%09%7D%0A%0A%09@Test%0A%09public void getApplicationInfo__ThisApplication() throws Exception %7B%0A%09%09ApplicationInfo info = rpm.getApplicationInfo(Robolectric.application.getPackageName(), 0);%0A%09%09assertThat( info, notNullValue() );%0A%09%09assertThat( info.packageName, equalTo(Robolectric.application.getPackageName()));%0A%09%7D%0A%09%0A%09@Test%0A%09public void getApplicationInfo__OtherApplication() throws Exception %7B%0A%09%09PackageInfo packageInfo = new PackageInfo();%0A%09%09packageInfo.packageName = TEST_PACKAGE_NAME;%0A%09%09packageInfo.applicationInfo = new ApplicationInfo();%0A%09%09packageInfo.applicationInfo.packageName = TEST_PACKAGE_NAME;%0A%09%09packageInfo.applicationInfo.name = TEST_PACKAGE_LABEL;%0A%09%09rpm.addPackage( packageInfo );%0A%09%09%0A%09%09ApplicationInfo info = rpm.getApplicationInfo(TEST_PACKAGE_NAME, 0);%0A%09%09assertThat(info, notNullValue() );%0A%09%09assertThat(info.packageName, equalTo(TEST_PACKAGE_NAME));%0A%09%09assertThat(rpm.getApplicationLabel(info).toString(), equalTo(TEST_PACKAGE_LABEL));%0A%09%7D%0A%09%0A%7D%0A

Add Intent#fillIn() and Intent#getCharSequenceExtra(). Enhanced PendingIntent#send to fill in Intent extras. Enhanced PackageManager#getApplicationInfo to recognize packages other than app itself.