1 /* 2 * Copyright (C) 2011 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.layoutlib.bridge.android; 18 19 import com.android.internal.inputmethod.IInputContentUriToken; 20 import com.android.internal.view.IInputContext; 21 import com.android.internal.view.IInputMethodClient; 22 import com.android.internal.view.IInputMethodManager; 23 import com.android.internal.view.InputBindResult; 24 25 import android.net.Uri; 26 import android.os.IBinder; 27 import android.os.RemoteException; 28 import android.os.ResultReceiver; 29 import android.text.style.SuggestionSpan; 30 import android.view.inputmethod.EditorInfo; 31 import android.view.inputmethod.InputMethodInfo; 32 import android.view.inputmethod.InputMethodSubtype; 33 34 import java.util.List; 35 36 /** 37 * Basic implementation of IInputMethodManager that does nothing. 38 * 39 */ 40 public class BridgeIInputMethodManager implements IInputMethodManager { 41 42 @Override addClient(IInputMethodClient arg0, IInputContext arg1, int arg2, int arg3)43 public void addClient(IInputMethodClient arg0, IInputContext arg1, int arg2, int arg3) 44 throws RemoteException { 45 // TODO Auto-generated method stub 46 47 } 48 49 @Override finishInput(IInputMethodClient arg0)50 public void finishInput(IInputMethodClient arg0) throws RemoteException { 51 // TODO Auto-generated method stub 52 53 } 54 55 @Override getCurrentInputMethodSubtype()56 public InputMethodSubtype getCurrentInputMethodSubtype() throws RemoteException { 57 // TODO Auto-generated method stub 58 return null; 59 } 60 61 @Override getEnabledInputMethodList()62 public List<InputMethodInfo> getEnabledInputMethodList() throws RemoteException { 63 // TODO Auto-generated method stub 64 return null; 65 } 66 67 @Override getEnabledInputMethodSubtypeList(String arg0, boolean arg1)68 public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(String arg0, 69 boolean arg1) throws RemoteException { 70 // TODO Auto-generated method stub 71 return null; 72 } 73 74 @Override getInputMethodList()75 public List<InputMethodInfo> getInputMethodList() throws RemoteException { 76 // TODO Auto-generated method stub 77 return null; 78 } 79 80 @Override getLastInputMethodSubtype()81 public InputMethodSubtype getLastInputMethodSubtype() throws RemoteException { 82 // TODO Auto-generated method stub 83 return null; 84 } 85 86 @Override getShortcutInputMethodsAndSubtypes()87 public List getShortcutInputMethodsAndSubtypes() throws RemoteException { 88 // TODO Auto-generated method stub 89 return null; 90 } 91 92 @Override hideMySoftInput(IBinder arg0, int arg1)93 public void hideMySoftInput(IBinder arg0, int arg1) throws RemoteException { 94 // TODO Auto-generated method stub 95 96 } 97 98 @Override hideSoftInput(IInputMethodClient arg0, int arg1, ResultReceiver arg2)99 public boolean hideSoftInput(IInputMethodClient arg0, int arg1, ResultReceiver arg2) 100 throws RemoteException { 101 // TODO Auto-generated method stub 102 return false; 103 } 104 105 @Override notifySuggestionPicked(SuggestionSpan arg0, String arg1, int arg2)106 public boolean notifySuggestionPicked(SuggestionSpan arg0, String arg1, int arg2) 107 throws RemoteException { 108 // TODO Auto-generated method stub 109 return false; 110 } 111 112 @Override registerSuggestionSpansForNotification(SuggestionSpan[] arg0)113 public void registerSuggestionSpansForNotification(SuggestionSpan[] arg0) 114 throws RemoteException { 115 // TODO Auto-generated method stub 116 117 } 118 119 @Override removeClient(IInputMethodClient arg0)120 public void removeClient(IInputMethodClient arg0) throws RemoteException { 121 // TODO Auto-generated method stub 122 123 } 124 125 @Override setAdditionalInputMethodSubtypes(String arg0, InputMethodSubtype[] arg1)126 public void setAdditionalInputMethodSubtypes(String arg0, InputMethodSubtype[] arg1) 127 throws RemoteException { 128 // TODO Auto-generated method stub 129 } 130 131 @Override setCurrentInputMethodSubtype(InputMethodSubtype arg0)132 public boolean setCurrentInputMethodSubtype(InputMethodSubtype arg0) throws RemoteException { 133 // TODO Auto-generated method stub 134 return false; 135 } 136 137 @Override setImeWindowStatus(IBinder arg0, int arg1, int arg2)138 public void setImeWindowStatus(IBinder arg0, int arg1, int arg2) throws RemoteException { 139 // TODO Auto-generated method stub 140 } 141 142 @Override setInputMethod(IBinder arg0, String arg1)143 public void setInputMethod(IBinder arg0, String arg1) throws RemoteException { 144 // TODO Auto-generated method stub 145 146 } 147 148 @Override setInputMethodAndSubtype(IBinder arg0, String arg1, InputMethodSubtype arg2)149 public void setInputMethodAndSubtype(IBinder arg0, String arg1, InputMethodSubtype arg2) 150 throws RemoteException { 151 // TODO Auto-generated method stub 152 153 } 154 155 @Override setInputMethodEnabled(String arg0, boolean arg1)156 public boolean setInputMethodEnabled(String arg0, boolean arg1) throws RemoteException { 157 // TODO Auto-generated method stub 158 return false; 159 } 160 161 @Override showInputMethodAndSubtypeEnablerFromClient(IInputMethodClient arg0, String arg1)162 public void showInputMethodAndSubtypeEnablerFromClient(IInputMethodClient arg0, String arg1) 163 throws RemoteException { 164 // TODO Auto-generated method stub 165 166 } 167 168 @Override showInputMethodPickerFromClient(IInputMethodClient arg0, int arg1)169 public void showInputMethodPickerFromClient(IInputMethodClient arg0, 170 int arg1) throws RemoteException { 171 // TODO Auto-generated method stub 172 173 } 174 175 @Override showMySoftInput(IBinder arg0, int arg1)176 public void showMySoftInput(IBinder arg0, int arg1) throws RemoteException { 177 // TODO Auto-generated method stub 178 179 } 180 181 @Override showSoftInput(IInputMethodClient arg0, int arg1, ResultReceiver arg2)182 public boolean showSoftInput(IInputMethodClient arg0, int arg1, ResultReceiver arg2) 183 throws RemoteException { 184 // TODO Auto-generated method stub 185 return false; 186 } 187 188 @Override switchToLastInputMethod(IBinder arg0)189 public boolean switchToLastInputMethod(IBinder arg0) throws RemoteException { 190 // TODO Auto-generated method stub 191 return false; 192 } 193 194 @Override switchToNextInputMethod(IBinder arg0, boolean arg1)195 public boolean switchToNextInputMethod(IBinder arg0, boolean arg1) throws RemoteException { 196 // TODO Auto-generated method stub 197 return false; 198 } 199 200 @Override shouldOfferSwitchingToNextInputMethod(IBinder arg0)201 public boolean shouldOfferSwitchingToNextInputMethod(IBinder arg0) throws RemoteException { 202 // TODO Auto-generated method stub 203 return false; 204 } 205 206 @Override getInputMethodWindowVisibleHeight()207 public int getInputMethodWindowVisibleHeight() throws RemoteException { 208 // TODO Auto-generated method stub 209 return 0; 210 } 211 212 @Override notifyUserAction(int sequenceNumber)213 public void notifyUserAction(int sequenceNumber) throws RemoteException { 214 // TODO Auto-generated method stub 215 } 216 217 @Override updateStatusIcon(IBinder arg0, String arg1, int arg2)218 public void updateStatusIcon(IBinder arg0, String arg1, int arg2) throws RemoteException { 219 // TODO Auto-generated method stub 220 221 } 222 223 @Override clearLastInputMethodWindowForTransition(IBinder arg0)224 public void clearLastInputMethodWindowForTransition(IBinder arg0) throws RemoteException { 225 // TODO Auto-generated method stub 226 } 227 228 @Override startInputOrWindowGainedFocus( int startInputReason, IInputMethodClient client, IBinder windowToken, int controlFlags, int softInputMode, int windowFlags, EditorInfo attribute, IInputContext inputContext, int missingMethodFlags)229 public InputBindResult startInputOrWindowGainedFocus( 230 /* @InputMethodClient.StartInputReason */ int startInputReason, 231 IInputMethodClient client, IBinder windowToken, int controlFlags, int softInputMode, 232 int windowFlags, EditorInfo attribute, IInputContext inputContext, 233 /* @InputConnectionInspector.MissingMethodFlags */ int missingMethodFlags) 234 throws RemoteException { 235 // TODO Auto-generated method stub 236 return null; 237 } 238 239 @Override asBinder()240 public IBinder asBinder() { 241 // TODO Auto-generated method stub 242 return null; 243 } 244 245 @Override createInputContentUriToken(IBinder token, Uri contentUri, String packageName)246 public IInputContentUriToken createInputContentUriToken(IBinder token, Uri contentUri, 247 String packageName) { 248 // TODO Auto-generated method stub 249 return null; 250 } 251 } 252