diff options
| author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-11-20 21:17:17 +0000 |
|---|---|---|
| committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-11-24 14:09:39 +0000 |
| commit | ad3c9416092f09213d32eee8b59287766eae5d19 (patch) | |
| tree | 0bc1e318ca15560299c662e37c6c4fedf0bcf1e6 /services/java/com/android/server/InputMethodManagerService.java | |
| parent | 7d114fb838017d86ece76e18a7e1b0d8534595fa (diff) | |
| download | frameworks_base-ad3c9416092f09213d32eee8b59287766eae5d19.zip frameworks_base-ad3c9416092f09213d32eee8b59287766eae5d19.tar.gz frameworks_base-ad3c9416092f09213d32eee8b59287766eae5d19.tar.bz2 | |
Squashed commit of the theme engine support.
Updated 4.2 support for the old T-Mobile theme engine, as usual
needs the provider and switcher apps installed as well.
I'm finally dropping the 400+ commit history on this, since everybody
else keeps picking it up from CM as a single patch anyway... But
for the record, nothing of this would be possible without Josh, Ed,
and the rest of the TMo guys who wrote and maintained it until 2.2:
amit chabra <amit.chabra@t-mobile.com>
Amit Kohli <amit.kohli@t-mobile.com>
Chris Cogar <chriscogar@t-mobile.com>
Dirk Sigurdson <dirk.sigurdson@t-mobile.com>
Ed Carrigan <edward.carrigan@t-mobile.com>
Gaurav Sharma <gaurav.sharma3@t-mobile.com>
Hui Feng <hui.feng@t-mobile.com>
John Ritz <john.ritz1@t-mobile.com>
Josh Guilfoyle <josh.guilfoyle@t-mobile.com>
Mark Roberts <mark.roberts48@t-mobile.com>
Pankaj Kumar <Pankaj.kumar6@t-mobile.com>
Samuel Cheung <samuel.cheung@t-mobile.com>
Sergey Ten <sergey.ten6@t-mobile.com>
Change-Id: I7148d51be48f28a2dc4bdf9ec9018f04b268ffc4
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
| -rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index b11432d..445a4bb 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -15,6 +15,7 @@ package com.android.server; +import com.android.internal.app.ThemeUtils; import com.android.internal.content.PackageMonitor; import com.android.internal.os.HandlerCaller; import com.android.internal.os.SomeArgs; @@ -165,6 +166,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private static final Locale ENGLISH_LOCALE = new Locale("en"); final Context mContext; + private Context mUiContext; final Resources mRes; final Handler mHandler; final InputMethodSettings mSettings; @@ -848,6 +850,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); + ThemeUtils.registerThemeChangeReceiver(mContext, new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + mUiContext = null; + } + }); + mStatusBar = statusBar; statusBar.setIconVisibility("ime", false); updateImeWindowStatusLocked(); @@ -2525,6 +2534,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } + private Context getUiContext() { + if (mUiContext == null) { + mUiContext = ThemeUtils.createUiContext(mContext); + } + return mUiContext != null ? mUiContext : mContext; + } + // ---------------------------------------------------------------------- private void showInputMethodMenu() { @@ -2561,7 +2577,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private void showInputMethodMenuInternal(boolean showSubtypes) { if (DEBUG) Slog.v(TAG, "Show switching menu"); - final Context context = mContext; + final Context context = getUiContext(); final boolean isScreenLocked = isScreenLocked(); final String lastInputMethodId = mSettings.getSelectedInputMethod(); |
