package com.andela.iworkout.utilities;


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

public class Settings {
    public Settings() {
    }

    public static boolean getPushUpMode(Context context) {
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        return preferences.getBoolean("pushup_mode", false);
    }

    public static long getTime(Context context) {
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        long intValue = Long.valueOf(preferences.getString("set_time_of_pushup", ""));
        return (intValue < 0) ? 0 : intValue;
    }

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

@@ -108,16 +108,40 @@
 rences;%0A
+import android.net.Uri;%0A
 import a
@@ -1032,11 +1032,1286 @@
 e;%0A    %7D
+%0A%0A    public static boolean getNotificationMode(Context context) %7B%0A        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);%0A        return preferences.getBoolean(%22notifications_pushup%22, false);%0A    %7D%0A%0A    public static Uri getRingtone(Context context) %7B%0A        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);%0A        String value = preferences.getString(%22notifications_pushup_ringtone%22, %22%22);%0A        return value.isEmpty() ? null : Uri.parse(value);%0A    %7D%0A%0A    public static boolean getVibrate(Context context) %7B%0A        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);%0A        return preferences.getBoolean(%22notifications_pushup_vibrate%22, false);%0A    %7D%0A%0A    public static int getReminder(Context context) %7B%0A        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);%0A        String value = preferences.getString(%22pushup_reminder%22, %22%22);%0A        return value.isEmpty() ? -1 : Integer.valueOf(value);%0A    %7D%0A%0A    public static String getAlarmTime(Context context) %7B%0A        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);%0A        return preferences.getString(%22alarm_time%22, %22%22);%0A    %7D
 %0A%7D%0A

Add methods to get Notifications preference values