• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.graphics.Region;
20 import android.net.Uri;
21 import android.view.inputmethod.ImeTracker;
22 import android.view.inputmethod.InputMethodSubtype;
23 
24 import com.android.internal.infra.AndroidFuture;
25 
26 /**
27  * Defines priviledged operations that only the current IME is allowed to call.
28  * Actual operations are implemented and handled by InputMethodManagerService.
29  */
30 oneway interface IInputMethodPrivilegedOperations {
setImeWindowStatusAsync(int vis, int backDisposition)31     void setImeWindowStatusAsync(int vis, int backDisposition);
reportStartInputAsync(in IBinder startInputToken)32     void reportStartInputAsync(in IBinder startInputToken);
createInputContentUriToken(in Uri contentUri, in String packageName, in AndroidFuture future )33     void createInputContentUriToken(in Uri contentUri, in String packageName,
34             in AndroidFuture future /* T=IBinder */);
reportFullscreenModeAsync(boolean fullscreen)35     void reportFullscreenModeAsync(boolean fullscreen);
setInputMethod(String id, in AndroidFuture future )36     void setInputMethod(String id, in AndroidFuture future /* T=Void */);
setInputMethodAndSubtype(String id, in InputMethodSubtype subtype, in AndroidFuture future )37     void setInputMethodAndSubtype(String id, in InputMethodSubtype subtype,
38             in AndroidFuture future /* T=Void */);
hideMySoftInput(in ImeTracker.Token statsToken, int flags, int reason, in AndroidFuture future )39     void hideMySoftInput(in ImeTracker.Token statsToken, int flags, int reason,
40             in AndroidFuture future /* T=Void */);
showMySoftInput(in ImeTracker.Token statsToken, int flags, int reason, in AndroidFuture future )41     void showMySoftInput(in ImeTracker.Token statsToken, int flags, int reason,
42             in AndroidFuture future /* T=Void */);
updateStatusIconAsync(String packageName, int iconId)43     void updateStatusIconAsync(String packageName, int iconId);
switchToPreviousInputMethod(in AndroidFuture future )44     void switchToPreviousInputMethod(in AndroidFuture future /* T=Boolean */);
switchToNextInputMethod(boolean onlyCurrentIme, in AndroidFuture future )45     void switchToNextInputMethod(boolean onlyCurrentIme, in AndroidFuture future /* T=Boolean */);
shouldOfferSwitchingToNextInputMethod(in AndroidFuture future )46     void shouldOfferSwitchingToNextInputMethod(in AndroidFuture future /* T=Boolean */);
onImeSwitchButtonClickFromClient(int displayId)47     void onImeSwitchButtonClickFromClient(int displayId);
notifyUserActionAsync()48     void notifyUserActionAsync();
applyImeVisibilityAsync(IBinder showOrHideInputToken, boolean setVisible, in ImeTracker.Token statsToken)49     void applyImeVisibilityAsync(IBinder showOrHideInputToken, boolean setVisible,
50             in ImeTracker.Token statsToken);
onStylusHandwritingReady(int requestId, int pid)51     void onStylusHandwritingReady(int requestId, int pid);
resetStylusHandwriting(int requestId)52     void resetStylusHandwriting(int requestId);
switchKeyboardLayoutAsync(int direction)53     void switchKeyboardLayoutAsync(int direction);
setHandwritingSurfaceNotTouchable(boolean notTouchable)54     void setHandwritingSurfaceNotTouchable(boolean notTouchable);
setHandwritingTouchableRegion(in Region region)55     void setHandwritingTouchableRegion(in Region region);
56 }
57