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

Commit b9ede251 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Convert MotionEvent#getSurfaceRotation to ui::Rotation"

parents 6f59d94f 9b8724c7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -763,7 +763,12 @@ static void android_view_MotionEvent_nativeScale(jlong nativePtr, jfloat scale)

static jint android_view_MotionEvent_nativeGetSurfaceRotation(jlong nativePtr) {
    MotionEvent* event = reinterpret_cast<MotionEvent*>(nativePtr);
    return jint(event->getSurfaceRotation());
    auto rotation = event->getSurfaceRotation();
    if (rotation) {
        return static_cast<jint>(rotation.value());
    } else {
        return -1;
    }
}

// ----------------------------------------------------------------------------