Add two-ways sync to Google Drive.

This commit is contained in:
Jimmy Shih
2013-01-23 17:00:33 -08:00
parent 77e6dc1b73
commit ff375c1eb5
15 changed files with 1064 additions and 36 deletions
@@ -18,6 +18,7 @@ package com.google.android.apps.mytracks.util;
import com.google.android.apps.mytracks.Constants;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
@@ -131,6 +132,7 @@ public class PreferencesUtils {
* @param keyId the key id
* @param value the value
*/
@SuppressLint("CommitPrefEdits")
public static void setBoolean(Context context, int keyId, boolean value) {
SharedPreferences sharedPreferences = context.getSharedPreferences(
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
@@ -159,6 +161,7 @@ public class PreferencesUtils {
* @param keyId the key id
* @param value the value
*/
@SuppressLint("CommitPrefEdits")
public static void setInt(Context context, int keyId, int value) {
SharedPreferences sharedPreferences = context.getSharedPreferences(
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
@@ -186,6 +189,7 @@ public class PreferencesUtils {
* @param keyId the key id
* @param value the value
*/
@SuppressLint("CommitPrefEdits")
public static void setLong(Context context, int keyId, long value) {
SharedPreferences sharedPreferences = context.getSharedPreferences(
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
@@ -214,6 +218,7 @@ public class PreferencesUtils {
* @param keyId the key id
* @param value the value
*/
@SuppressLint("CommitPrefEdits")
public static void setString(Context context, int keyId, String value) {
SharedPreferences sharedPreferences = context.getSharedPreferences(
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);