summaryrefslogtreecommitdiff
path: root/core/jni/AndroidRuntime.cpp
diff options
context:
space:
mode:
authorAlec Mouri <alecmouri@google.com>2020-04-27 22:36:17 -0700
committerAlec Mouri <alecmouri@google.com>2020-05-07 19:19:23 -0700
commitcf3ad873ddd7f1abf3804936befa511b2fbb12b6 (patch)
treed9b7cf1ed40b747c1a08bc1d691e2704a8153f8f /core/jni/AndroidRuntime.cpp
parent075da89ba91832537f1d77990523930f8e366aed (diff)
Dispatch refresh rate callbacks from DMS
AChoreographer will consume these callbacks in lieu of going through SF for the callbacks. This is so that DMS can update its view of display configs before apps receive the refresh rate callback so that apps can get consistent information. Bug: 154874011 Test: ChoreographerNativeTest Test: Manually verify that HWUI is receiving callbacks Change-Id: I992c247fd16ef414f94a259bbd300bea3e4c9467
Diffstat (limited to 'core/jni/AndroidRuntime.cpp')
-rw-r--r--core/jni/AndroidRuntime.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 6fcaddf34322..a420ba67868f 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -18,39 +18,37 @@
#define LOG_TAG "AndroidRuntime"
#define LOG_NDEBUG 1
-#include <android_runtime/AndroidRuntime.h>
-
#include <android-base/macros.h>
#include <android-base/properties.h>
#include <android/graphics/jni_runtime.h>
+#include <android_runtime/AndroidRuntime.h>
+#include <assert.h>
#include <binder/IBinder.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
-#include <utils/Log.h>
-#include <utils/misc.h>
-#include <utils/Trace.h>
#include <binder/Parcel.h>
-#include <utils/threads.h>
+#include <bionic/malloc.h>
#include <cutils/properties.h>
-#include <server_configurable_flags/get_flags.h>
-
-#include "jni.h"
+#include <dirent.h>
+#include <dlfcn.h>
#include <nativehelper/JNIHelp.h>
#include <nativehelper/JniInvocation.h>
-#include "android_util_Binder.h"
-
-#include <stdio.h>
+#include <server_configurable_flags/get_flags.h>
#include <signal.h>
+#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <signal.h>
-#include <dirent.h>
-#include <assert.h>
-#include <bionic/malloc.h>
+#include <utils/Log.h>
+#include <utils/Trace.h>
+#include <utils/misc.h>
+#include <utils/threads.h>
#include <string>
#include <vector>
+#include "android_util_Binder.h"
+#include "jni.h"
+
using namespace android;
using android::base::GetProperty;
@@ -78,6 +76,7 @@ extern int register_android_hardware_camera2_CameraMetadata(JNIEnv *env);
extern int register_android_hardware_camera2_legacy_LegacyCameraDevice(JNIEnv *env);
extern int register_android_hardware_camera2_legacy_PerfMeasurement(JNIEnv *env);
extern int register_android_hardware_camera2_DngCreator(JNIEnv *env);
+extern int register_android_hardware_display_DisplayManagerGlobal(JNIEnv* env);
extern int register_android_hardware_HardwareBuffer(JNIEnv *env);
extern int register_android_hardware_SensorManager(JNIEnv *env);
extern int register_android_hardware_SerialPort(JNIEnv *env);
@@ -1519,6 +1518,7 @@ static const RegJNIRec gRegJNI[] = {
REG_JNI(register_android_hardware_camera2_legacy_LegacyCameraDevice),
REG_JNI(register_android_hardware_camera2_legacy_PerfMeasurement),
REG_JNI(register_android_hardware_camera2_DngCreator),
+ REG_JNI(register_android_hardware_display_DisplayManagerGlobal),
REG_JNI(register_android_hardware_HardwareBuffer),
REG_JNI(register_android_hardware_SensorManager),
REG_JNI(register_android_hardware_SerialPort),