am e3c393d3: Merge change 23787 into eclair
Merge commit 'e3c393d3d14dab5b1eab37d2c52b7283df253f7f' into eclair-plus-aosp * commit 'e3c393d3d14dab5b1eab37d2c52b7283df253f7f': Fix issue #2097313: Latin IME crashes first use
This commit is contained in:
@@ -516,7 +516,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
synchronized (mMethodMap) {
|
synchronized (mMethodMap) {
|
||||||
if (!mSystemReady) {
|
if (!mSystemReady) {
|
||||||
mSystemReady = true;
|
mSystemReady = true;
|
||||||
startInputInnerLocked();
|
try {
|
||||||
|
startInputInnerLocked();
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
Log.w(TAG, "Unexpected exception", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -749,7 +753,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
if (!mSystemReady) {
|
if (!mSystemReady) {
|
||||||
// If the system is not yet ready, we shouldn't be running third
|
// If the system is not yet ready, we shouldn't be running third
|
||||||
// party code.
|
// party code.
|
||||||
return new InputBindResult(null, mCurId, mCurSeq);
|
return new InputBindResult(null, mCurMethodId, mCurSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputMethodInfo info = mMethodMap.get(mCurMethodId);
|
InputMethodInfo info = mMethodMap.get(mCurMethodId);
|
||||||
@@ -802,17 +806,20 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
synchronized (mMethodMap) {
|
synchronized (mMethodMap) {
|
||||||
if (mCurIntent != null && name.equals(mCurIntent.getComponent())) {
|
if (mCurIntent != null && name.equals(mCurIntent.getComponent())) {
|
||||||
mCurMethod = IInputMethod.Stub.asInterface(service);
|
mCurMethod = IInputMethod.Stub.asInterface(service);
|
||||||
|
if (mCurToken == null) {
|
||||||
|
Log.w(TAG, "Service connected without a token!");
|
||||||
|
unbindCurrentMethodLocked(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (DEBUG) Log.v(TAG, "Initiating attach with token: " + mCurToken);
|
||||||
|
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
|
||||||
|
MSG_ATTACH_TOKEN, mCurMethod, mCurToken));
|
||||||
if (mCurClient != null) {
|
if (mCurClient != null) {
|
||||||
if (DEBUG) Log.v(TAG, "Initiating attach with token: " + mCurToken);
|
if (DEBUG) Log.v(TAG, "Creating first session while with client "
|
||||||
|
+ mCurClient);
|
||||||
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
|
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
|
||||||
MSG_ATTACH_TOKEN, mCurMethod, mCurToken));
|
MSG_CREATE_SESSION, mCurMethod,
|
||||||
if (mCurClient != null) {
|
new MethodCallback(mCurMethod)));
|
||||||
if (DEBUG) Log.v(TAG, "Creating first session while with client "
|
|
||||||
+ mCurClient);
|
|
||||||
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
|
|
||||||
MSG_CREATE_SESSION, mCurMethod,
|
|
||||||
new MethodCallback(mCurMethod)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1002,6 +1009,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
mShowExplicitlyRequested = true;
|
mShowExplicitlyRequested = true;
|
||||||
mShowForced = true;
|
mShowForced = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mSystemReady) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
boolean res = false;
|
boolean res = false;
|
||||||
if (mCurMethod != null) {
|
if (mCurMethod != null) {
|
||||||
executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOO(
|
executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOO(
|
||||||
@@ -1637,7 +1649,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
+ " mShowExplicitlyRequested=" + mShowExplicitlyRequested
|
+ " mShowExplicitlyRequested=" + mShowExplicitlyRequested
|
||||||
+ " mShowForced=" + mShowForced
|
+ " mShowForced=" + mShowForced
|
||||||
+ " mInputShown=" + mInputShown);
|
+ " mInputShown=" + mInputShown);
|
||||||
p.println(" mScreenOn=" + mScreenOn);
|
p.println(" mSystemReady=" + mSystemReady + " mScreenOn=" + mScreenOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client != null) {
|
if (client != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user