Apply inspections

pull/189/head
Alex Baker 10 years ago
parent 5944a087fc
commit 1274f69d38

@ -5,8 +5,6 @@
*/
package com.todoroo.astrid.api;
import android.content.Intent;
/**
* Constants for interfacing with Astrid.
*

@ -35,9 +35,6 @@ abstract public class RemoteModel extends AbstractModel {
/** remote id property */
public static final StringProperty UUID_PROPERTY = new StringProperty(null, UUID_PROPERTY_NAME);
/** pushed at date property name */
public static final String PUSHED_AT_PROPERTY_NAME = "pushedAt"; //$NON-NLS-1$
/** constant value for no uuid */
public static final String NO_UUID = "0"; //$NON-NLS-1$

@ -26,7 +26,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.api.Filter;
import com.todoroo.astrid.api.FilterListItem;
import com.todoroo.astrid.api.FilterWithCustomIntent;
import com.todoroo.astrid.core.CoreFilterExposer;
import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.gcal.GCalHelper;

@ -271,6 +271,7 @@ public class EditPreferences extends TodorooPreferenceActivity {
}
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public void updatePreferences(final Preference preference, Object value) {
final Resources r = getResources();

@ -40,7 +40,6 @@ import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.gtasks.GtasksListFragment;
import com.todoroo.astrid.gtasks.GtasksPreferenceService;
import com.todoroo.astrid.gtasks.GtasksPreferences;
import com.todoroo.astrid.tags.DeleteTagActivity;
import com.todoroo.astrid.tags.RenameTagActivity;
import com.todoroo.astrid.tags.TagFilterExposer;

@ -204,9 +204,7 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
}
}
if (selected != null && selected.equals(viewHolder.item)) {
// convertView.setBackgroundColor(activity.getResources().getColor(R.color.tablet_list_selected));
} else {
if (selected == null || !selected.equals(viewHolder.item)) {
convertView.setBackgroundColor(activity.getResources().getColor(android.R.color.transparent));
}

@ -580,9 +580,7 @@ public class TasksXmlImporter {
break;
case LegacyTaskModel.PREFERRED_DUE_DATE:
String definite = xpp.getAttributeValue(null, LegacyTaskModel.DEFINITE_DUE_DATE);
if (definite != null) {
// handled above
} else {
if (definite == null) {
task.setDueDate(
BackupDateUtilities.getTaskDueDateFromIso8601String(value).getTime());
}

@ -135,7 +135,6 @@ public class TaskDao extends RemoteModelDao<Task> {
* Saves the given task to the database.getDatabase(). Task must already
* exist. Returns true on success.
*
* @return true if save occurred, false otherwise (i.e. nothing changed)
*/
public void save(Task task) {
if (task.getId() == Task.NO_ID) {

@ -24,7 +24,6 @@ import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.astrid.activity.TaskListFragment;
import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.api.SyncAction;
import com.todoroo.astrid.gtasks.GtasksPreferenceService;
import com.todoroo.astrid.service.SyncV2Service;
import com.todoroo.astrid.sync.SyncProviderUtilities;
import com.todoroo.astrid.sync.SyncResultCallback;

@ -419,10 +419,10 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
}
private void addComment() {
addComment(commentField.getText().toString(), UserActivity.ACTION_TASK_COMMENT, task.getUuid(), task.getTitle(), true);
addComment(commentField.getText().toString(), UserActivity.ACTION_TASK_COMMENT, task.getUuid(), true);
}
private void addComment(String message, String actionCode, String uuid, String title, boolean usePicture) {
private void addComment(String message, String actionCode, String uuid, boolean usePicture) {
// Allow for users to just add picture
if (TextUtils.isEmpty(message) && usePicture) {
message = " ";
@ -517,7 +517,6 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
DateUtilities.getTimeString(getContext(), newDate())),
UserActivity.ACTION_TASK_COMMENT,
t.getUuid(),
t.getTitle(),
false);
}
@ -530,7 +529,6 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
getContext().getString(R.string.TEA_timer_comment_spent),
elapsedTime), UserActivity.ACTION_TASK_COMMENT,
t.getUuid(),
t.getTitle(),
false);
}

@ -555,13 +555,11 @@
<!-- slide 47f -->
<string name="EPr_manage_delete_completed_gcal">Delete calendar events for completed tasks</string>
<string name="EPr_manage_delete_completed_gcal_message">Do you really want to delete all your events for completed tasks?</string>
<string name="EPr_manage_delete_completed_gcal_summary"></string>
<string name="EPr_manage_delete_completed_gcal_status">Deleted %d calendar events!</string>
<!-- slide 47g-->
<string name="EPr_manage_delete_all_gcal">Delete all calendar events for tasks</string>
<string name="EPr_manage_delete_all_gcal_message">Do you really want to delete all your events for tasks?</string>
<string name="EPr_manage_delete_all_gcal_summary"></string>
<string name="EPr_manage_delete_all_gcal_status">Deleted %d calendar events!</string>
<!-- ==================================================== AddOnActivity == -->

@ -20,13 +20,11 @@
<com.todoroo.astrid.ui.MultilinePreference
android:title="@string/EPr_manage_delete_completed_gcal"
android:key="@string/EPr_manage_delete_completed_gcal"
android:summary="@string/EPr_manage_delete_completed_gcal_summary"/>
android:key="@string/EPr_manage_delete_completed_gcal"/>
<com.todoroo.astrid.ui.MultilinePreference
android:title="@string/EPr_manage_delete_all_gcal"
android:key="@string/EPr_manage_delete_all_gcal"
android:summary="@string/EPr_manage_delete_all_gcal_summary"/>
android:key="@string/EPr_manage_delete_all_gcal"/>
<Preference
android:title="@string/EPr_manage_clear_all"

Loading…
Cancel
Save