Migrate VirtualKeyboardFragment to DashboardFragment
Fixes: 134451794 Test: robolectric Change-Id: I2a40090178b3daea894bdad570549c7bfa34e4e6
This commit is contained in:
@@ -35,6 +35,7 @@ import java.util.List;
|
||||
public class ShadowInputMethodManagerWithMethodList extends ShadowInputMethodManager {
|
||||
|
||||
private List<InputMethodInfo> mInputMethodInfos = Collections.emptyList();
|
||||
private List<InputMethodInfo> mEnabledInputMethodInfos = Collections.emptyList();
|
||||
|
||||
@Implementation
|
||||
public static InputMethodManager getInstance() {
|
||||
@@ -46,11 +47,26 @@ public class ShadowInputMethodManagerWithMethodList extends ShadowInputMethodMan
|
||||
return mInputMethodInfos;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected List<InputMethodInfo> getEnabledInputMethodList() {
|
||||
return mEnabledInputMethodInfos;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected List<InputMethodInfo> getEnabledInputMethodSubtypeList(InputMethodInfo imi,
|
||||
boolean allowsImplicitlySelectedSubtypes) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
// Non-Android setter.
|
||||
public void setInputMethodList(List<InputMethodInfo> inputMethodInfos) {
|
||||
mInputMethodInfos = inputMethodInfos;
|
||||
}
|
||||
|
||||
public void setEnabledInputMethodList(List<InputMethodInfo> inputMethodInfos) {
|
||||
mEnabledInputMethodInfos = inputMethodInfos;
|
||||
}
|
||||
|
||||
public static ShadowInputMethodManagerWithMethodList getShadow() {
|
||||
return (ShadowInputMethodManagerWithMethodList) Shadow.extract(
|
||||
RuntimeEnvironment.application.getSystemService(InputMethodManager.class));
|
||||
|
||||
Reference in New Issue
Block a user