Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
#178 fixing the mapping of shared preference keys
Browse files Browse the repository at this point in the history
  • Loading branch information
niccs committed Mar 2, 2016
1 parent e3c1276 commit 5a30726
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/org/iilab/pb/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public void onBackPressed() {
}
}


@Override
public boolean onPreferenceStartScreen(PreferenceFragmentCompat preferenceFragmentCompat,
PreferenceScreen preferenceScreen) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public static Boolean isFirstMsgSent(Context context) {


public static boolean isHardwareTriggerServiceEnabled(Context context) {
String powerButtonTriggerStatus = sharedPreferences(context).getString(context.getString(R.string.powerButtonTriggerStatus_key), context.getString(R.string.activate_power_button_trigger));
String powerButtonTriggerStatus = sharedPreferences(context).getString(context.getString(R.string.configurePowerButtonTriggerKey), context.getString(R.string.activate_power_button_trigger));
return (context.getString(R.string.activate_power_button_trigger).equals(powerButtonTriggerStatus) ? true : false);
}

Expand Down
7 changes: 2 additions & 5 deletions app/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@
<string name="PowerButtonTriggerTitle">Power Button Trigger</string>

<string name="deactivate_power_button_trigger">Deactivated</string>
<string name="powerButtonTriggerStatus_key">"powerButtonTriggerStatus" </string>
<string name="configure_power_button_trigger_summary">"Enable/Disable the power button alarm trigger" </string>
<string name="activate_power_button_trigger">Activated </string>
<string name="debug_mode">Debug Mode </string>

<string name="changeTriggerPattern">Change Trigger Pattern</string>
<string name="firstClicks">Number of first clicks</string>
Expand Down Expand Up @@ -101,7 +98,7 @@
<string name="confirmationSequenceTitle"> Use Confirmation Sequence</string>
<string name="confirmationSequenceKey">confirmationSettings</string>
<string name="confirmationSequenceDefault">1</string>
<string name="confirmationSequenceSummary">Feedback on Alarm Activation</string>
<string name="confirmationSequenceSummary">Pattern to inform that the alarm confirmation is required or not </string>

<string name="confirmationWaitTimeTitle">Confirmation Wait Time</string>
<string name="confirmationWaitTimeDefault">2</string>
Expand All @@ -125,7 +122,7 @@
<string name="redoTrainingKey">redoTraining</string>

<string name="triggerSettingsHeaderTitle">Alarm Trigger Settings</string>
<string name="default7RepeatedPressTitle">(Default) 7 repeated presses</string>
<string name="default7RepeatedPressTitle">(Default)7 Repeated Presses</string>
<string name="default7RepeatedPressKey">default7Press</string>
<string name="extraConfirmationPressTitle">5 presses plus confirmation </string>
<string name="extraConfirmationPressKey">extraConfirmation </string>
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@
<string name="configurePowerButtonTriggerKey">powerButtonTriggerStatus</string>
<string name="configurePowerButtonTriggerSummary">Enable/Disable the power button alarm trigger</string>
<string name="PowerButtonTriggerTitle">Power Button Trigger</string>

<string name="deactivate_power_button_trigger">Deactivated</string>
<string name="powerButtonTriggerStatus_key">"powerButtonTriggerStatus" </string>
<string name="configure_power_button_trigger_summary">"Enable/Disable the power button alarm trigger" </string>
<string name="activate_power_button_trigger">Activated </string>
<string name="debug_mode">Debug Mode </string>

<string name="changeTriggerPattern">Change Trigger Pattern</string>
<string name="firstClicks">Number of first clicks</string>
Expand Down Expand Up @@ -103,7 +101,7 @@
<string name="confirmationSequenceTitle"> Use Confirmation Sequence</string>
<string name="confirmationSequenceKey">confirmationSettings</string>
<string name="confirmationSequenceDefault">1</string>
<string name="confirmationSequenceSummary">Feedback on Alarm Activation</string>
<string name="confirmationSequenceSummary">Pattern to inform that the alarm confirmation is required or not </string>

<string name="confirmationWaitTimeTitle">Confirmation Wait Time</string>
<string name="confirmationWaitTimeDefault">2</string>
Expand Down

0 comments on commit 5a30726

Please sign in to comment.