summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-04-21 11:20:19 -0700
committerSteve Kondik <steve@cyngn.com>2015-04-21 11:20:19 -0700
commit434b5fdf53a3dca09ed3f916d6dbb7b0af253b2e (patch)
treed8122033c9b7db1725596fa9fe28776923c1518c
parent6d1c8e97854e547220b0ada7aa26439db12a5de1 (diff)
parent4585f3236d681cb39ca5f24c06d72fc6046f9d03 (diff)
downloadandroid_packages_inputmethods_LatinIME-stable/cm-12.1-YOG3C.tar.gz
android_packages_inputmethods_LatinIME-stable/cm-12.1-YOG3C.tar.bz2
android_packages_inputmethods_LatinIME-stable/cm-12.1-YOG3C.zip
Merge tag 'android-5.1.1_r1' of https://android.googlesource.com/platform/packages/inputmethods/LatinIME into cm-12.1stable/cm-12.1-YOG3C
Android 5.1.1 release 1
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SettingsFragment.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
index 4fc17387f..6c8ab573a 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;
@@ -67,13 +69,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;