package com.andela.iworkout.utilities;


import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class Settings {
    public Settings() {
    }

    public static void saveTime(Context context, long value) {
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        SharedPreferences.Editor editor = preferences.edit();
        editor.putLong("TIMEFORPU", value);
        editor.commit();
    }

    public static long getTime(Context context) {
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        int intValue = preferences.getInt("TIMEFORPU", 0);
        return (intValue < 0) ? 0 : intValue;
    }

    public static void savePushUps(Context context, int value) {
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        SharedPreferences.Editor editor = preferences.edit();
        editor.putInt("PUSHUPS", value);
        editor.commit();
    }

    public static int getPushUps(Context context) {
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        int intValue = preferences.getInt("PUSHUPS", 0);
        return (intValue < 0) ? 0 : intValue;
    }
}

@@ -231,20 +231,28 @@
 tic 
-void saveTim
+boolean getPushUpMod
 e(Co
@@ -268,20 +268,8 @@
 text
-, long value
 ) %7B%0A
@@ -376,128 +376,58 @@
     
-SharedPreferences.Editor editor = preferences.edit();%0A        editor.putLong(%22TIMEFORPU%22, value);%0A        editor.commit(
+return preferences.getBoolean(%22pushup_mode%22, false
 );%0A 
@@ -578,35 +578,36 @@
 ntext);%0A        
-int
+long
  intValue = pref
@@ -594,32 +594,45 @@
 long intValue = 
+Long.valueOf(
 preferences.getI
@@ -634,26 +634,40 @@
 .get
-Int(%22TIMEFORPU%22, 0
+String(%22set_time_of_pushup%22, %22%22)
 );%0A 
@@ -722,304 +722,8 @@
  %7D%0A%0A
-    public static void savePushUps(Context context, int value) %7B%0A        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);%0A        SharedPreferences.Editor editor = preferences.edit();%0A        editor.putInt(%22PUSHUPS%22, value);%0A        editor.commit();%0A    %7D%0A%0A
     
@@ -893,39 +893,73 @@
 e = 
-preferences.getInt(%22PUSHUPS%22, 0
+Integer.valueOf(preferences.getString(%22set_number_of_pushup%22, %22%22)
 );%0A 

Update Settings class to suite SettingsActivity class