am 14dd52b8: Merge "Adjust settings for development-only versions"
* commit '14dd52b8c058b27adb17777536ff11c4b69616fc': Adjust settings for development-only versionsmain
commit
5062442fd5
|
@ -42,6 +42,7 @@ import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
import com.android.inputmethod.latin.setup.LauncherIconVisibilityManager;
|
import com.android.inputmethod.latin.setup.LauncherIconVisibilityManager;
|
||||||
import com.android.inputmethod.latin.userdictionary.UserDictionaryList;
|
import com.android.inputmethod.latin.userdictionary.UserDictionaryList;
|
||||||
import com.android.inputmethod.latin.userdictionary.UserDictionarySettings;
|
import com.android.inputmethod.latin.userdictionary.UserDictionarySettings;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
import com.android.inputmethodcommon.InputMethodSettingsFragment;
|
import com.android.inputmethodcommon.InputMethodSettingsFragment;
|
||||||
|
|
||||||
public final class SettingsFragment extends InputMethodSettingsFragment
|
public final class SettingsFragment extends InputMethodSettingsFragment
|
||||||
|
@ -130,7 +131,12 @@ public final class SettingsFragment extends InputMethodSettingsFragment
|
||||||
feedbackSettings.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
feedbackSettings.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(final Preference pref) {
|
public boolean onPreferenceClick(final Preference pref) {
|
||||||
FeedbackUtils.showFeedbackForm(getActivity());
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
|
// Use development-only feedback mechanism
|
||||||
|
ResearchLogger.getInstance().presentFeedbackDialogFromSettings();
|
||||||
|
} else {
|
||||||
|
FeedbackUtils.showFeedbackForm(getActivity());
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -141,6 +147,10 @@ public final class SettingsFragment extends InputMethodSettingsFragment
|
||||||
miscSettings.removePreference(aboutSettings);
|
miscSettings.removePreference(aboutSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
|
// The about screen contains items that may be confusing in development-only versions.
|
||||||
|
miscSettings.removePreference(aboutSettings);
|
||||||
|
}
|
||||||
|
|
||||||
final boolean showVoiceKeyOption = res.getBoolean(
|
final boolean showVoiceKeyOption = res.getBoolean(
|
||||||
R.bool.config_enable_show_voice_key_option);
|
R.bool.config_enable_show_voice_key_option);
|
||||||
|
|
|
@ -466,6 +466,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
presentFeedbackDialog(latinIME);
|
presentFeedbackDialog(latinIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void presentFeedbackDialogFromSettings() {
|
||||||
|
if (mLatinIME != null) {
|
||||||
|
presentFeedbackDialog(mLatinIME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void presentFeedbackDialog(final LatinIME latinIME) {
|
public void presentFeedbackDialog(final LatinIME latinIME) {
|
||||||
if (isMakingUserRecording()) {
|
if (isMakingUserRecording()) {
|
||||||
saveRecording();
|
saveRecording();
|
||||||
|
|
Loading…
Reference in New Issue