Add Ability to Check if Cursor is Blinking

adds a method for returning whether the cursor is blinking based on the
current value of the mCancelled property in the Blink class.  This
method is only inteded to be used for testing purposes.

Bug: 228354442
Test: manual, method is called in CtsWidgetTestCases:EditTextTest#
      testSuspendAndResumeBlinkingCursor,
      testCursorBlinkingOnNewActivity_WithFocus,
      testCursorNotBlinkingOnNewActivity_WithoutFocus
Change-Id: I02849f6e105cbfe7af78dfb34ffbf1ebbb4a82ae
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 1cfe116..fadad99 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -2869,6 +2869,17 @@
         }
     }
 
+    /**
+     *
+     * @return whether the Blink runnable is blinking or not, if null return false.
+     * @hide
+     */
+    @VisibleForTesting
+    public boolean isBlinking() {
+        if (mBlink == null) return false;
+        return !mBlink.mCancelled;
+    }
+
     private class Blink implements Runnable {
         private boolean mCancelled;