Reformat code

pull/699/head
Alex Baker 6 years ago
parent bb44afbb7d
commit b356f4cbe3

@ -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

@ -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;

@ -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);

@ -70,9 +70,9 @@ public class DateUtilities {
return currentTimeMillis();
}
/* ======================================================================
* =========================================================== formatters
* ====================================================================== */
/* ======================================================================
* =========================================================== formatters
* ====================================================================== */
/**
* Returns unixtime one month from now

@ -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 {

@ -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);

@ -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<Task> tasks) {
for (Task task : tasks) {

@ -217,9 +217,9 @@ public class FilterAdapter extends ArrayAdapter<FilterListItem> {
addSubMenu(activity.getResources().getString(titleResource), filters, hideIfEmpty);
}
/* ======================================================================
* ============================================================= receiver
* ====================================================================== */
/* ======================================================================
* ============================================================= receiver
* ====================================================================== */
private void addSubMenu(String title, List<Filter> filters, boolean hideIfEmpty) {
if (hideIfEmpty && filters.isEmpty()) {
@ -371,9 +371,9 @@ public class FilterAdapter extends ArrayAdapter<FilterListItem> {
viewHolder.name.setText(filter.listingTitle);
}
/* ======================================================================
* ================================================================ views
* ====================================================================== */
/* ======================================================================
* ================================================================ views
* ====================================================================== */
public static class ViewHolder {

@ -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 {

@ -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())) {

@ -51,11 +51,6 @@ public class GeofenceService {
return changed;
}
public interface SynchronizeGeofenceCallback {
void beforeDelete(Location location);
}
private boolean synchronizeMetadata(long taskId, List<Location> locations,
final SynchronizeGeofenceCallback callback) {
boolean dirty = false;
@ -99,4 +94,9 @@ public class GeofenceService {
private List<Location> getGeofencesForTask(long taskId) {
return locationDao.getActiveGeofences(taskId);
}
public interface SynchronizeGeofenceCallback {
void beforeDelete(Location location);
}
}

Loading…
Cancel
Save