Merge "Trivial method renaming for notifyTextCommitted"

This commit is contained in:
Yohei Yukawa
2014-06-05 15:20:53 +00:00
committed by Android (Google) Code Review
6 changed files with 13 additions and 15 deletions

View File

@@ -602,8 +602,7 @@ public class BaseInputConnection implements InputConnection {
beginBatchEdit();
if (!composing && !TextUtils.isEmpty(text)) {
// Notify the text is committed by the user to InputMethodManagerService
mIMM.notifyTextCommitted();
mIMM.notifyUserAction();
}
// delete composing text set previously.

View File

@@ -1913,13 +1913,13 @@ public final class InputMethodManager {
}
/**
* Notify the current IME commits text
* Notify that a user took some action with this input method.
* @hide
*/
public void notifyTextCommitted() {
public void notifyUserAction() {
synchronized (mH) {
try {
mService.notifyTextCommitted();
mService.notifyUserAction();
} catch (RemoteException e) {
Log.w(TAG, "IME died: " + mCurId, e);
}

View File

@@ -468,7 +468,7 @@ public class InputMethodSubtypeSwitchingController {
return new InputMethodSubtypeSwitchingController(settings, context);
}
public void onCommitTextLocked(InputMethodInfo imi, InputMethodSubtype subtype) {
public void onUserActionLocked(InputMethodInfo imi, InputMethodSubtype subtype) {
if (mController == null) {
if (DEBUG) {
Log.e(TAG, "mController shouldn't be null.");

View File

@@ -77,6 +77,6 @@ interface IInputMethodManager {
boolean setInputMethodEnabled(String id, boolean enabled);
void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes);
int getInputMethodWindowVisibleHeight();
oneway void notifyTextCommitted();
oneway void notifyUserAction();
void setCursorAnchorMonitorMode(in IBinder token, int monitorMode);
}

View File

@@ -2310,14 +2310,14 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
@Override
public void notifyTextCommitted() {
public void notifyUserAction() {
if (DEBUG) {
Slog.d(TAG, "Got the notification of commitText");
Slog.d(TAG, "Got the notification of a user action");
}
synchronized (mMethodMap) {
final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
if (imi != null) {
mSwitchingController.onCommitTextLocked(imi, mCurrentSubtype);
mSwitchingController.onUserActionLocked(imi, mCurrentSubtype);
}
}
}

View File

@@ -135,7 +135,6 @@ public class BridgeIInputMethodManager implements IInputMethodManager {
@Override
public void setImeWindowStatus(IBinder arg0, int arg1, int arg2) throws RemoteException {
// TODO Auto-generated method stub
}
@Override
@@ -197,25 +196,25 @@ public class BridgeIInputMethodManager implements IInputMethodManager {
}
@Override
public boolean switchToNextInputMethod(IBinder arg0, boolean arg1) throws RemoteException {
public boolean switchToNextInputMethod(IBinder arg0, boolean arg1) throws RemoteException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean shouldOfferSwitchingToNextInputMethod(IBinder arg0) throws RemoteException {
public boolean shouldOfferSwitchingToNextInputMethod(IBinder arg0) throws RemoteException {
// TODO Auto-generated method stub
return false;
}
@Override
public int getInputMethodWindowVisibleHeight() throws RemoteException {
public int getInputMethodWindowVisibleHeight() throws RemoteException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void notifyTextCommitted() throws RemoteException {
public void notifyUserAction() throws RemoteException {
// TODO Auto-generated method stub
}