am ad4bc607: Merge change 21772 into donut
Merge commit 'ad4bc607bd236dd9b06df9cf89dc5e14541ff66c' into eclair * commit 'ad4bc607bd236dd9b06df9cf89dc5e14541ff66c': Fix Resources#opeRawResource(int, TypedValue) in layoutlib.
This commit is contained in:
@@ -496,6 +496,24 @@ public final class BridgeResources extends Resources {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream openRawResource(int id, TypedValue value) throws NotFoundException {
|
||||||
|
getValue(id, value, true);
|
||||||
|
|
||||||
|
File f = new File(value.string.toString());
|
||||||
|
if (f.isFile()) {
|
||||||
|
try {
|
||||||
|
return new FileInputStream(f);
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
NotFoundException exception = new NotFoundException();
|
||||||
|
exception.initCause(e);
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new NotFoundException();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AssetFileDescriptor openRawResourceFd(int id) throws NotFoundException {
|
public AssetFileDescriptor openRawResourceFd(int id) throws NotFoundException {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
|||||||
Reference in New Issue
Block a user