aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
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