This source file includes following definitions.
- OnMemoryPressure
- Register
- RegisterSystemCallback
#include "base/android/memory_pressure_listener_android.h"
#include "base/memory/memory_pressure_listener.h"
#include "jni/MemoryPressureListener_jni.h"
static void OnMemoryPressure(
JNIEnv* env, jclass clazz, jint memory_pressure_level) {
base::MemoryPressureListener::NotifyMemoryPressure(
static_cast<base::MemoryPressureListener::MemoryPressureLevel>(
memory_pressure_level));
}
namespace base {
namespace android {
bool MemoryPressureListenerAndroid::Register(JNIEnv* env) {
return RegisterNativesImpl(env);
}
void MemoryPressureListenerAndroid::RegisterSystemCallback(JNIEnv* env) {
Java_MemoryPressureListener_registerSystemCallback(
env, GetApplicationContext());
}
}
}