Do not use android specific API in mojo/java.

R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1217573005.
This commit is contained in:
Benjamin Lerman 2015-07-06 14:56:14 +02:00
parent 2aaf77dc2e
commit 7600714a6f
3 changed files with 5 additions and 1 deletions

View File

@ -20,7 +20,6 @@ import java.util.concurrent.Executors;
* Android implementation of MediaService.
*/
public class MediaServiceImpl implements MediaService {
private static final String TAG = "MediaServiceImpl";
private final Core mCore;
private final Context mContext;
private static ExecutorService sThreadPool;

View File

@ -9,6 +9,7 @@
#include "base/android/library_loader/library_loader_hooks.h"
#include "base/bind.h"
#include "base/logging.h"
#include "mojo/android/system/base_run_loop.h"
#include "mojo/android/system/core_impl.h"
#include "sky/shell/android/platform_service_provider_android.h"
#include "sky/shell/android/platform_view_android.h"
@ -19,6 +20,7 @@ namespace {
base::android::RegistrationMethod kSkyRegisteredMethods[] = {
{"CoreImpl", mojo::android::RegisterCoreImpl},
{"BaseRunLoop", mojo::android::RegisterBaseRunLoop},
{"PlatformServiceProvider", sky::shell::RegisterPlatformServiceProvider},
{"PlatformViewAndroid", sky::shell::PlatformViewAndroid::Register},
{"SkyMain", sky::shell::RegisterSkyMain},

View File

@ -8,6 +8,7 @@ import android.content.Context;
import android.util.Log;
import org.chromium.base.JNINamespace;
import org.chromium.mojo.system.impl.CoreImpl;
/**
* A class to intialize the native code.
@ -32,6 +33,8 @@ public class SkyMain {
SkyApplication app = (SkyApplication) applicationContext;
app.getResourceExtractor().waitForCompletion();
nativeInit(applicationContext);
// Create the mojo run loop.
CoreImpl.getInstance().createDefaultRunLoop();
sInitialized = true;
} catch (Exception e) {
Log.e(TAG, "SkyMain initialization failed.", e);