Skip to content

Commit 1175ef7

Browse files
Xavier DucrohetAndroid (Google) Code Review
authored andcommitted
Merge "LayoutLib: Adapt the HC layoutlib to GB. do not merge." into gingerbread
2 parents a4350fc + 031d2f8 commit 1175ef7

40 files changed

+296
-1422
lines changed

tools/layoutlib/bridge/resources/bars/action_bar.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

tools/layoutlib/bridge/resources/bars/tablet_system_bar.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

tools/layoutlib/bridge/src/android/animation/PropertyValuesHolder_Delegate.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

tools/layoutlib/bridge/src/android/app/Fragment_Delegate.java

Lines changed: 0 additions & 104 deletions
This file was deleted.

tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,17 @@
136136
@LayoutlibDelegate
137137
/*package*/ static Bitmap nativeDecodeFileDescriptor(FileDescriptor fd,
138138
Rect padding, Options opts) {
139-
opts.inBitmap = null;
140139
return null;
141140
}
142141

143142
@LayoutlibDelegate
144143
/*package*/ static Bitmap nativeDecodeAsset(int asset, Rect padding, Options opts) {
145-
opts.inBitmap = null;
146144
return null;
147145
}
148146

149147
@LayoutlibDelegate
150148
/*package*/ static Bitmap nativeDecodeByteArray(byte[] data, int offset,
151149
int length, Options opts) {
152-
opts.inBitmap = null;
153150
return null;
154151
}
155152

@@ -159,9 +156,4 @@
159156
// BitmapFactory.finishDecode();
160157
return chunk;
161158
}
162-
163-
@LayoutlibDelegate
164-
/*package*/ static boolean nativeIsSeekable(FileDescriptor fd) {
165-
return true;
166-
}
167159
}

tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ public String getSupportMessage() {
7979
return sManager.addNewDelegate(newDelegate);
8080
}
8181

82-
@LayoutlibDelegate
83-
/*package*/ static int nativePostCreate(int native_shader, int native_bitmap,
84-
int shaderTileModeX, int shaderTileModeY) {
85-
// pass, not needed.
86-
return 0;
87-
}
88-
8982
// ---- Private delegate/helper methods ----
9083

9184
private BitmapShader_Delegate(java.awt.image.BufferedImage image,

tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ public final class Bitmap_Delegate {
6262
private final Config mConfig;
6363
private BufferedImage mImage;
6464
private boolean mHasAlpha = true;
65-
private int mGenerationId = 0;
66-
6765

6866
// ---- Public Helper methods ----
6967

@@ -186,15 +184,6 @@ public boolean hasAlpha() {
186184
return mHasAlpha && mConfig != Config.RGB_565;
187185
}
188186

189-
/**
190-
* Update the generationId.
191-
*
192-
* @see Bitmap#getGenerationId()
193-
*/
194-
public void change() {
195-
mGenerationId++;
196-
}
197-
198187
// ---- native methods ----
199188

200189
@LayoutlibDelegate
@@ -394,16 +383,6 @@ public void change() {
394383
"Bitmap.copyPixelsFromBuffer is not supported.", null, null /*data*/);
395384
}
396385

397-
@LayoutlibDelegate
398-
/*package*/ static int nativeGenerationId(int nativeBitmap) {
399-
Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap);
400-
if (delegate == null) {
401-
return 0;
402-
}
403-
404-
return delegate.mGenerationId;
405-
}
406-
407386
@LayoutlibDelegate
408387
/*package*/ static Bitmap nativeCreateFromParcel(Parcel p) {
409388
// This is only called by Bitmap.CREATOR (Parcelable.Creator<Bitmap>), which is only
@@ -525,7 +504,7 @@ private static Bitmap createBitmap(Bitmap_Delegate delegate, boolean isMutable,
525504
int nativeInt = sManager.addNewDelegate(delegate);
526505

527506
// and create/return a new Bitmap with it
528-
return new Bitmap(nativeInt, null /* buffer */, isMutable, null /*ninePatchChunk*/, density);
507+
return new Bitmap(nativeInt, isMutable, null /*ninePatchChunk*/, density);
529508
}
530509

531510
/**

0 commit comments

Comments
 (0)