Improper initialization of the accessibility manager service.
Initially the current user in the accessibility manager service is the
owner. This is correct since the system should be able to respond to
queries immediately and their result depends on the current user. However,
the system is calling the user switch callback with the current user
which is the same as the one we initialized with. Switching the user
causes clearing state for the old user winch is in case the current
one. Hence, we are losing state for the current user. This behavior was
masked from the fact that accidentally no events in the system were
fired before the first use user switch call.
repo Losing current user state puts the manager service in an inconsistent
state and it binds to accessibility services more than once. As a result
the accessibility layer starts to misbehave rendering the device useless
to a blind user.
Now we are ignoring user switch callbacks if the new user is the same
as the current one. Since we can no longer initialize at the first user
switch, this change adds explicit system ready method called from
the system server at the right moment.
1 file changed