Removed some dead code

pull/14/head
Sam Bosley 12 years ago
parent 5409912b0d
commit 846968cc2a

@ -1,21 +0,0 @@
/**
* Copyright (c) 2012 Todoroo Inc
*
* See the file "LICENSE" for the full license governing this code.
*/
package com.todoroo.astrid.data;
/**
* Data access object for accessing Astrid's {@link Update} table.
*
* @author Andrey Marchenko <igendou@gmail.com>
*
*/
//public class UpdateApiDao extends ContentResolverDao<Update>{
//
// public UpdateApiDao(Context context) {
// super(Update.class, context, Update.CONTENT_URI);
// }
//
//}

@ -123,7 +123,10 @@ public class AstridNewSyncMigrator {
}
});
// TODO: Migrate updates here, somehow
// ----------
// Migrate unsynced task comments to UserActivity table
// ----------
TodorooCursor<Update> updates = updateDao.query(Query.select(Update.PROPERTIES).where(
Criterion.and(Criterion.or(Update.UUID.eq(0), Update.UUID.isNull()), Criterion.or(Update.ACTION_CODE.eq(UserActivity.ACTION_TAG_COMMENT),
Update.ACTION_CODE.eq(UserActivity.ACTION_TASK_COMMENT)))));

@ -256,7 +256,6 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
Linkify.addLinks(notes, Linkify.ALL);
}
Activity activity = fragment.getActivity();
if (activity != null) {
Bitmap bitmap = activity.getIntent().getParcelableExtra(TaskEditFragment.TOKEN_PICTURE_IN_PROGRESS);
if (bitmap != null) {
@ -457,36 +456,15 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
userActivity.setValue(UserActivity.TARGET_ID, task.getUuid());
userActivity.setValue(UserActivity.TARGET_NAME, task.getValue(Task.TITLE));
userActivity.setValue(UserActivity.CREATED_AT, DateUtilities.now());
if (usePicture && pendingCommentPicture != null) {
userActivity.setValue(UserActivity.PICTURE, RemoteModel.PictureHelper.uploadPictureJson(pendingCommentPicture).toString());
}
// TODO: Fix picture uploading
// if (usePicture && pendingCommentPicture != null) {
// update.setValue(Update.PICTURE, Update.PICTURE_LOADING);
// try {
// String updateString = ImageDiskCache.getPictureHash(update);
// imageCache.put(updateString, pendingCommentPicture);
// update.setValue(Update.PICTURE, updateString);
// }
// catch (Exception e) {
// Log.e("EditNoteActivity", "Failed to put image to disk...");
// }
// }
// update.putTransitory(SyncFlags.ACTFM_SUPPRESS_SYNC, true);
userActivityDao.createNew(userActivity);
//
// final long updateId = userActivity.getId();
// final Bitmap tempPicture = usePicture ? pendingCommentPicture : null;
// new Thread() {
// @Override
// public void run() {
// actFmSyncService.pushUpdate(updateId, tempPicture);
//
// }
// }.start();
commentField.setText(""); //$NON-NLS-1$
pendingCommentPicture = usePicture ? null : pendingCommentPicture;
if (usePicture) {
Activity activity = fragment.getActivity();
if (activity != null)
activity.getIntent().removeExtra(TaskEditFragment.TOKEN_PICTURE_IN_PROGRESS);
}
@ -582,7 +560,6 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
CameraResultCallback callback = new CameraResultCallback() {
@Override
public void handleCameraResult(Bitmap bitmap) {
Activity activity = fragment.getActivity();
if (activity != null) {
activity.getIntent().putExtra(TaskEditFragment.TOKEN_PICTURE_IN_PROGRESS, bitmap);
}

Loading…
Cancel
Save