Skip to content

Commit

Permalink
Remove commented out cue_silence
Browse files Browse the repository at this point in the history
  • Loading branch information
gerhardol committed Aug 7, 2019
1 parent 12d49be commit 8b0bdd7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 55 deletions.
8 changes: 0 additions & 8 deletions app/res/xml/audio_cue_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<!-- Doesn't work yet :-(
<CheckBoxPreference
android:defaultValue="false"
android:persistent="false"
android:key="cue_silence"
android:title="Silence"
android:summary="Clear all cues"/>
-->
<PreferenceCategory android:title="@string/Triggers" />

<CheckBoxPreference
Expand Down
47 changes: 0 additions & 47 deletions app/src/main/org/runnerup/view/AudioCueSettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ public void onCreate(Bundle savedInstanceState) {
btn.setOnPreferenceClickListener(onTestCueinfoClick);
}

{
Preference btn = findPreference("cue_silence");
if (btn != null) {
btn.setOnPreferenceClickListener(this.onSilenceClick);
}
}

HRZones hrZones = new HRZones(this);
boolean hasHR = SettingsActivity.hasHR(this);
boolean hasHRZones = hrZones.isConfigured();
Expand Down Expand Up @@ -335,46 +328,6 @@ public void onClick(DialogInterface dialog, int which) {
builder.show();
}

private final OnPreferenceClickListener onSilenceClick = new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Resources res = getResources();
int clearList[] = {
R.string.cueinfo_total_distance,
R.string.cueinfo_total_time,
R.string.cueinfo_total_speed,
R.string.cueinfo_total_pace,
R.string.cueinfo_lap_distance,
R.string.cueinfo_lap_time,
R.string.cueinfo_lap_speed,
R.string.cueinfo_lap_pace,
R.string.cueinfo_target_coaching
};

int setList[] = {
R.string.cueinfo_skip_startstop
};

for (int s : clearList) {
Preference a = getPreferenceManager().findPreference(res.getString(s));
if (a != null) {
a.getEditor().putBoolean(res.getString(s), false);
a.getEditor().apply();
}
}

for (int s : setList) {
Preference a = getPreferenceManager().findPreference(res.getString(s));
if (a != null) {
a.getEditor().putBoolean(res.getString(s), true);
a.getEditor().apply();
}
}
return false;
}

};

private final OnPreferenceClickListener onTestCueinfoClick = new OnPreferenceClickListener() {

TextToSpeech tts = null;
Expand Down

0 comments on commit 8b0bdd7

Please sign in to comment.