aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-02-20 23:02:17 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-20 23:02:17 -0800
commit6ec9019f8774e0cf076730a1f4dbd7eda46f3ad0 (patch)
tree668d1ee8906413c3a7e7fe80f7e47926735e78c4 /java/src/com/android/inputmethod/latin/LatinIME.java
parent743da437fd51eeec4c2824948cffdd65f1481e2e (diff)
parentfe39d576dcd515d7fcd678a2ed6a621185cc69e3 (diff)
downloadlatinime-6ec9019f8774e0cf076730a1f4dbd7eda46f3ad0.tar.gz
latinime-6ec9019f8774e0cf076730a1f4dbd7eda46f3ad0.tar.xz
latinime-6ec9019f8774e0cf076730a1f4dbd7eda46f3ad0.zip
am fe39d576: Support versioned important notice
* commit 'fe39d576dcd515d7fcd678a2ed6a621185cc69e3': Support versioned important notice
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 47137e7fb..f2fa32923 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1190,15 +1190,28 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
new AlertDialog.Builder(context, AlertDialog.THEME_HOLO_DARK);
builder.setMessage(ImportantNoticeUtils.getNextImportantNoticeContents(context));
builder.setPositiveButton(android.R.string.ok, null /* listener */);
+ final int nextVersion = ImportantNoticeUtils.getNextImportantNoticeVersion(context);
final OnClickListener onClickListener = new OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int position) {
- if (position == DialogInterface.BUTTON_NEGATIVE) {
- launchSettings();
+ switch (nextVersion) {
+ case ImportantNoticeUtils.VERSION_TO_ENABLE_PERSONALIZED_SUGGESTIONS:
+ if (position == DialogInterface.BUTTON_NEGATIVE) {
+ launchSettings();
+ }
+ break;
+ default:
+ break;
}
}
};
- builder.setNegativeButton(R.string.go_to_settings, onClickListener);
+ switch (nextVersion) {
+ case ImportantNoticeUtils.VERSION_TO_ENABLE_PERSONALIZED_SUGGESTIONS:
+ builder.setNegativeButton(R.string.go_to_settings, onClickListener);
+ break;
+ default:
+ break;
+ }
final AlertDialog importantNoticeDialog = builder.create();
importantNoticeDialog.setOnShowListener(new OnShowListener() {
@Override