From 83a96fe5c748926d53a3771d2913a0a1012753c2 Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Thu, 7 Aug 2014 20:26:34 +0900 Subject: [PATCH] Initial implementation of Help & feedback bug: 16717930 Change-Id: Iddc8e831c3f01ec7eb02ed1bc5d5e103d497e177 --- java/res/values/strings.xml | 5 +++-- .../latin/settings/SettingsFragment.java | 19 +++++++++++-------- .../latin/utils/FeedbackUtils.java | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index b6601c8c2..cb03260ed 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -159,8 +159,9 @@ Input languages - - Send feedback + + Help & feedback Input languages diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java index 6734a9ce6..217a40701 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java @@ -29,9 +29,12 @@ import com.android.inputmethod.latin.utils.FeedbackUtils; import com.android.inputmethodcommon.InputMethodSettingsFragment; public final class SettingsFragment extends InputMethodSettingsFragment { - private static final int NO_MENU_GROUP = Menu.NONE; // We don't care about menu grouping. - private static final int MENU_FEEDBACK = Menu.FIRST; // The first menu item id and order. - private static final int MENU_ABOUT = Menu.FIRST + 1; // The second menu item id and order. + // We don't care about menu grouping. + private static final int NO_MENU_GROUP = Menu.NONE; + // The first menu item id and order. + private static final int MENU_HELP_AND_FEEDBACK = Menu.FIRST; + // The second menu item id and order. + private static final int MENU_ABOUT = Menu.FIRST + 1; @Override public void onCreate(final Bundle icicle) { @@ -53,9 +56,9 @@ public final class SettingsFragment extends InputMethodSettingsFragment { @Override public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { - if (FeedbackUtils.isFeedbackFormSupported()) { - menu.add(NO_MENU_GROUP, MENU_FEEDBACK /* itemId */, MENU_FEEDBACK /* order */, - R.string.send_feedback); + if (FeedbackUtils.isHelpAndFeedbackFormSupported()) { + menu.add(NO_MENU_GROUP, MENU_HELP_AND_FEEDBACK /* itemId */, + MENU_HELP_AND_FEEDBACK /* order */, R.string.help_and_feedback); } final int aboutResId = FeedbackUtils.getAboutKeyboardTitleResId(); if (aboutResId != 0) { @@ -66,8 +69,8 @@ public final class SettingsFragment extends InputMethodSettingsFragment { @Override public boolean onOptionsItemSelected(final MenuItem item) { final int itemId = item.getItemId(); - if (itemId == MENU_FEEDBACK) { - FeedbackUtils.showFeedbackForm(getActivity()); + if (itemId == MENU_HELP_AND_FEEDBACK) { + FeedbackUtils.showHelpAndFeedbackForm(getActivity()); return true; } if (itemId == MENU_ABOUT) { diff --git a/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java b/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java index ec7eaf4a0..0aed41ee4 100644 --- a/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java @@ -20,11 +20,11 @@ import android.content.Context; import android.content.Intent; public class FeedbackUtils { - public static boolean isFeedbackFormSupported() { + public static boolean isHelpAndFeedbackFormSupported() { return false; } - public static void showFeedbackForm(Context context) { + public static void showHelpAndFeedbackForm(Context context) { } public static int getAboutKeyboardTitleResId() {