ResearchLogger no longer offers option to disable logging
Bug: 6188932 Change-Id: I0b9474216080f3820438c09f89b0b6c6c102c69dmain
parent
49d8af8a4e
commit
58eb4d9f27
|
@ -1309,7 +1309,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
break;
|
break;
|
||||||
case Keyboard.CODE_RESEARCH:
|
case Keyboard.CODE_RESEARCH:
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.getInstance().presentResearchDialog(this);
|
ResearchLogger.getInstance().onResearchKeySelected(this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -450,12 +450,18 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
prefsChanged(prefs);
|
prefsChanged(prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void presentResearchDialog(final LatinIME latinIME) {
|
public void onResearchKeySelected(final LatinIME latinIME) {
|
||||||
if (mInFeedbackDialog) {
|
if (mInFeedbackDialog) {
|
||||||
Toast.makeText(latinIME, R.string.research_please_exit_feedback_form,
|
Toast.makeText(latinIME, R.string.research_please_exit_feedback_form,
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
presentFeedbackDialog(latinIME);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: currently unreachable. Remove after being sure no menu is needed.
|
||||||
|
/*
|
||||||
|
public void presentResearchDialog(final LatinIME latinIME) {
|
||||||
final CharSequence title = latinIME.getString(R.string.english_ime_research_log);
|
final CharSequence title = latinIME.getString(R.string.english_ime_research_log);
|
||||||
final boolean showEnable = mIsLoggingSuspended || !sIsLogging;
|
final boolean showEnable = mIsLoggingSuspended || !sIsLogging;
|
||||||
final CharSequence[] items = new CharSequence[] {
|
final CharSequence[] items = new CharSequence[] {
|
||||||
|
@ -472,6 +478,29 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
presentFeedbackDialog(latinIME);
|
presentFeedbackDialog(latinIME);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
enableOrDisable(showEnable, latinIME);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
final AlertDialog.Builder builder = new AlertDialog.Builder(latinIME)
|
||||||
|
.setItems(items, listener)
|
||||||
|
.setTitle(title);
|
||||||
|
latinIME.showOptionDialog(builder.create());
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
private boolean mInFeedbackDialog = false;
|
||||||
|
public void presentFeedbackDialog(LatinIME latinIME) {
|
||||||
|
mInFeedbackDialog = true;
|
||||||
|
latinIME.launchKeyboardedDialogActivity(FeedbackActivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: currently unreachable. Remove after being sure enable/disable is
|
||||||
|
// not needed.
|
||||||
|
/*
|
||||||
|
public void enableOrDisable(final boolean showEnable, final LatinIME latinIME) {
|
||||||
if (showEnable) {
|
if (showEnable) {
|
||||||
if (!sIsLogging) {
|
if (!sIsLogging) {
|
||||||
setLoggingAllowed(true);
|
setLoggingAllowed(true);
|
||||||
|
@ -494,22 +523,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
Toast.makeText(latinIME, R.string.research_notify_logging_suspended,
|
Toast.makeText(latinIME, R.string.research_notify_logging_suspended,
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(latinIME)
|
|
||||||
.setItems(items, listener)
|
|
||||||
.setTitle(title);
|
|
||||||
latinIME.showOptionDialog(builder.create());
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean mInFeedbackDialog = false;
|
|
||||||
public void presentFeedbackDialog(LatinIME latinIME) {
|
|
||||||
mInFeedbackDialog = true;
|
|
||||||
latinIME.launchKeyboardedDialogActivity(FeedbackActivity.class);
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
private static final String[] EVENTKEYS_FEEDBACK = {
|
private static final String[] EVENTKEYS_FEEDBACK = {
|
||||||
"UserTimestamp", "contents"
|
"UserTimestamp", "contents"
|
||||||
|
|
Loading…
Reference in New Issue