Code example for BitmapDrawable

0
 
  @Test 
  public void queryActivityIcons__Match() throws Exception { 
    Intent i = new Intent();
    i.setComponent(new ComponentName(TEST_PACKAGE_NAME, ""));
    Drawable d = new BitmapDrawable();
 
    rpm.addActivityIcon(i, d);
 
    assertThat(rpm.getActivityIcon(i)).isSameAs(d);
    assertThat(rpm.getActivityIcon(i.getComponent())).isSameAs(d);
  } 
 
  @Test 
  public void hasSystemFeature() throws Exception { 
    // uninitialized 
    assertThat(rpm.hasSystemFeature(PackageManager.FEATURE_CAMERA)).isFalse();
 
    // positive 
    rpm.setSystemFeature(PackageManager.FEATURE_CAMERA, true);
Stop searching for code, let great code find you!  Add Codota to your java IDE