Skip to content
Commit 4ec6dfc3 authored by Steven Terrell's avatar Steven Terrell
Browse files

Stop cursor from blinking when not visible

Cursor continues to blink in a text field even when the text field is
not currently visible. This change checks the visibility of the window
that houses the text field in addition to checking if the view is in
focus.

Bug: 228354442

Test: Added logging to the shouldBlink() method ran following steps:
     1: open contacts app
     2: tap add new contact, tap in an edit field
     3: move back to home screen
     4: lock screen, then unlock screen
     5: observed logs written out to logcat console when app not
        visible.
     after change logs no longer printed to console, cursor still blinks
     correctly after app is re-opened or when new field becomes in
     focus.
Test: CtsWidgetTestCases:EditTextTest#
        testCursorNotBlinkingOnNewActivity_WithoutFocus()
	testCursorBlinkingOnNewActivity_WithFocus()
	testSuspendAndResumeBlinkingCursor()
Change-Id: Iad4396e5f7fd810344c711320d65c57ea25eda70
Merged-In: Iad4396e5f7fd810344c711320d65c57ea25eda70
parent 057f7217
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment