diff --git a/src/java/JavaFileStorage/project.properties b/src/java/JavaFileStorage/project.properties index 9968ee5e..a42052c5 100644 --- a/src/java/JavaFileStorage/project.properties +++ b/src/java/JavaFileStorage/project.properties @@ -13,4 +13,5 @@ proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project. # Project target. target=android-17 android.library=true -android.library.reference.1=../../../../../../../AppData/Local/Android/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib +android.library.reference.1=..\\..\\..\\..\\..\\..\\..\\AppData\\Local\\Android\\android-sdk\\extras\\google\\google_play_services\\libproject\\google-play-services_lib +android.library.reference.2=../../../../LiveSDK-for-Android/src diff --git a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFileStorage.java b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFileStorage.java index e85b5d2e..01c92cb2 100644 --- a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFileStorage.java +++ b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFileStorage.java @@ -1,38 +1,47 @@ package keepass2android.javafilestorage; +import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; +import java.util.Locale; import keepass2android.javafilestorage.JavaFileStorageBase.InvalidPathException; +import keepass2android.javafilestorage.skydrive.SkyDriveException; +import keepass2android.javafilestorage.skydrive.SkyDriveFile; +import keepass2android.javafilestorage.skydrive.SkyDriveFolder; +import keepass2android.javafilestorage.skydrive.SkyDriveObject; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; -import com.google.api.services.drive.model.File; import com.microsoft.live.LiveAuthClient; import com.microsoft.live.LiveAuthException; import com.microsoft.live.LiveAuthListener; import com.microsoft.live.LiveConnectClient; import com.microsoft.live.LiveConnectSession; +import com.microsoft.live.LiveDownloadOperation; import com.microsoft.live.LiveOperation; import com.microsoft.live.LiveOperationException; import com.microsoft.live.LiveStatus; +import com.microsoft.live.OverwriteOption; import android.app.Activity; import android.content.Context; import android.content.Intent; +import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; - public class SkyDriveFileStorage extends JavaFileStorageBase { - + private LiveAuthClient mAuthClient; private LiveConnectSession mSession; @@ -40,294 +49,386 @@ public class SkyDriveFileStorage extends JavaFileStorageBase { private LiveConnectClient mConnectClient; private String mRootFolderId; - - private HashMap mFolderCache = new HashMap(); - - public static final String[] SCOPES = { - "wl.signin", - "wl.skydrive_update", - }; - + + private HashMap mFolderCache = new HashMap(); + + public static final String[] SCOPES = { "wl.signin", "wl.skydrive_update", }; + + // see http://stackoverflow.com/questions/17997688/howto-to-parse-skydrive-api-date-in-java + SimpleDateFormat SKYDRIVE_DATEFORMATTER = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.ENGLISH); + public final class JsonKeys { - public static final String CODE = "code"; - public static final String DATA = "data"; - public static final String DESCRIPTION = "description"; - public static final String ERROR = "error"; - public static final String EMAIL_HASHES = "email_hashes"; - public static final String FIRST_NAME = "first_name"; - public static final String GENDER = "gender"; - public static final String ID = "id"; - public static final String IS_FAVORITE = "is_favorite"; - public static final String IS_FRIEND = "is_friend"; - public static final String LAST_NAME = "last_name"; - public static final String LOCALE = "locale"; - public static final String LINK = "link"; - public static final String MESSAGE = "message"; - public static final String NAME = "name"; - public static final String UPDATED_TIME = "updated_time"; - public static final String USER_ID = "user_id"; - public static final String PERMISSIONS = "permissions"; - public static final String IS_DEFAULT = "is_default"; - public static final String FROM = "from"; - public static final String SUBSCRIPTION_LOCATION = "subscription_location"; - public static final String CREATED_TIME = "created_time"; - public static final String LOCATION = "location"; - public static final String TYPE = "type"; - public static final String PARENT_ID = "parent_id"; - public static final String SOURCE = "source"; + public static final String CODE = "code"; + public static final String DATA = "data"; + public static final String DESCRIPTION = "description"; + public static final String ERROR = "error"; + public static final String EMAIL_HASHES = "email_hashes"; + public static final String FIRST_NAME = "first_name"; + public static final String GENDER = "gender"; + public static final String ID = "id"; + public static final String IS_FAVORITE = "is_favorite"; + public static final String IS_FRIEND = "is_friend"; + public static final String LAST_NAME = "last_name"; + public static final String LOCALE = "locale"; + public static final String LINK = "link"; + public static final String MESSAGE = "message"; + public static final String NAME = "name"; + public static final String UPDATED_TIME = "updated_time"; + public static final String USER_ID = "user_id"; + public static final String PERMISSIONS = "permissions"; + public static final String IS_DEFAULT = "is_default"; + public static final String FROM = "from"; + public static final String SUBSCRIPTION_LOCATION = "subscription_location"; + public static final String CREATED_TIME = "created_time"; + public static final String LOCATION = "location"; + public static final String TYPE = "type"; + public static final String PARENT_ID = "parent_id"; + public static final String SOURCE = "source"; - private JsonKeys() { - throw new AssertionError(); - } - } - - - - - class SkyDrivePath - { - String mPath; - - public SkyDrivePath() - { + private JsonKeys() { + throw new AssertionError(); } - - public SkyDrivePath(String path) throws UnsupportedEncodingException, FileNotFoundException, InvalidPathException, LiveOperationException, SkyDriveException - { + } + + class SkyDrivePath { + String mPath; + + public SkyDrivePath() { + } + + public SkyDrivePath(String path) throws UnsupportedEncodingException, + FileNotFoundException, InvalidPathException, + LiveOperationException, SkyDriveException { setPath(path); } - - public SkyDrivePath(String parentPath, JSONObject fileToAppend) throws UnsupportedEncodingException, FileNotFoundException, IOException, InvalidPathException, JSONException, LiveOperationException, SkyDriveException - { + + public SkyDrivePath(String parentPath, JSONObject fileToAppend) + throws UnsupportedEncodingException, FileNotFoundException, + IOException, InvalidPathException, JSONException, + LiveOperationException, SkyDriveException { setPath(parentPath); if ((!mPath.endsWith("/")) && (!mPath.equals(""))) mPath = mPath + "/"; - mPath += encode(fileToAppend.getString("name"))+NAME_ID_SEP+encode(fileToAppend.getString("id")); + mPath += encode(fileToAppend.getString("name")) + NAME_ID_SEP + + encode(fileToAppend.getString("id")); } - public void setPath(String path) throws UnsupportedEncodingException, InvalidPathException, FileNotFoundException, LiveOperationException, SkyDriveException { + public void setPath(String path) throws UnsupportedEncodingException, + InvalidPathException, FileNotFoundException, + LiveOperationException, SkyDriveException { setPathWithoutVerify(path); verifyWithRetry(); } - - private void verifyWithRetry() throws FileNotFoundException, LiveOperationException, SkyDriveException, UnsupportedEncodingException { - try - { + private void verifyWithRetry() throws FileNotFoundException, + LiveOperationException, SkyDriveException, + UnsupportedEncodingException { + try { verify(); - } - catch (FileNotFoundException e) - { - initializeFoldersCache(); + } catch (FileNotFoundException e) { + initializeFoldersCache(); verify(); } } - - public void setPathWithoutVerify(String path) throws UnsupportedEncodingException, InvalidPathException - { + public void setPathWithoutVerify(String path) + throws UnsupportedEncodingException, InvalidPathException { mPath = path.substring(getProtocolPrefix().length()); - //Log.d(TAG, " mAccount=" + mAccount); - //Log.d(TAG, " mAccountLocalPath=" + mAccountLocalPath); + // Log.d(TAG, " mAccount=" + mAccount); + // Log.d(TAG, " mAccountLocalPath=" + mAccountLocalPath); } - - - //make sure the path exists - private void verify() throws FileNotFoundException, UnsupportedEncodingException { - + + // make sure the path exists + private void verify() throws FileNotFoundException, + UnsupportedEncodingException { + if (mPath.equals("")) return; - + String[] parts = mPath.split("/"); - + String parentId = mRootFolderId; - - for (int i=0;i > task = new AsyncTask>() { - LiveOperation operation = mConnectClient.get(skyDrivePath.getSkyDriveId()); - JSONObject result = operation.getResult(); + + @Override + protected AsyncTaskResult doInBackground(Object... arg0) { + try { + initializeFoldersCache(); + if (setupAct.getProcessName().equals(PROCESS_NAME_SELECTFILE)) + setupAct.getState().putString(EXTRA_PATH, getProtocolPrefix()); + return new AsyncTaskResult("ok"); + } catch ( Exception anyError) { + return new AsyncTaskResult(anyError); + } + } + + @Override + protected void onPostExecute(AsyncTaskResult result) { + Exception error = result.getError(); + if (error != null ) { + finishWithError(activity, error); + } else if ( isCancelled()) { + activity.setResult(Activity.RESULT_CANCELED); + activity.finish(); + } else { + //all right! + finishActivityWithSuccess(setupAct); + } + } + }; + + task.execute(new Object[]{}); + + } + + + + private void initializeFoldersCache() throws LiveOperationException, + SkyDriveException, FileNotFoundException { + + //use alias for now (overwritten later): + mRootFolderId = "me/skydrive"; + + LiveOperation operation = mConnectClient.get(mRootFolderId + "/files"); + + JSONObject result = operation.getResult(); + checkResult(result); + + mFolderCache.clear(); + + JSONArray data = result.optJSONArray(JsonKeys.DATA); + for (int i = 0; i < data.length(); i++) { + SkyDriveObject skyDriveObj = SkyDriveObject.create(data + .optJSONObject(i)); + if (skyDriveObj == null) + continue; // ignored type + Log.d(TAG, "adding "+skyDriveObj.getName()+" to cache with id " + skyDriveObj.getId()+" in "+skyDriveObj.getParentId()); + mFolderCache.put(skyDriveObj.getId(), skyDriveObj); + + mRootFolderId = skyDriveObj.getParentId(); + } + + //check if we received anything. If not: query the root folder directly + if (data.length() == 0) + { + operation = mConnectClient.get(mRootFolderId); + result = operation.getResult(); checkResult(result); - SkyDriveObject obj = SkyDriveObject.create(result); - if (obj != null) - { + mRootFolderId = SkyDriveObject.create(result).getId(); + + } + } + + private void checkResult(JSONObject result) throws SkyDriveException, FileNotFoundException { + if (result.has(JsonKeys.ERROR)) { + JSONObject error = result.optJSONObject(JsonKeys.ERROR); + String message = error.optString(JsonKeys.MESSAGE); + String code = error.optString(JsonKeys.CODE); + Log.d(TAG, "Code: "+code); + if ("resource_not_found".equals(code)) + throw new FileNotFoundException(message); + else + throw new SkyDriveException(message, code); + } + } + + private SkyDriveObject tryAddFileToCache(SkyDrivePath skyDrivePath) { + try { + SkyDriveObject obj = getSkyDriveObject(skyDrivePath); + if (obj != null) { mFolderCache.put(obj.getId(), obj); } return obj; - } - catch (Exception e) - { + } catch (Exception e) { return null; } - + + } + + private SkyDriveObject getSkyDriveObject(SkyDrivePath skyDrivePath) + throws LiveOperationException, InvalidPathException, + UnsupportedEncodingException, SkyDriveException, FileNotFoundException { + LiveOperation operation = mConnectClient.get(skyDrivePath + .getSkyDriveId()); + JSONObject result = operation.getResult(); + checkResult(result); + SkyDriveObject obj = SkyDriveObject.create(result); + return obj; } @Override public boolean requiresSetup(String path) { - //always go through the setup process: + // always go through the setup process: return true; } @@ -335,15 +436,18 @@ public class SkyDriveFileStorage extends JavaFileStorageBase { public void startSelectFile(FileStorageSetupInitiatorActivity activity, boolean isForSave, int requestCode) { - ((JavaFileStorage.FileStorageSetupInitiatorActivity)(activity)).startSelectFileProcess(getProtocolId()+"://", isForSave, requestCode); - + ((JavaFileStorage.FileStorageSetupInitiatorActivity) (activity)) + .startSelectFileProcess(getProtocolId() + "://", isForSave, + requestCode); + } @Override public void prepareFileUsage(FileStorageSetupInitiatorActivity activity, String path, int requestCode) { - ((JavaFileStorage.FileStorageSetupInitiatorActivity)(activity)).startFileUsageProcess(path, requestCode); - + ((JavaFileStorage.FileStorageSetupInitiatorActivity) (activity)) + .startFileUsageProcess(path, requestCode); + } @Override @@ -353,133 +457,277 @@ public class SkyDriveFileStorage extends JavaFileStorageBase { @Override public String getDisplayName(String path) { - + return ""; /* - SkyDrivePath skydrivePath = new SkyDrivePath(); - try { - skydrivePath.setPathWithoutVerify(path); - } catch (Exception e) { - e.printStackTrace(); - return path; - } - return skydrivePath.getDisplayName();*/ + * SkyDrivePath skydrivePath = new SkyDrivePath(); try { + * skydrivePath.setPathWithoutVerify(path); } catch (Exception e) { + * e.printStackTrace(); return path; } return + * skydrivePath.getDisplayName(); + */ } @Override public boolean checkForFileChangeFast(String path, String previousFileVersion) throws Exception { - // TODO Auto-generated method stub - return false; + + String currentVersion = getCurrentFileVersionFast(path); + if (currentVersion == null) + return false; + return currentVersion.equals(previousFileVersion) == false; } @Override public String getCurrentFileVersionFast(String path) { - // TODO Auto-generated method stub - return null; + try + { + SkyDrivePath drivePath = new SkyDrivePath(path); + SkyDriveObject obj = getSkyDriveObject(drivePath); + if (obj == null) + return null; + return obj.getUpdatedTime(); + } + catch (Exception e) + { + Log.w(TAG,"Error getting file version:"); + e.printStackTrace(); + return null; + } + } @Override public InputStream openFileForRead(String path) throws Exception { - // TODO Auto-generated method stub - return null; - } + try + { + LiveDownloadOperation op = mConnectClient.download(new SkyDrivePath(path).getSkyDriveId()+"/content"); + return op.getStream(); + } + catch (Exception e) + { + throw convertException(e); + } + } @Override public void uploadFile(String path, byte[] data, boolean writeTransactional) throws Exception { - // TODO Auto-generated method stub - + + try + { + SkyDrivePath driveTargetPath = new SkyDrivePath(path); + SkyDrivePath driveUploadPath = driveTargetPath; + SkyDrivePath driveTempPath = null; + ByteArrayInputStream bis = new ByteArrayInputStream(data); + + //if writeTransactional, upload the file to a temp destination. + //this is a somewhat ugly way because it requires two uploads, but renaming/copying doesn't work + //nicely in SkyDrive, and SkyDrive doesn't provide file histories by itself, so we need to make sure + //no file gets corrupt if upload is canceled. + if (writeTransactional) + { + LiveOperation uploadOp = uploadFile(driveUploadPath.getParentPath(), driveUploadPath.getFilename()+".tmp", bis); + driveTempPath = new SkyDrivePath(driveUploadPath.getParentPath().getFullPath(), uploadOp.getResult()); + //recreate ByteArrayInputStream for use in uploadFile below + bis = new ByteArrayInputStream(data); + } + + //upload the file + uploadFile(driveUploadPath.getParentPath(), driveUploadPath.getFilename(), bis); + + if (writeTransactional) + { + //delete old file + mConnectClient.delete(driveTempPath.getSkyDriveId()); + // don't check result. If delete fails -> not a big deal + } + + } + catch (Exception e) + { + throw convertException(e); + } + + } + + private LiveOperation uploadFile(SkyDrivePath parentPath, String filename, ByteArrayInputStream bis) + throws LiveOperationException, InvalidPathException, + UnsupportedEncodingException, FileNotFoundException, + SkyDriveException { + LiveOperation op = mConnectClient.upload(parentPath.getSkyDriveId(), filename, bis, OverwriteOption.Overwrite); + checkResult(op.getResult()); + return op; } @Override public String createFolder(String parentPath, String newDirName) throws Exception { - - try - { + + try { SkyDrivePath skyDriveParentPath = new SkyDrivePath(parentPath); + String parentId = skyDriveParentPath.getSkyDriveId(); + JSONObject newFolder = new JSONObject(); newFolder.put("name", newDirName); - - LiveOperation operation = mConnectClient.put(skyDriveParentPath.getSkyDriveId(), newFolder); + newFolder.put("description", "folder"); + + LiveOperation operation = mConnectClient.post( + parentId, newFolder); JSONObject result = operation.getResult(); checkResult(result); return new SkyDrivePath(parentPath, result).getFullPath(); - } - catch(Exception e) - { + } catch (Exception e) { throw convertException(e); } - + } private Exception convertException(Exception e) throws Exception { - + e.printStackTrace(); - + Log.w(TAG, e); - + throw e; } @Override public String createFilePath(String parentPath, String newFileName) throws Exception { - // TODO Auto-generated method stub - return null; + try { + SkyDrivePath skyDriveParentPath = new SkyDrivePath(parentPath); + + LiveOperation op = uploadFile(skyDriveParentPath, newFileName, new ByteArrayInputStream(new byte[0])); + checkResult(op.getResult()); + + return new SkyDrivePath(parentPath, op.getResult()).getFullPath(); + } catch (Exception e) { + throw convertException(e); + } } @Override public List listFiles(String parentPath) throws Exception { - // TODO Auto-generated method stub - return null; + + try + { + SkyDrivePath parentDrivePath = new SkyDrivePath(parentPath); + LiveOperation operation = mConnectClient.get(parentDrivePath.getSkyDriveId() + "/files"); + + JSONObject result = operation.getResult(); + checkResult(result); + + JSONArray data = result.optJSONArray(JsonKeys.DATA); + List resultList = new ArrayList(data.length()); + + for (int i = 0; i < data.length(); i++) { + SkyDriveObject skyDriveObj = SkyDriveObject.create(data + .optJSONObject(i)); + if (skyDriveObj == null) + continue; // ignored type + Log.d(TAG, "listing "+skyDriveObj.getName()+" with id " + skyDriveObj.getId()+" in "+skyDriveObj.getParentId()); + + resultList.add(convertToFileEntry(parentDrivePath, skyDriveObj)); + } + return resultList; + } + catch (Exception e) + { + throw convertException(e); + } + } + + private FileEntry convertToFileEntry(SkyDrivePath parentPath, SkyDriveObject skyDriveObj) throws UnsupportedEncodingException, FileNotFoundException, IOException, InvalidPathException, JSONException, LiveOperationException, SkyDriveException { + + FileEntry res = new FileEntry(); + res.canRead = true; + res.canWrite = true; + res.displayName = skyDriveObj.getName(); + res.isDirectory = SkyDriveFolder.class.isAssignableFrom(skyDriveObj.getClass()); + + try + { + res.lastModifiedTime = SKYDRIVE_DATEFORMATTER.parse(skyDriveObj.getUpdatedTime()).getTime(); + } + catch (Exception e) + { + Log.w(TAG, "Cannot parse time " + skyDriveObj.getUpdatedTime()); + res.lastModifiedTime = -1; + } + if (parentPath == null) //this is the case if we're listing the parent path itself + res.path = getProtocolPrefix(); + else + res.path = new SkyDrivePath(parentPath.getFullPath(), skyDriveObj.toJson()).getFullPath(); + Log.d(TAG, "path: "+res.path); + if (SkyDriveFile.class.isAssignableFrom(skyDriveObj.getClass())) + { + res.sizeInBytes = ((SkyDriveFile)skyDriveObj).getSize(); + } + + return res; } @Override public FileEntry getFileEntry(String filename) throws Exception { - // TODO Auto-generated method stub - return null; + try + { + SkyDrivePath drivePath = new SkyDrivePath(filename); + Log.d(TAG, "getFileEntry for "+ filename +" = "+drivePath.getFullPath()); + Log.d(TAG, " parent is "+drivePath.getParentPath()); + return convertToFileEntry(drivePath.getParentPath(),getSkyDriveObject(drivePath)); + } + catch (Exception e) + { + throw convertException(e); + } + } @Override public void delete(String path) throws Exception { - // TODO Auto-generated method stub + try + { + SkyDrivePath drivePath = new SkyDrivePath(path); + LiveOperation op = mConnectClient.delete(drivePath.getSkyDriveId()); + checkResult(op.getResult()); + } + catch (Exception e) + { + throw convertException(e); + } + } @Override public void onCreate(FileStorageSetupActivity activity, Bundle savedInstanceState) { - - + } @Override public void onResume(FileStorageSetupActivity activity) { - - + } - - private void finishWithError(final Activity activity, - Exception error) { - Log.e("KP2AJ", "Exception: "+error.toString()); + + private void finishWithError(final Activity activity, Exception error) { + Log.e("KP2AJ", "Exception: " + error.toString()); error.printStackTrace(); - + Intent retData = new Intent(); retData.putExtra(EXTRA_ERROR_MESSAGE, error.getMessage()); activity.setResult(Activity.RESULT_CANCELED, retData); activity.finish(); }; - - private void finishActivityWithSuccess(FileStorageSetupActivity setupActivity) { + private void finishActivityWithSuccess( + FileStorageSetupActivity setupActivity) { Log.d("KP2AJ", "Success with authenticating!"); - Activity activity = (Activity)setupActivity; + Activity activity = (Activity) setupActivity; - if (setupActivity.getProcessName().equals(PROCESS_NAME_FILE_USAGE_SETUP)) - { + if (setupActivity.getProcessName() + .equals(PROCESS_NAME_FILE_USAGE_SETUP)) { Intent data = new Intent(); data.putExtra(EXTRA_IS_FOR_SAVE, setupActivity.isForSave()); data.putExtra(EXTRA_PATH, setupActivity.getPath()); @@ -487,8 +735,7 @@ public class SkyDriveFileStorage extends JavaFileStorageBase { activity.finish(); return; } - if (setupActivity.getProcessName().equals(PROCESS_NAME_SELECTFILE)) - { + if (setupActivity.getProcessName().equals(PROCESS_NAME_SELECTFILE)) { Intent data = new Intent(); String path = setupActivity.getState().getString(EXTRA_PATH); @@ -497,49 +744,40 @@ public class SkyDriveFileStorage extends JavaFileStorageBase { activity.setResult(RESULT_FILECHOOSER_PREPARED, data); activity.finish(); return; - } + } Log.w("KP2AJ", "Unknown process: " + setupActivity.getProcessName()); - } - @Override public void onStart(final FileStorageSetupActivity activity) { - mAuthClient.initialize(Arrays.asList(SCOPES), new LiveAuthListener() { - @Override - public void onAuthError(LiveAuthException exception, Object userState) { - finishWithError( ((Activity)activity), exception); - } + mAuthClient.initialize(Arrays.asList(SCOPES), new LiveAuthListener() { + @Override + public void onAuthError(LiveAuthException exception, + Object userState) { + finishWithError(((Activity) activity), exception); + } + + @Override + public void onAuthComplete(LiveStatus status, + LiveConnectSession session, Object userState) { + + if (status == LiveStatus.CONNECTED) { + initialize(activity, session); + + } else { + login(activity); + } + } + }); - @Override - public void onAuthComplete(LiveStatus status, - LiveConnectSession session, - Object userState) { - - if (status == LiveStatus.CONNECTED) { - try - { - initializeSession(session); - finishActivityWithSuccess(activity); - } - catch (Exception e) - { - finishWithError((Activity)activity, e); - } - } else { - login(activity); - } - } - }); - } @Override public void onActivityResult(FileStorageSetupActivity activity, int requestCode, int resultCode, Intent data) { - + } } diff --git a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveException.java b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveException.java similarity index 85% rename from src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveException.java rename to src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveException.java index b6e2334c..adfe464f 100644 --- a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveException.java +++ b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveException.java @@ -1,4 +1,4 @@ -package keepass2android.javafilestorage; +package keepass2android.javafilestorage.skydrive; public class SkyDriveException extends Exception { diff --git a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFile.java b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveFile.java similarity index 92% rename from src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFile.java rename to src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveFile.java index ed56bb4a..c9bd2fc8 100644 --- a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFile.java +++ b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveFile.java @@ -1,4 +1,5 @@ -package keepass2android.javafilestorage; +package keepass2android.javafilestorage.skydrive; + import org.json.JSONObject; diff --git a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFolder.java b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveFolder.java similarity index 85% rename from src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFolder.java rename to src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveFolder.java index 26bc2b8c..a352196d 100644 --- a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveFolder.java +++ b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveFolder.java @@ -1,4 +1,4 @@ -package keepass2android.javafilestorage; +package keepass2android.javafilestorage.skydrive; import org.json.JSONObject; diff --git a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveObject.java b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveObject.java similarity index 98% rename from src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveObject.java rename to src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveObject.java index 4ec9f813..f8584944 100644 --- a/src/java/JavaFileStorage/src/keepass2android/javafilestorage/SkyDriveObject.java +++ b/src/java/JavaFileStorage/src/keepass2android/javafilestorage/skydrive/SkyDriveObject.java @@ -1,4 +1,5 @@ -package keepass2android.javafilestorage; +package keepass2android.javafilestorage.skydrive; + import org.json.JSONObject;