blob: a17975c3a723fc06dc18301859f218faa4c74f52 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.ui.base;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
* This class provides the resource bundle related methods for the native library.
class ResourceBundle {
static boolean assetContainedInApk(Context ctx, String filename) {
try {
AssetManager am = ctx.getAssets();
AssetFileDescriptor afd = am.openFd(filename);
return true;
} catch (IOException e) {
return false;