Hardening token validation in InputMethodManagerService

This CL adds missing token validations in
InputMethodManagerService#switchToNextInputMethod and
InputMethodManagerService#shouldOfferSwitchingToNextInputMethod.

This CL also fixes a possible race condition when validating
the token in InputMethodManagerService#updateStatusIcon.

BUG: 15420379
Change-Id: I043aa30a19c821f33effd57dfd6590b0e3ed817b
1 file changed