// Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");


import static com.shaddock.crsync.CrsyncConstants.logger;
import java.util.Vector;
import android.content.ComponentName;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
		    notifyChange(uri);
		    return 1;
        case CODE_CONTENT:
            mMagnet = values.getAsString(CrsyncConstants.COLUMN_CONTENT_MAGNET);
            mBaseUrl = values.getAsString(CrsyncConstants.COLUMN_CONTENT_BASEURL);
            mLocalApp = values.getAsString(CrsyncConstants.COLUMN_CONTENT_LOCALAPP);
            mLocalRes = values.getAsString(CrsyncConstants.COLUMN_CONTENT_LOCALRES);
            notifyChange(uri);
            return 1;
        case CODE_APP:
            mAppHash = values.getAsString(CrsyncConstants.COLUMN_APP_HASH);
            mAppPercent = values.getAsInteger(CrsyncConstants.COLUMN_APP_PERCENT);
            notifyChange(uri);
            return 1;
        case CODE_RESOURCE:
            CrsyncInfo.ResInfo r = new CrsyncInfo.ResInfo();
            r.mName = values.getAsString(CrsyncConstants.COLUMN_RES_NAME);
            r.mHash = values.getAsString(CrsyncConstants.COLUMN_RES_HASH);
            r.mSize = values.getAsInteger(CrsyncConstants.COLUMN_RES_SIZE);
            r.mPercent = values.getAsInteger(CrsyncConstants.COLUMN_RES_PERCENT);
            for (CrsyncInfo.ResInfo x : mRes) {
                if(x.mName.equalsIgnoreCase(r.mName) || x.mHash.equalsIgnoreCase(r.mHash)) {
                    x.mPercent = r.mPercent;
                    notifyChange(uri);
                    return 1;
                }
            }
            logger.severe("update resource not found : " + r.toString());
            return 0;
        default:
// Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");


// Path: android/src/com/shaddock/crsync/CrsyncProvider.java
import static com.shaddock.crsync.CrsyncConstants.logger;
import java.util.Vector;
import android.content.ComponentName;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;

		    notifyChange(uri);
		    return 1;
        case CODE_CONTENT:
            mMagnet = values.getAsString(CrsyncConstants.COLUMN_CONTENT_MAGNET);
            mBaseUrl = values.getAsString(CrsyncConstants.COLUMN_CONTENT_BASEURL);
            mLocalApp = values.getAsString(CrsyncConstants.COLUMN_CONTENT_LOCALAPP);
            mLocalRes = values.getAsString(CrsyncConstants.COLUMN_CONTENT_LOCALRES);
            notifyChange(uri);
            return 1;
        case CODE_APP:
            mAppHash = values.getAsString(CrsyncConstants.COLUMN_APP_HASH);
            mAppPercent = values.getAsInteger(CrsyncConstants.COLUMN_APP_PERCENT);
            notifyChange(uri);
            return 1;
        case CODE_RESOURCE:
            CrsyncInfo.ResInfo r = new CrsyncInfo.ResInfo();
            r.mName = values.getAsString(CrsyncConstants.COLUMN_RES_NAME);
            r.mHash = values.getAsString(CrsyncConstants.COLUMN_RES_HASH);
            r.mSize = values.getAsInteger(CrsyncConstants.COLUMN_RES_SIZE);
            r.mPercent = values.getAsInteger(CrsyncConstants.COLUMN_RES_PERCENT);
            for (CrsyncInfo.ResInfo x : mRes) {
                if(x.mName.equalsIgnoreCase(r.mName) || x.mHash.equalsIgnoreCase(r.mHash)) {
                    x.mPercent = r.mPercent;
                    notifyChange(uri);
                    return 1;
                }
            }
            logger.severe("update resource not found : " + r.toString());
            return 0;
        default:
            logger.severe("Unknown URI: " + uri);