Remove unused UnbindReason.ACCESSIBILITY_SERVICE_DISABLED

UnbindReason.ACCESSIBILITY_SERVICE_DISABLED was introduced when we
implemented A11yIME [1], but it turns out that it has not been passed
to the IME client.

Let's remove it if it's not used.

 [1]: Ia651a811093a939d00c081be1961e24ed3ad0356
      fb17e5ae7a

Bug: 234882948
Test: presubmit
Change-Id: Ib6c011d4b5f6fb39f0bda84d51b73a21205ef0ca
This commit is contained in:
Yohei Yukawa
2022-06-07 14:00:04 -07:00
parent 19a4214e16
commit cc4c229ec4
3 changed files with 2 additions and 8 deletions

View File

@@ -93,8 +93,6 @@ public final class InputMethodDebug {
return "SWITCH_IME_FAILED";
case UnbindReason.SWITCH_USER:
return "SWITCH_USER";
case UnbindReason.ACCESSIBILITY_SERVICE_DISABLED:
return "ACCESSIBILITY_SERVICE_DISABLED";
default:
return "Unknown=" + reason;
}

View File

@@ -34,8 +34,7 @@ import java.lang.annotation.Retention;
UnbindReason.DISCONNECT_IME,
UnbindReason.NO_IME,
UnbindReason.SWITCH_IME_FAILED,
UnbindReason.SWITCH_USER,
UnbindReason.ACCESSIBILITY_SERVICE_DISABLED
UnbindReason.SWITCH_USER
})
public @interface UnbindReason {
/**
@@ -68,5 +67,4 @@ public @interface UnbindReason {
* user's active IME.
*/
int SWITCH_USER = 6;
int ACCESSIBILITY_SERVICE_DISABLED = 7;
}

View File

@@ -5741,11 +5741,9 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
}
// A11yManagerService unbinds the disabled accessibility service. We don't need
// to do it here.
@UnbindReason int unbindClientReason =
UnbindReason.ACCESSIBILITY_SERVICE_DISABLED;
executeOrSendMessage(mCurClient.client, obtainMessageIIOO(
MSG_UNBIND_ACCESSIBILITY_SERVICE, getSequenceNumberLocked(),
unbindClientReason, mCurClient.client, accessibilityConnectionId));
0 /* unused */, mCurClient.client, accessibilityConnectionId));
}
// We only have sessions when we bound to an input method. Remove this session
// from all clients.