diff --git a/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksMovingTest.java b/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksMovingTest.java index 2cbe47320..e7f90cc5f 100644 --- a/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksMovingTest.java +++ b/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksMovingTest.java @@ -55,15 +55,15 @@ public class SubtasksMovingTest extends SubtasksTestCase { updater.moveTo(null, filter, target.getUuid(), beforeId); } - /* Starting State (see SubtasksTestCase): - * - * A - * B - * C - * D - * E - * F - */ + /* Starting State (see SubtasksTestCase): + * + * A + * B + * C + * D + * E + * F + */ @Ignore @Test diff --git a/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksTestCase.java b/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksTestCase.java index 4b9828344..b79a7f663 100644 --- a/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksTestCase.java +++ b/app/src/androidTest/java/com/todoroo/astrid/subtasks/SubtasksTestCase.java @@ -23,14 +23,14 @@ import org.tasks.preferences.Preferences; public class SubtasksTestCase extends InjectingTestCase { /* Starting State: - * - * A - * B - * C - * D - * E - * F - */ + * + * A + * B + * C + * D + * E + * F + */ public static final String DEFAULT_SERIALIZED_TREE = "[-1, [1, 2, [3, 4]], 5, 6]" .replaceAll("\\s", ""); protected SubtasksFilterUpdater updater; diff --git a/app/src/androidTestGoogleplay/java/com/todoroo/astrid/gtasks/GtasksTaskMovingTest.java b/app/src/androidTestGoogleplay/java/com/todoroo/astrid/gtasks/GtasksTaskMovingTest.java index 5244b8c67..dc14a5545 100644 --- a/app/src/androidTestGoogleplay/java/com/todoroo/astrid/gtasks/GtasksTaskMovingTest.java +++ b/app/src/androidTestGoogleplay/java/com/todoroo/astrid/gtasks/GtasksTaskMovingTest.java @@ -38,15 +38,15 @@ public class GtasksTaskMovingTest extends InjectingTestCase { private Task A, B, C, D, E, F; private GoogleTaskList list; - /* Starting State: - * - * A - * B - * C - * D - * E - * F - */ + /* Starting State: + * + * A + * B + * C + * D + * E + * F + */ @Test public void testMoveDownFromListBottom() { @@ -84,12 +84,12 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(C, B); - /* - * A - * C - * D - * B - */ + /* + * A + * C + * D + * B + */ thenExpectMetadataOrderAndIndent(A, 0, 0); thenExpectMetadataOrderAndIndent(B, 3, 1); @@ -103,13 +103,13 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(B, E); - /* - * A - * C - * D - * B - * E - */ + /* + * A + * C + * D + * B + * E + */ thenExpectMetadataOrderAndIndent(A, 0, 0); thenExpectMetadataOrderAndIndent(B, 3, 0); @@ -123,14 +123,14 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(B, A); - /* - * B - * A - * C - * D - * E - * F - */ + /* + * B + * A + * C + * D + * E + * F + */ thenExpectMetadataOrderAndIndent(A, 1, 0); thenExpectMetadataOrderAndIndent(B, 0, 0); @@ -143,14 +143,14 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(C, F); - /* - * A - * B - * E - * C - * D - * F - */ + /* + * A + * B + * E + * C + * D + * F + */ thenExpectMetadataOrderAndIndent(A, 0, 0); thenExpectMetadataOrderAndIndent(B, 1, 1); @@ -165,13 +165,13 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(D, F); - /* - * A - * B - * C - * E - * D - */ + /* + * A + * B + * C + * E + * D + */ thenExpectMetadataOrderAndIndent(A, 0, 0); thenExpectMetadataOrderAndIndent(B, 1, 1); @@ -186,12 +186,12 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(C, A); - /* - * C - * D - * A - * B - */ + /* + * C + * D + * A + * B + */ thenExpectMetadataOrderAndIndent(A, 2, 0); thenExpectMetadataOrderAndIndent(B, 3, 1); @@ -205,13 +205,13 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(F, D); - /* - * A - * B - * C - * F - * D - */ + /* + * A + * B + * C + * F + * D + */ thenExpectMetadataOrderAndIndent(A, 0, 0); thenExpectMetadataOrderAndIndent(B, 1, 1); @@ -227,13 +227,13 @@ public class GtasksTaskMovingTest extends InjectingTestCase { whenTriggerMove(B, F); - /* - * A - * C - * D - * E - * B - */ + /* + * A + * C + * D + * E + * B + */ thenExpectMetadataOrderAndIndent(A, 0, 0); thenExpectMetadataOrderAndIndent(B, 4, 0); diff --git a/app/src/main/java/com/todoroo/andlib/utility/DateUtilities.java b/app/src/main/java/com/todoroo/andlib/utility/DateUtilities.java index d7b5cd077..f6264bc56 100644 --- a/app/src/main/java/com/todoroo/andlib/utility/DateUtilities.java +++ b/app/src/main/java/com/todoroo/andlib/utility/DateUtilities.java @@ -70,9 +70,9 @@ public class DateUtilities { return currentTimeMillis(); } - /* ====================================================================== - * =========================================================== formatters - * ====================================================================== */ + /* ====================================================================== + * =========================================================== formatters + * ====================================================================== */ /** * Returns unixtime one month from now diff --git a/app/src/main/java/com/todoroo/astrid/activity/ShareLinkActivity.java b/app/src/main/java/com/todoroo/astrid/activity/ShareLinkActivity.java index fa3eb490b..919267164 100644 --- a/app/src/main/java/com/todoroo/astrid/activity/ShareLinkActivity.java +++ b/app/src/main/java/com/todoroo/astrid/activity/ShareLinkActivity.java @@ -18,7 +18,7 @@ import org.tasks.injection.InjectingAppCompatActivity; /** * @author joshuagross * - * Create a new task based on incoming links from the "share" menu + * Create a new task based on incoming links from the "share" menu */ public final class ShareLinkActivity extends InjectingAppCompatActivity { diff --git a/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java b/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java index 5e810d652..321df8d48 100755 --- a/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java @@ -212,11 +212,11 @@ public final class TaskEditFragment extends InjectingFragment implements } } - /* - * ====================================================================== - * =============================================== model reading / saving - * ====================================================================== - */ + /* + * ====================================================================== + * =============================================== model reading / saving + * ====================================================================== + */ private EditTitleControlSet getEditTitleControlSet() { return getFragment(EditTitleControlSet.TAG); @@ -252,11 +252,11 @@ public final class TaskEditFragment extends InjectingFragment implements return false; } - /* - * ====================================================================== - * ======================================================= event handlers - * ====================================================================== - */ + /* + * ====================================================================== + * ======================================================= event handlers + * ====================================================================== + */ public void discardButtonClick() { if (hasChanges( @@ -293,11 +293,11 @@ public final class TaskEditFragment extends InjectingFragment implements getEditTitleControlSet().setPriority(priority); } - /* - * ====================================================================== - * ========================================== UI component helper classes - * ====================================================================== - */ + /* + * ====================================================================== + * ========================================== UI component helper classes + * ====================================================================== + */ public void onRepeatChanged(boolean repeat) { getEditTitleControlSet().repeatChanged(repeat); diff --git a/app/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java b/app/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java index 70facd152..4e8001744 100644 --- a/app/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java +++ b/app/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java @@ -394,11 +394,11 @@ public class TaskListFragment extends InjectingFragment implements setSyncOngoing(gtasksPreferenceService.isOngoing()); } - /* - * ====================================================================== - * =================================================== managing list view - * ====================================================================== - */ + /* + * ====================================================================== + * =================================================== managing list view + * ====================================================================== + */ public void loadTaskListContent() { loadTaskListContent(true); @@ -447,11 +447,11 @@ public class TaskListFragment extends InjectingFragment implements public void onTaskCreated(String uuid) { } - /* - * ====================================================================== - * ============================================================== actions - * ====================================================================== - */ + /* + * ====================================================================== + * ============================================================== actions + * ====================================================================== + */ public void onTaskDelete(List tasks) { for (Task task : tasks) { diff --git a/app/src/main/java/com/todoroo/astrid/adapter/FilterAdapter.java b/app/src/main/java/com/todoroo/astrid/adapter/FilterAdapter.java index 774288c76..ff1ed2115 100644 --- a/app/src/main/java/com/todoroo/astrid/adapter/FilterAdapter.java +++ b/app/src/main/java/com/todoroo/astrid/adapter/FilterAdapter.java @@ -217,9 +217,9 @@ public class FilterAdapter extends ArrayAdapter { addSubMenu(activity.getResources().getString(titleResource), filters, hideIfEmpty); } - /* ====================================================================== - * ============================================================= receiver - * ====================================================================== */ + /* ====================================================================== + * ============================================================= receiver + * ====================================================================== */ private void addSubMenu(String title, List filters, boolean hideIfEmpty) { if (hideIfEmpty && filters.isEmpty()) { @@ -371,9 +371,9 @@ public class FilterAdapter extends ArrayAdapter { viewHolder.name.setText(filter.listingTitle); } - /* ====================================================================== - * ================================================================ views - * ====================================================================== */ + /* ====================================================================== + * ================================================================ views + * ====================================================================== */ public static class ViewHolder { diff --git a/app/src/main/java/com/todoroo/astrid/ui/NumberPicker.java b/app/src/main/java/com/todoroo/astrid/ui/NumberPicker.java index 4c45a5687..64c4d9c7a 100644 --- a/app/src/main/java/com/todoroo/astrid/ui/NumberPicker.java +++ b/app/src/main/java/com/todoroo/astrid/ui/NumberPicker.java @@ -160,10 +160,10 @@ public class NumberPicker extends LinearLayout implements OnClickListener, @Override public void onClick(View v) { - /* - * The text view may still have focus so clear it's focus which will - * trigger the on focus changed and any typed values to be pulled. - */ + /* + * The text view may still have focus so clear it's focus which will + * trigger the on focus changed and any typed values to be pulled. + */ mText.clearFocus(); // now perform the increment/decrement @@ -203,11 +203,11 @@ public class NumberPicker extends LinearLayout implements OnClickListener, private void updateView() { - /* - * If we don't have displayed values then use the current number else - * find the correct value in the displayed values for the current - * number. - */ + /* + * If we don't have displayed values then use the current number else + * find the correct value in the displayed values for the current + * number. + */ mText.setText(formatNumber(mCurrent)); } @@ -227,9 +227,9 @@ public class NumberPicker extends LinearLayout implements OnClickListener, @Override public void onFocusChange(View v, boolean hasFocus) { - /* - * When focus is lost check that the text field has valid values. - */ + /* + * When focus is lost check that the text field has valid values. + */ if (!hasFocus && v instanceof TextView) { String str = String.valueOf(((TextView) v).getText()); if ("".equals(str)) { @@ -251,10 +251,10 @@ public class NumberPicker extends LinearLayout implements OnClickListener, @Override public boolean onLongClick(View v) { - /* - * The text view may still have focus so clear it's focus which will - * trigger the on focus changed and any typed values to be pulled. - */ + /* + * The text view may still have focus so clear it's focus which will + * trigger the on focus changed and any typed values to be pulled. + */ mText.clearFocus(); if (R.id.increment == v.getId()) { @@ -351,11 +351,11 @@ public class NumberPicker extends LinearLayout implements OnClickListener, int val = getSelectedPos(result); - /* - * Ensure the user can't type in a value greater than the max - * allowed. We have to allow less than min as the user might want to - * delete some numbers and then type a new number. - */ + /* + * Ensure the user can't type in a value greater than the max + * allowed. We have to allow less than min as the user might want to + * delete some numbers and then type a new number. + */ if (val > mEnd) { return ""; } else { diff --git a/app/src/main/java/org/tasks/locale/receiver/FireReceiver.java b/app/src/main/java/org/tasks/locale/receiver/FireReceiver.java index 81d79c499..af8a58047 100755 --- a/app/src/main/java/org/tasks/locale/receiver/FireReceiver.java +++ b/app/src/main/java/org/tasks/locale/receiver/FireReceiver.java @@ -14,11 +14,11 @@ public final class FireReceiver extends BroadcastReceiver { public final void onReceive(final Context context, final Intent intent) { Timber.d("Received %s", intent); //$NON-NLS-1$ - /* - * Note: It is OK if a host sends an ordered broadcast for plug-in - * settings. Such a behavior would allow the host to optionally block until the - * plug-in setting finishes. - */ + /* + * Note: It is OK if a host sends an ordered broadcast for plug-in + * settings. Such a behavior would allow the host to optionally block until the + * plug-in setting finishes. + */ if (!com.twofortyfouram.locale.api.Intent.ACTION_FIRE_SETTING.equals(intent.getAction())) { Timber.e("Intent action is not %s", @@ -26,14 +26,14 @@ public final class FireReceiver extends BroadcastReceiver { return; } - /* - * Ignore implicit intents, because they are not valid. It would be - * meaningless if ALL plug-in setting BroadcastReceivers installed were - * asked to handle queries not intended for them. Ideally this - * implementation here would also explicitly assert the class name as - * well, but then the unit tests would have trouble. In the end, - * asserting the package is probably good enough. - */ + /* + * Ignore implicit intents, because they are not valid. It would be + * meaningless if ALL plug-in setting BroadcastReceivers installed were + * asked to handle queries not intended for them. Ideally this + * implementation here would also explicitly assert the class name as + * well, but then the unit tests would have trouble. In the end, + * asserting the package is probably good enough. + */ if (!context.getPackageName().equals(intent.getPackage()) && !new ComponentName(context, this.getClass().getName()).equals(intent .getComponent())) { diff --git a/app/src/main/java/org/tasks/location/GeofenceService.java b/app/src/main/java/org/tasks/location/GeofenceService.java index 8cc8a277d..fc380ee57 100644 --- a/app/src/main/java/org/tasks/location/GeofenceService.java +++ b/app/src/main/java/org/tasks/location/GeofenceService.java @@ -51,11 +51,6 @@ public class GeofenceService { return changed; } - public interface SynchronizeGeofenceCallback { - - void beforeDelete(Location location); - } - private boolean synchronizeMetadata(long taskId, List locations, final SynchronizeGeofenceCallback callback) { boolean dirty = false; @@ -99,4 +94,9 @@ public class GeofenceService { private List getGeofencesForTask(long taskId) { return locationDao.getActiveGeofences(taskId); } + + public interface SynchronizeGeofenceCallback { + + void beforeDelete(Location location); + } }