aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/values/strings.xml6
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SettingsFragment.java16
2 files changed, 17 insertions, 5 deletions
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 54579f2d6..5655a5529 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -62,9 +62,9 @@
<string name="cloud_sync_summary_disabled">Sync your personal dictionary across devices</string>
<!-- Option title for starting the sync cycle now. [CHAR LIMIT=33]-->
<string name="sync_now_title">Sync now</string>
- <!-- Option title for letting user delete data from Google servers. [CHAR LIMIT=33] -->
- <string name="clear_sync_data_title">Delete Keyboard Cloud data</string>
- <!-- Option summary for letting user delete data from Google servers. [CHAR LIMIT=65] -->
+ <!-- Option title for letting user delete synced google keyboard data from Google servers. [CHAR LIMIT=35] -->
+ <string name="clear_sync_data_title">Delete cloud data</string>
+ <!-- Option summary for letting user delete synced google keyboard data from Google servers. [CHAR LIMIT=65] -->
<string name="clear_sync_data_summary">Deletes your synced data from Google</string>
<!-- Text for confirmation dialog box asking user to confirm deletion of cloud data. [CHAR LIMIT=65] -->
<string name="clear_sync_data_confirmation">Your synced data will be deleted from the cloud. Are you sure?</string>
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
index b98c53af4..f5455e3db 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
@@ -16,10 +16,12 @@
package com.android.inputmethod.latin.settings;
+import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceScreen;
+import android.provider.Settings.Secure;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -68,13 +70,23 @@ public final class SettingsFragment extends InputMethodSettingsFragment {
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
+ final Activity activity = getActivity();
+ final int setupStatus = Secure.getInt(
+ activity.getContentResolver(),
+ "user_setup_complete",
+ 0 /* default */);
+ if (setupStatus == 0) {
+ // If setup is not complete, it's not safe to launch Help or other activities
+ // because they might go to the Play Store. See b/19866981.
+ return true;
+ }
final int itemId = item.getItemId();
if (itemId == MENU_HELP_AND_FEEDBACK) {
- FeedbackUtils.showHelpAndFeedbackForm(getActivity());
+ FeedbackUtils.showHelpAndFeedbackForm(activity);
return true;
}
if (itemId == MENU_ABOUT) {
- final Intent aboutIntent = FeedbackUtils.getAboutKeyboardIntent(getActivity());
+ final Intent aboutIntent = FeedbackUtils.getAboutKeyboardIntent(activity);
if (aboutIntent != null) {
startActivity(aboutIntent);
return true;