Merge "Stop supporting null IME token in IMM#switchToLastInputMethod()"

This commit is contained in:
TreeHugger Robot
2018-12-10 05:10:55 +00:00
committed by Android (Google) Code Review
4 changed files with 5 additions and 21 deletions

View File

@@ -2520,16 +2520,6 @@ public final class InputMethodManager {
*/
@Deprecated
public boolean switchToLastInputMethod(IBinder imeToken) {
if (imeToken == null) {
// Note: null token is allowed for callers that have WRITE_SECURE_SETTINGS permission.
// Thus we cannot always rely on InputMethodPrivilegedOperationsRegistry unfortunately.
// TODO(Bug 114488811): Consider deprecating null token rule.
try {
return mService.switchToPreviousInputMethod(imeToken);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return InputMethodPrivilegedOperationsRegistry.get(imeToken).switchToPreviousInputMethod();
}