diff options
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 0e74169..710d817 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -26,8 +26,7 @@ import com.android.internal.view.IInputMethodManager; import com.android.internal.view.IInputMethodSession; import com.android.internal.view.InputBindResult; -import com.android.server.status.IconData; -import com.android.server.status.StatusBarService; +import com.android.server.StatusBarManagerService; import org.xmlpull.v1.XmlPullParserException; @@ -113,9 +112,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final Context mContext; final Handler mHandler; final SettingsObserver mSettingsObserver; - final StatusBarService mStatusBar; - final IBinder mInputMethodIcon; - final IconData mInputMethodData; + final StatusBarManagerService mStatusBar; final IWindowManager mIWindowManager; final HandlerCaller mCaller; @@ -450,7 +447,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } - public InputMethodManagerService(Context context, StatusBarService statusBar) { + public InputMethodManagerService(Context context, StatusBarManagerService statusBar) { mContext = context; mHandler = new Handler(this); mIWindowManager = IWindowManager.Stub.asInterface( @@ -511,9 +508,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } mStatusBar = statusBar; - mInputMethodData = IconData.makeIcon("ime", null, 0, 0, 0); - mInputMethodIcon = statusBar.addIcon(mInputMethodData, null); - statusBar.setIconVisibility(mInputMethodIcon, false); + statusBar.setIconVisibility("ime", false); mSettingsObserver = new SettingsObserver(mHandler); updateFromSettingsLocked(); @@ -915,7 +910,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mEnabledSession = null; mCurMethod = null; } - mStatusBar.setIconVisibility(mInputMethodIcon, false); + mStatusBar.setIconVisibility("ime", false); } public void onServiceDisconnected(ComponentName name) { @@ -949,13 +944,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub synchronized (mMethodMap) { if (iconId == 0) { if (DEBUG) Slog.d(TAG, "hide the small icon for the input method"); - mStatusBar.setIconVisibility(mInputMethodIcon, false); + mStatusBar.setIconVisibility("ime", false); } else if (packageName != null) { if (DEBUG) Slog.d(TAG, "show a small icon for the input method"); - mInputMethodData.iconId = iconId; - mInputMethodData.iconPackage = packageName; - mStatusBar.updateIcon(mInputMethodIcon, mInputMethodData, null); - mStatusBar.setIconVisibility(mInputMethodIcon, true); + mStatusBar.setIcon("ime", packageName, iconId, 0); + mStatusBar.setIconVisibility("ime", true); } } } finally { @@ -1738,8 +1731,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub p.println(" sessionRequested=" + ci.sessionRequested); p.println(" curSession=" + ci.curSession); } - p.println(" mInputMethodIcon=" + mInputMethodIcon); - p.println(" mInputMethodData=" + mInputMethodData); p.println(" mCurMethodId=" + mCurMethodId); client = mCurClient; p.println(" mCurClient=" + client + " mCurSeq=" + mCurSeq); |