1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.internal.inputmethod;
18 
19 import android.net.Uri;
20 import android.view.inputmethod.EditorInfo;
21 import android.view.inputmethod.InputMethodSubtype;
22 
23 import com.android.internal.inputmethod.IInputContentUriToken;
24 
25 /**
26  * Defines priviledged operations that only the current IME is allowed to call.
27  * Actual operations are implemented and handled by InputMethodManagerService.
28  */
29 interface IInputMethodPrivilegedOperations {
setImeWindowStatus(int vis, int backDisposition)30     void setImeWindowStatus(int vis, int backDisposition);
reportStartInput(in IBinder startInputToken)31     void reportStartInput(in IBinder startInputToken);
createInputContentUriToken(in Uri contentUri, in String packageName)32     IInputContentUriToken createInputContentUriToken(in Uri contentUri, in String packageName);
reportFullscreenMode(boolean fullscreen)33     void reportFullscreenMode(boolean fullscreen);
setInputMethod(String id)34     void setInputMethod(String id);
setInputMethodAndSubtype(String id, in InputMethodSubtype subtype)35     void setInputMethodAndSubtype(String id, in InputMethodSubtype subtype);
hideMySoftInput(int flags)36     void hideMySoftInput(int flags);
showMySoftInput(int flags)37     void showMySoftInput(int flags);
updateStatusIcon(String packageName, int iconId)38     void updateStatusIcon(String packageName, int iconId);
switchToPreviousInputMethod()39     boolean switchToPreviousInputMethod();
switchToNextInputMethod(boolean onlyCurrentIme)40     boolean switchToNextInputMethod(boolean onlyCurrentIme);
shouldOfferSwitchingToNextInputMethod()41     boolean shouldOfferSwitchingToNextInputMethod();
notifyUserAction()42     void notifyUserAction();
reportPreRendered(in EditorInfo info)43     void reportPreRendered(in EditorInfo info);
applyImeVisibility(boolean setVisible)44     void applyImeVisibility(boolean setVisible);
45 }
46