am c88026e1: Update shift state when alphabet keyboard has been set
* commit 'c88026e1dfa9dce6d2aee9b9964342a22644dcd1': Update shift state when alphabet keyboard has been setmain
commit
2f7952c58e
|
@ -324,6 +324,12 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
|
|||
setKeyboard(mKeyboardSet.getSymbolsShiftedKeyboard());
|
||||
}
|
||||
|
||||
// Implements {@link KeyboardState.SwitchActions}.
|
||||
@Override
|
||||
public void requestUpdatingShiftState() {
|
||||
mState.onUpdateShiftState(mInputMethodService.getCurrentAutoCapsState());
|
||||
}
|
||||
|
||||
public boolean isInMomentarySwitchState() {
|
||||
return mState.isInMomentarySwitchState();
|
||||
}
|
||||
|
|
|
@ -53,6 +53,11 @@ public class KeyboardState {
|
|||
public void setSymbolsKeyboard();
|
||||
|
||||
public void setSymbolsShiftedKeyboard();
|
||||
|
||||
/**
|
||||
* Request to call back {@link KeyboardState#onUpdateShiftState(boolean)}.
|
||||
*/
|
||||
public void requestUpdatingShiftState();
|
||||
}
|
||||
|
||||
private KeyboardShiftState mKeyboardShiftState = new KeyboardShiftState();
|
||||
|
@ -212,6 +217,7 @@ public class KeyboardState {
|
|||
mSwitchState = SWITCH_STATE_ALPHA;
|
||||
setShiftLocked(mPrevMainKeyboardWasShiftLocked);
|
||||
mPrevMainKeyboardWasShiftLocked = false;
|
||||
mSwitchActions.requestUpdatingShiftState();
|
||||
}
|
||||
|
||||
private void setSymbolsKeyboard() {
|
||||
|
|
|
@ -71,6 +71,11 @@ public class KeyboardStateTests extends AndroidTestCase {
|
|||
mLayout = SYMBOLS_SHIFTED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestUpdatingShiftState() {
|
||||
mState.onUpdateShiftState(mAutoCaps);
|
||||
}
|
||||
|
||||
public void toggleCapsLock() {
|
||||
mState.onToggleCapsLock();
|
||||
}
|
||||
|
@ -111,7 +116,6 @@ public class KeyboardStateTests extends AndroidTestCase {
|
|||
public void onCancelInput(boolean isSinglePointer) {
|
||||
mState.onCancelInput(isSinglePointer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private MockKeyboardSwitcher mSwitcher;
|
||||
|
|
Loading…
Reference in New Issue