Refactor keyboard controller observer method for bounds changes

There are basically 3 scenarios that consumers of this method check for:

1. Is the keyboard available? They do this by checking if the bounds are

2. Is the keyboard affecting the workspace layout? This is the key
motivation for this refactor. The floating keyboard will not affect the
layout. Usually consumers of this method integrate a check with locked
keyboard as well. With this CL, this locked check will be handled by
keyboard code, and send empty bounds instead in those situations, so
that the caller doesn't have to do this check themselves.

3. Where is the keyboard on the screen? There is an accessibility use
case for touch exploration.

I could have potentially used the old method but I would slightly
prefer to rename it so that it's a little more clear that the bounds
change for visual purposes vs bounds change for workspace layout
purposes are clearly different scenarios. This also ensures that there
is a clear audit of current use cases to change to one of the other

I will send out follow-up CL's to update implementers of the
KeyboardControllerObserver grouped by OWNERS.

Bug: 776260
Change-Id: I46eea0ad9954147ada51fbf488b85cfcce0ff306
Commit-Queue: Blake O'Hare <>
Reviewed-by: Yuichiro Hanada <>
Cr-Commit-Position: refs/heads/master@{#516575}
8 files changed