Introduce InputMethodBindingController

Bug: 205676419
Test: make
Change-Id: I29f4969147305674a2bc2204ba2c657f374aaaf3
This commit is contained in:
Nikolas Havrikov
2021-11-05 11:37:29 +01:00
parent 91944cecdc
commit 29e2529ca4
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.server.inputmethod;
import android.annotation.NonNull;
/**
* A controller managing the state of the input method binding.
*/
final class InputMethodBindingController {
static final boolean DEBUG = false;
private static final String TAG = InputMethodBindingController.class.getSimpleName();
private final InputMethodManagerService mService;
InputMethodBindingController(@NonNull InputMethodManagerService service) {
mService = service;
}
}

View File

@@ -325,6 +325,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
private final UserManager mUserManager;
private final UserManagerInternal mUserManagerInternal;
private final InputMethodMenuController mMenuController;
private final InputMethodBindingController mBindingController;
/**
* Cache the result of {@code LocalServices.getService(AudioManagerInternal.class)}.
@@ -1725,6 +1726,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mSwitchingController = InputMethodSubtypeSwitchingController.createInstanceLocked(
mSettings, context);
mMenuController = new InputMethodMenuController(this);
mBindingController = new InputMethodBindingController(this);
// If configured, use low priority flags to make the IME killable by the lowmemorykiller
final boolean lowerIMEPriority = mRes.getBoolean(