Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a8986b9 authored by Ady Abraham's avatar Ady Abraham
Browse files

AChoreographer: update the global state when unregistering

Bug: 193945763
Test: atest ChoreographerNativeTest
Change-Id: I7fb38f0edc49830decbe408cfd4816948df3f41c
parent b3cc2e6f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@ Choreographer::~Choreographer() {
    // Only poke DisplayManagerGlobal to unregister if we previously registered
    // callbacks.
    if (gChoreographers.ptrs.empty() && gChoreographers.registeredToDisplayManager) {
        gChoreographers.registeredToDisplayManager = false;
        JNIEnv* env = getJniEnv();
        if (env == nullptr) {
            ALOGW("JNI environment is unavailable, skipping choreographer cleanup");