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

Commit cb1ac90e authored by Gil Dekel's avatar Gil Dekel
Browse files

JNI: Update DisplayId usage

DisplayId::fromValue() was modified to return an unwrapped DisplayId
object.

Update call-sites.

Flag: com.android.graphics.surfaceflinger.flags.stable_edid_ids
Bug: 393193354
Test: N/A
Change-Id: I4098449df4c984dddfd1d8641616de4f43419bba
parent 1bc044eb
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line 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) {
static jobject nativeGetPhysicalDisplayToken(JNIEnv* env, jclass clazz, jlong physicalDisplayId) {
    const auto id = DisplayId::fromValue<PhysicalDisplayId>(physicalDisplayId);
    const PhysicalDisplayId id = PhysicalDisplayId::fromValue(physicalDisplayId);
    if (!id) return nullptr;
    sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(id);
    sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(*id);
    if (!token) return nullptr;
    return javaObjectForIBinder(env, token);
    return javaObjectForIBinder(env, token);
}
}