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;
|
||||
case Keyboard.CODE_RESEARCH:
|
||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||
ResearchLogger.getInstance().presentResearchDialog(this);
|
||||
ResearchLogger.getInstance().onResearchKeySelected(this);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -450,12 +450,18 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
|||
prefsChanged(prefs);
|
||||
}
|
||||
|
||||
public void presentResearchDialog(final LatinIME latinIME) {
|
||||
public void onResearchKeySelected(final LatinIME latinIME) {
|
||||
if (mInFeedbackDialog) {
|
||||
Toast.makeText(latinIME, R.string.research_please_exit_feedback_form,
|
||||
Toast.LENGTH_LONG).show();
|
||||
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 boolean showEnable = mIsLoggingSuspended || !sIsLogging;
|
||||
final CharSequence[] items = new CharSequence[] {
|
||||
|
@ -472,6 +478,29 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
|||
presentFeedbackDialog(latinIME);
|
||||
break;
|
||||
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 (!sIsLogging) {
|
||||
setLoggingAllowed(true);
|
||||
|
@ -494,22 +523,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
|||
Toast.makeText(latinIME, R.string.research_notify_logging_suspended,
|
||||
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 = {
|
||||
"UserTimestamp", "contents"
|
||||
|
|
Loading…
Reference in New Issue