// Path: src/com/nloko/android/Log.java
// public final class Log {
// 
// 	public static boolean debug = false;
// 	
// 	public static void d(String tag, String message)
// 	{
// 		if (debug) {
// 			android.util.Log.d(tag, message);
// 		}
// 	}
// 	
// 	public static void w(String tag, String message)
// 	{
// 		android.util.Log.w(tag, message);
// 	}
// 	
// 	public static void e(String tag, String message)
// 	{
// 		android.util.Log.e(tag, message);
// 	}
// 	
// 	public static void v(String tag, String message)
// 	{
// 		android.util.Log.v(tag, message);
// 	}
// 	
// 	public static void i(String tag, String message)
// 	{
// 		android.util.Log.i(tag, message);
// 	}
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Contacts implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.contact";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.contact";
// 		
// 	public static final String DEFAULT_SORT_ORDER = "_id ASC";
// 	public static final String LOOKUP_KEY = "lookup_key";
// 	public static final String PIC_URL = "pic_url";
// 	public static final String PHOTO_HASH = "photo_hash";
// 	public static final String NETWORK_PHOTO_HASH = "network_photo_hash";
// 	public static final String FRIEND_ID = "friend_id";
// 	public static final String SOURCE = "source";
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Results implements BaseColumns {
//        public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/results");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.result";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.result";
// 
//        public static final String DEFAULT_SORT_ORDER = "name ASC";
//        public static final String NAME = "name";
//        public static final String PIC_URL = "pic_url";
//        public static final String DESCRIPTION = "description";
//        public static final String FRIEND_ID = "friend_id";
//        public static final String CONTACT_ID = "contact_id";
//        public static final String LOOKUP_KEY = "lookup_key";
//        public static final String SYNC_ID = "sync_id";
//    }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Sync implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/sync");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.sync";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.sync";
// 		
//        public static final String DEFAULT_SORT_ORDER = "source ASC";
// 	public static final String DATE_STARTED = "date_started";
// 	public static final String DATE_COMPLETED = "date_completed";
// 	public static final String UPDATED = "updated";
// 	public static final String SKIPPED = "skipped";
// 	public static final String NOT_FOUND = "not_found";
// 	public static final String SOURCE = "source";
// }


import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import java.util.HashMap;
import com.nloko.android.Log;
import com.nloko.android.syncmypix.SyncMyPix.Contacts;
import com.nloko.android.syncmypix.SyncMyPix.Results;
import com.nloko.android.syncmypix.SyncMyPix.Sync;
import android.content.ContentProvider;
        resultsProjection.put(Results.PIC_URL, Results.PIC_URL);
        resultsProjection.put(Results.DESCRIPTION, Results.DESCRIPTION);
        resultsProjection.put(Results.CONTACT_ID, Results.CONTACT_ID);
        resultsProjection.put(Results.LOOKUP_KEY, Results.LOOKUP_KEY);
        resultsProjection.put(Results.FRIEND_ID, Results.FRIEND_ID);
    }

    private static class DatabaseHelper extends SQLiteOpenHelper {

        DatabaseHelper(Context context) {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
        }

        @Override
        public void onCreate(SQLiteDatabase db) {
            db.execSQL("CREATE TABLE " + CONTACTS_TABLE_NAME + " ("
                    + Contacts._ID + " INTEGER PRIMARY KEY,"
                    + Contacts.LOOKUP_KEY + " TEXT DEFAULT NULL,"
                    + Contacts.PIC_URL + " TEXT DEFAULT NULL,"
                    + Contacts.PHOTO_HASH + " TEXT,"
                    + Contacts.NETWORK_PHOTO_HASH + " TEXT,"
                    + Contacts.FRIEND_ID + " TEXT DEFAULT NULL,"
                    + Contacts.SOURCE + " TEXT"
                    + ");");
            
            db.execSQL("CREATE TABLE " + RESULTS_TABLE_NAME + " ("
                    + Results._ID + " INTEGER PRIMARY KEY,"
                    + Results.SYNC_ID + " INTEGER,"
                    + Results.NAME + " TEXT DEFAULT NULL,"
                    + Results.DESCRIPTION + " TEXT DEFAULT NULL,"
// Path: src/com/nloko/android/Log.java
// public final class Log {
// 
// 	public static boolean debug = false;
// 	
// 	public static void d(String tag, String message)
// 	{
// 		if (debug) {
// 			android.util.Log.d(tag, message);
// 		}
// 	}
// 	
// 	public static void w(String tag, String message)
// 	{
// 		android.util.Log.w(tag, message);
// 	}
// 	
// 	public static void e(String tag, String message)
// 	{
// 		android.util.Log.e(tag, message);
// 	}
// 	
// 	public static void v(String tag, String message)
// 	{
// 		android.util.Log.v(tag, message);
// 	}
// 	
// 	public static void i(String tag, String message)
// 	{
// 		android.util.Log.i(tag, message);
// 	}
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Contacts implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.contact";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.contact";
// 		
// 	public static final String DEFAULT_SORT_ORDER = "_id ASC";
// 	public static final String LOOKUP_KEY = "lookup_key";
// 	public static final String PIC_URL = "pic_url";
// 	public static final String PHOTO_HASH = "photo_hash";
// 	public static final String NETWORK_PHOTO_HASH = "network_photo_hash";
// 	public static final String FRIEND_ID = "friend_id";
// 	public static final String SOURCE = "source";
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Results implements BaseColumns {
//        public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/results");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.result";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.result";
// 
//        public static final String DEFAULT_SORT_ORDER = "name ASC";
//        public static final String NAME = "name";
//        public static final String PIC_URL = "pic_url";
//        public static final String DESCRIPTION = "description";
//        public static final String FRIEND_ID = "friend_id";
//        public static final String CONTACT_ID = "contact_id";
//        public static final String LOOKUP_KEY = "lookup_key";
//        public static final String SYNC_ID = "sync_id";
//    }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Sync implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/sync");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.sync";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.sync";
// 		
//        public static final String DEFAULT_SORT_ORDER = "source ASC";
// 	public static final String DATE_STARTED = "date_started";
// 	public static final String DATE_COMPLETED = "date_completed";
// 	public static final String UPDATED = "updated";
// 	public static final String SKIPPED = "skipped";
// 	public static final String NOT_FOUND = "not_found";
// 	public static final String SOURCE = "source";
// }


// Path: src/com/nloko/android/syncmypix/SyncMyPixProvider.java
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import java.util.HashMap;
import com.nloko.android.Log;
import com.nloko.android.syncmypix.SyncMyPix.Contacts;
import com.nloko.android.syncmypix.SyncMyPix.Results;
import com.nloko.android.syncmypix.SyncMyPix.Sync;
import android.content.ContentProvider;

        resultsProjection.put(Results.PIC_URL, Results.PIC_URL);
        resultsProjection.put(Results.DESCRIPTION, Results.DESCRIPTION);
        resultsProjection.put(Results.CONTACT_ID, Results.CONTACT_ID);
        resultsProjection.put(Results.LOOKUP_KEY, Results.LOOKUP_KEY);
        resultsProjection.put(Results.FRIEND_ID, Results.FRIEND_ID);
    }

    private static class DatabaseHelper extends SQLiteOpenHelper {

        DatabaseHelper(Context context) {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
        }

        @Override
        public void onCreate(SQLiteDatabase db) {
            db.execSQL("CREATE TABLE " + CONTACTS_TABLE_NAME + " ("
                    + Contacts._ID + " INTEGER PRIMARY KEY,"
                    + Contacts.LOOKUP_KEY + " TEXT DEFAULT NULL,"
                    + Contacts.PIC_URL + " TEXT DEFAULT NULL,"
                    + Contacts.PHOTO_HASH + " TEXT,"
                    + Contacts.NETWORK_PHOTO_HASH + " TEXT,"
                    + Contacts.FRIEND_ID + " TEXT DEFAULT NULL,"
                    + Contacts.SOURCE + " TEXT"
                    + ");");
            
            db.execSQL("CREATE TABLE " + RESULTS_TABLE_NAME + " ("
                    + Results._ID + " INTEGER PRIMARY KEY,"
                    + Results.SYNC_ID + " INTEGER,"
                    + Results.NAME + " TEXT DEFAULT NULL,"
                    + Results.DESCRIPTION + " TEXT DEFAULT NULL,"
                    + Results.PIC_URL + " TEXT  DEFAULT NULL,"