summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-08-11 10:16:17 -0700
committerXavier Ducrohet <xav@android.com>2011-08-11 12:57:51 -0700
commit7f9f99ea11051614a7727dfb9f9578b518e76e3c (patch)
treed39b916bb092a717e028345813b53f6bcfa12f61 /tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
parent7277f3b9b26f0011475b39da1298484a510aca29 (diff)
downloadframeworks_base-7f9f99ea11051614a7727dfb9f9578b518e76e3c.zip
frameworks_base-7f9f99ea11051614a7727dfb9f9578b518e76e3c.tar.gz
frameworks_base-7f9f99ea11051614a7727dfb9f9578b518e76e3c.tar.bz2
Make some methods/fields package private so that layoutlib can access them.
Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
Diffstat (limited to 'tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
index 66e59d8..eadec02 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
@@ -22,7 +22,6 @@ import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.resources.Density;
import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
-import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.os.Parcel;
@@ -149,7 +148,7 @@ public final class Bitmap_Delegate {
}
public static int getBufferedImageType(int nativeBitmapConfig) {
- switch (Config.sConfigs[nativeBitmapConfig]) {
+ switch (Config.nativeToConfig(nativeBitmapConfig)) {
case ALPHA_8:
return BufferedImage.TYPE_INT_ARGB;
case RGB_565:
@@ -210,7 +209,7 @@ public final class Bitmap_Delegate {
}
// create a delegate with the content of the stream.
- Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.sConfigs[nativeConfig]);
+ Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.nativeToConfig(nativeConfig));
return createBitmap(delegate, mutable, Bitmap.getDefaultDensity());
}
@@ -238,7 +237,7 @@ public final class Bitmap_Delegate {
image.setRGB(0, 0, width, height, argb, 0, width);
// create a delegate with the content of the stream.
- Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.sConfigs[nativeConfig]);
+ Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.nativeToConfig(nativeConfig));
return createBitmap(delegate, isMutable, Bitmap.getDefaultDensity());
}