aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-02-17 11:28:48 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-02-17 14:57:04 +0900
commit28c02b400f9271b29e0fce20e7dae51d1d2b769f (patch)
tree391a014fc7618ca0a6b1ad41d86ac0386bb48113 /java/src/com/android/inputmethod/latin/LatinIME.java
parent95d16561e0e6c38dbd99c893f09c5dbe9d4a465d (diff)
downloadlatinime-28c02b400f9271b29e0fce20e7dae51d1d2b769f.tar.gz
latinime-28c02b400f9271b29e0fce20e7dae51d1d2b769f.tar.xz
latinime-28c02b400f9271b29e0fce20e7dae51d1d2b769f.zip
Add go to "Settings" button to important notice dialog
This CL also - removes icons on important notice title. - changes the "Personalized suggestions" summary text. This change must be checked in together with Id115d89ba9. Bug: 10587358 Change-Id: I52ff26fa8ae12445e9014ba08253f69e1be609f4
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index d1125afcc..d69fbb182 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1176,14 +1176,22 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public void onClick(final DialogInterface di, final int position) {
di.dismiss();
- ImportantNoticeUtils.updateLastImportantNoticeVersion(context);
- setNeutralSuggestionStrip();
+ if (position == DialogInterface.BUTTON_POSITIVE) {
+ ImportantNoticeUtils.updateLastImportantNoticeVersion(context);
+ setNeutralSuggestionStrip();
+ return;
+ }
+ if (position == DialogInterface.BUTTON_NEGATIVE) {
+ launchSettings();
+ return;
+ }
}
};
final AlertDialog.Builder builder =
new AlertDialog.Builder(context, AlertDialog.THEME_HOLO_DARK);
builder.setMessage(R.string.important_notice_contents)
- .setPositiveButton(android.R.string.ok, listener);
+ .setPositiveButton(android.R.string.ok, listener)
+ .setNegativeButton(R.string.go_to_settings, listener);
showOptionDialog(builder.create(), true /* cancelable */);
}
@@ -1612,13 +1620,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
launchSubActivity(SettingsActivity.class);
}
- public void launchKeyboardedDialogActivity(final Class<? extends Activity> activityClass) {
- // Put the text in the attached EditText into a safe, saved state before switching to a
- // new activity that will also use the soft keyboard.
- mInputLogic.commitTyped(mSettings.getCurrent(), LastComposedWord.NOT_A_SEPARATOR);
- launchSubActivity(activityClass);
- }
-
private void launchSubActivity(final Class<? extends Activity> activityClass) {
Intent intent = new Intent();
intent.setClass(LatinIME.this, activityClass);