diff options
author | 2014-02-20 15:25:07 +0900 | |
---|---|---|
committer | 2014-02-21 09:54:08 +0900 | |
commit | fe39d576dcd515d7fcd678a2ed6a621185cc69e3 (patch) | |
tree | c47f018fe5ae1d7b0e2358ef26a467e57f2a5091 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 1b3a142cace93ab22064ae5cf5f2d2ff7635ae9e (diff) | |
download | latinime-fe39d576dcd515d7fcd678a2ed6a621185cc69e3.tar.gz latinime-fe39d576dcd515d7fcd678a2ed6a621185cc69e3.tar.xz latinime-fe39d576dcd515d7fcd678a2ed6a621185cc69e3.zip |
Support versioned important notice
This change must be checked in together with If38a754d00.
Bug: 10587358
Change-Id: I91580f9468bc5ee7ed1694d7852a60dc6793dac0
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 19 |
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 |