summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2019-11-06 21:06:32 -0800
committer Alec Mouri <alecmouri@google.com> 2019-12-26 10:10:34 -0800
commitbe8bafba54201866471cea3dd9e41ac1027b8f4c (patch)
treeba9c27b490018681c016685360ce04b9a6a5456a
parent3cef3e0be31802d07d601804338de377cf852904 (diff)
[AChoreographer] Update frameworks/base with refresh rate callbacks
This just updates the JNI to use the updated callback arguments. Bug: 136262896 Test: builds Change-Id: Ia51727b9b42c8cc67f63fc8adabce846af1fc7ea
-rw-r--r--core/jni/android_view_DisplayEventReceiver.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/core/jni/android_view_DisplayEventReceiver.cpp b/core/jni/android_view_DisplayEventReceiver.cpp
index 3531cf21e5b9..7daefd3e6544 100644
--- a/core/jni/android_view_DisplayEventReceiver.cpp
+++ b/core/jni/android_view_DisplayEventReceiver.cpp
@@ -62,7 +62,7 @@ private:
void dispatchVsync(nsecs_t timestamp, PhysicalDisplayId displayId, uint32_t count) override;
void dispatchHotplug(nsecs_t timestamp, PhysicalDisplayId displayId, bool connected) override;
void dispatchConfigChanged(nsecs_t timestamp, PhysicalDisplayId displayId,
- int32_t configId) override;
+ int32_t configId, nsecs_t vsyncPeriod) override;
};
@@ -118,24 +118,23 @@ void NativeDisplayEventReceiver::dispatchHotplug(nsecs_t timestamp, PhysicalDisp
mMessageQueue->raiseAndClearException(env, "dispatchHotplug");
}
-void NativeDisplayEventReceiver::dispatchConfigChanged(nsecs_t timestamp,
- PhysicalDisplayId displayId,
- int32_t configId) {
- JNIEnv* env = AndroidRuntime::getJNIEnv();
-
- ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal));
- if (receiverObj.get()) {
- ALOGV("receiver %p ~ Invoking config changed handler.", this);
- env->CallVoidMethod(receiverObj.get(),
- gDisplayEventReceiverClassInfo.dispatchConfigChanged,
- timestamp, displayId, configId);
- ALOGV("receiver %p ~ Returned from config changed handler.", this);
- }
-
- mMessageQueue->raiseAndClearException(env, "dispatchConfigChanged");
+void NativeDisplayEventReceiver::dispatchConfigChanged(
+ nsecs_t timestamp, PhysicalDisplayId displayId, int32_t configId, nsecs_t) {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+
+ ScopedLocalRef<jobject> receiverObj(env,
+ jniGetReferent(env, mReceiverWeakGlobal));
+ if (receiverObj.get()) {
+ ALOGV("receiver %p ~ Invoking config changed handler.", this);
+ env->CallVoidMethod(receiverObj.get(),
+ gDisplayEventReceiverClassInfo.dispatchConfigChanged,
+ timestamp, displayId, configId);
+ ALOGV("receiver %p ~ Returned from config changed handler.", this);
+ }
+
+ mMessageQueue->raiseAndClearException(env, "dispatchConfigChanged");
}
-
static jlong nativeInit(JNIEnv* env, jclass clazz, jobject receiverWeak,
jobject messageQueueObj, jint vsyncSource, jint configChanged) {
sp<MessageQueue> messageQueue = android_os_MessageQueue_getMessageQueue(env, messageQueueObj);