Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f369b719 authored by Xavier Ducrohet's avatar Xavier Ducrohet Committed by Android Git Automerger
Browse files

am ad4bc607: Merge change 21772 into donut

Merge commit 'ad4bc607' into eclair

* commit 'ad4bc607':
  Fix Resources#opeRawResource(int, TypedValue) in layoutlib.
parents d97bcef6 ad4bc607
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -496,6 +496,24 @@ public final class BridgeResources extends Resources {
        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
    public AssetFileDescriptor openRawResourceFd(int id) throws NotFoundException {
        throw new UnsupportedOperationException();