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

Commit f7af9754 authored by Gil Dekel's avatar Gil Dekel Committed by Android (Google) Code Review
Browse files

Merge "JNI: Update DisplayId usage" into main

parents c8eeffb8 cb1ac90e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -172,9 +172,9 @@ static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) {
}

static jobject nativeGetPhysicalDisplayToken(JNIEnv* env, jclass clazz, jlong physicalDisplayId) {
    const auto id = DisplayId::fromValue<PhysicalDisplayId>(physicalDisplayId);
    if (!id) return nullptr;
    sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(*id);
    const PhysicalDisplayId id = PhysicalDisplayId::fromValue(physicalDisplayId);
    sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(id);
    if (!token) return nullptr;
    return javaObjectForIBinder(env, token);
}