Added jni and SurfaceControl methods for native reparentChild

Added the Java methods to invoke the reparentChild method that
was added in the native code.

Test: Builds and runs

Change-Id: I25a783bbc820340a5346521a5783e50ada8c6828
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index db9b52e..33f1c7d 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -736,6 +736,15 @@
     ctrl->reparentChildren(handle);
 }
 
+static void nativeReparentChild(JNIEnv* env, jclass clazz, jlong nativeObject,
+        jobject newParentObject, jobject childObject) {
+    auto ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
+    sp<IBinder> parentHandle = ibinderForJavaObject(env, newParentObject);
+    sp<IBinder> childHandle = ibinderForJavaObject(env, childObject);
+
+    ctrl->reparentChild(parentHandle, childHandle);
+}
+
 static void nativeSeverChildren(JNIEnv* env, jclass clazz, jlong nativeObject) {
     auto ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
     ctrl->detachChildren();
@@ -859,6 +868,8 @@
             (void*)nativeDeferTransactionUntilSurface },
     {"nativeReparentChildren", "(JLandroid/os/IBinder;)V",
             (void*)nativeReparentChildren } ,
+    {"nativeReparentChild", "(JLandroid/os/IBinder;Landroid/os/IBinder;)V",
+            (void*)nativeReparentChild },
     {"nativeSeverChildren", "(J)V",
             (void*)nativeSeverChildren } ,
     {"nativeSetOverrideScalingMode", "(JI)V",