aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-07-04 16:36:54 +0900
committerYohei Yukawa <yukawa@google.com>2014-07-04 20:50:00 +0900
commit052ec62abd577182af8d5b50564d8075b18be3c9 (patch)
tree78e6e703b1b4ce155ff804cd73f518cdd465f871 /java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
parent3895d7f8dc2e4999947f61220b86fa148f433413 (diff)
downloadlatinime-052ec62abd577182af8d5b50564d8075b18be3c9.tar.gz
latinime-052ec62abd577182af8d5b50564d8075b18be3c9.tar.xz
latinime-052ec62abd577182af8d5b50564d8075b18be3c9.zip
Restore additional subtypes when the package is updated
With this CL, Intent#ACTION_MY_PACKAGE_REPLACED will not only update the visibility of the setup activity but also reconstruct additional subtypes. This is important because the system always removes all the additional subtypes whenever the package is updated. BUG: 15890448 Change-Id: Ic36ea68f50b1ac89b4cbd268ee53f9a5e5d60afd
Diffstat (limited to 'java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java')
-rw-r--r--java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java b/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
index bcac05a6a..e455e53d3 100644
--- a/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
+++ b/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
@@ -38,6 +38,7 @@ import com.android.inputmethod.compat.ViewCompatUtils;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.settings.SettingsActivity;
import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
+import com.android.inputmethod.latin.utils.UncachedInputMethodManagerUtils;
import java.util.ArrayList;
@@ -93,7 +94,8 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL
}
switch (msg.what) {
case MSG_POLLING_IME_SETTINGS:
- if (SetupActivity.isThisImeEnabled(setupWizardActivity, mImmInHandler)) {
+ if (UncachedInputMethodManagerUtils.isThisImeEnabled(setupWizardActivity,
+ mImmInHandler)) {
setupWizardActivity.invokeSetupWizardOfThisIme();
return;
}
@@ -277,7 +279,8 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL
}
void invokeSubtypeEnablerOfThisIme() {
- final InputMethodInfo imi = SetupActivity.getInputMethodInfoOf(getPackageName(), mImm);
+ final InputMethodInfo imi =
+ UncachedInputMethodManagerUtils.getInputMethodInfoOf(getPackageName(), mImm);
if (imi == null) {
return;
}
@@ -301,10 +304,10 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL
private int determineSetupStepNumber() {
mHandler.cancelPollingImeSettings();
- if (!SetupActivity.isThisImeEnabled(this, mImm)) {
+ if (!UncachedInputMethodManagerUtils.isThisImeEnabled(this, mImm)) {
return STEP_1;
}
- if (!SetupActivity.isThisImeCurrent(this, mImm)) {
+ if (!UncachedInputMethodManagerUtils.isThisImeCurrent(this, mImm)) {
return STEP_2;
}
return STEP_3;