// Copyright 2012 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.

#include "media/base/media.h"

#include "base/logging.h"

// This file is intended for platforms that don't need to load any media
// libraries (e.g., Android and iOS).
namespace media {

bool InitializeMediaLibrary(const base::FilePath& module_dir) {
  return true;
}

void InitializeMediaLibraryForTesting() {
}

bool IsMediaLibraryInitialized() {
  return true;
}

}  // namespace media

// Copyright 2012 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.

#include "media/base/media.h"

#include "base/logging.h"

#if defined(OS_ANDROID)
#include "base/android/jni_android.h"
#include "media/base/android/media_jni_registrar.h"
#endif

// This file is intended for platforms that don't need to load any media
// libraries (e.g., Android and iOS).
namespace media {

bool InitializeMediaLibrary(const base::FilePath& module_dir) {
  return true;
}

void InitializeMediaLibraryForTesting() {
#if defined(OS_ANDROID)
  // Register JNI bindings for android.
  JNIEnv* env = base::android::AttachCurrentThread();
  RegisterJni(env);
#endif
}

bool IsMediaLibraryInitialized() {
  return true;
}

}  // namespace media

Fix media and content unittests on Android debug bots
Android: Fix media and content unittests on Android debug bots

BUG=

Review URL: https://codereview.chromium.org/13467037

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@192880 0039d316-1c4b-4281-b951-d872f2087c98
