blob: 170dd8402f8629a1b5d54e00d79f6d1472226bdc [file] [log] [blame]
michaelbai842c972d2015-01-28 21:40:361// Copyright 2015 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/android/base_jni_onload.h"
6
7#include "base/android/jni_android.h"
torne103bf192015-02-20 23:06:338#include "base/android/jni_utils.h"
michaelbai842c972d2015-01-28 21:40:369#include "base/android/library_loader/library_loader_hooks.h"
michaelbai5237cb89a2015-02-21 01:29:4010#include "base/bind.h"
michaelbai842c972d2015-01-28 21:40:3611
12namespace base {
13namespace android {
14
tobiasjsb9e287e2017-02-08 11:09:5015bool OnJNIOnLoadInit() {
michaelbaif40324b2015-03-11 22:20:3716 InitAtExitManager();
torne103bf192015-02-20 23:06:3317 JNIEnv* env = base::android::AttachCurrentThread();
torne103bf192015-02-20 23:06:3318 base::android::InitReplacementClassLoader(env,
19 base::android::GetClassLoader(env));
michaelbai842c972d2015-01-28 21:40:3620 return true;
21}
22
michaelbai842c972d2015-01-28 21:40:3623} // namespace android
24} // namespace base