xref: /aosp_15_r20/external/libchrome/base/android/base_jni_onload.cc (revision 635a864187cb8b6c713ff48b7e790a6b21769273)
1 // 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"
8 #include "base/android/jni_utils.h"
9 #include "base/android/library_loader/library_loader_hooks.h"
10 #include "base/bind.h"
11 
12 namespace base {
13 namespace android {
14 
OnJNIOnLoadInit()15 bool OnJNIOnLoadInit() {
16   InitAtExitManager();
17   JNIEnv* env = base::android::AttachCurrentThread();
18   base::android::InitReplacementClassLoader(env,
19                                             base::android::GetClassLoader(env));
20   return true;
21 }
22 
23 }  // namespace android
24 }  // namespace base
25