import android.os.Build;
import android.util.Log;
+import java.util.Arrays;
+
/* This is an Android view which has a back and front buffer. When
swapBuffers is called, the back buffer is swapped to the front
buffer, and any damage is invalidated. frontBitmap and backBitmap
imManager.showSoftInput (this, 0);
isCurrentlyTextEditor = true;
+
+ /* The OS text editing widget unconditionally reports the current
+ values of the selection to the input method after calls to
+ showSoftInput, which is redundant if inputConnection exists but
+ is now relied upon in such circumstances by the OS's default
+ input method, and must therefore be faithfully reproduced on our
+ part. */
+ if (inputConnection != null)
+ EmacsNative.requestSelectionUpdate (window.handle);
}
public void
selection = EmacsService.viewGetSelection (window.handle);
+ if (EmacsService.DEBUG_IC)
+ Log.d (TAG, ("onCreateInputConnection: "
+ + (selection != null
+ ? Arrays.toString (selection)
+ : "(unavailable)")));
+
if (selection == null)
{
/* If the selection could not be obtained, return 0 by 0.