Remove warning suppressions

pull/14/head
Alex Baker 11 years ago
parent ef91df4801
commit 696065b344

@ -39,7 +39,6 @@ import com.todoroo.andlib.utility.AndroidUtilities;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
abstract public class AbstractDatabase { abstract public class AbstractDatabase {
// --- abstract methods // --- abstract methods

@ -145,7 +145,6 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
} }
@Override @Override
@SuppressWarnings("nls")
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append(getClass().getSimpleName()).append("\n") builder.append(getClass().getSimpleName()).append("\n")

@ -28,7 +28,6 @@ import com.todoroo.andlib.sql.UnaryCriterion;
* @param <TYPE> * @param <TYPE>
* a database supported type, such as String or Integer * a database supported type, such as String or Integer
*/ */
@SuppressWarnings("nls")
public abstract class Property<TYPE> extends Field implements Cloneable { public abstract class Property<TYPE> extends Field implements Cloneable {
// --- implementation // --- implementation

@ -34,7 +34,6 @@ public final class Table extends SqlTable {
* Reads a list of properties from model class by reflection * Reads a list of properties from model class by reflection
* @return property array * @return property array
*/ */
@SuppressWarnings("nls")
public Property<?>[] getProperties() { public Property<?>[] getProperties() {
try { try {
return (Property<?>[])modelClass.getField("PROPERTIES").get(null); return (Property<?>[])modelClass.getField("PROPERTIES").get(null);
@ -64,7 +63,6 @@ public final class Table extends SqlTable {
* @param property * @param property
* @return * @return
*/ */
@SuppressWarnings("nls")
public Field field(Property<?> property) { public Field field(Property<?> property) {
if(alias != null) { if(alias != null) {
return Field.field(alias + "." + property.name); return Field.field(alias + "." + property.name);

@ -38,7 +38,6 @@ public class DependencyInjectionService {
* @param caller * @param caller
* object to perform DI on * object to perform DI on
*/ */
@SuppressWarnings("nls")
public void inject(Object caller) { public void inject(Object caller) {
// Traverse through class and all parent classes, looking for // Traverse through class and all parent classes, looking for
// fields declared with the @Autowired annotation and using // fields declared with the @Autowired annotation and using
@ -73,7 +72,6 @@ public class DependencyInjectionService {
} }
} }
@SuppressWarnings("nls")
private boolean isQualifiedPackage(String packageName) { private boolean isQualifiedPackage(String packageName) {
if(packageName.startsWith("com.todoroo")) { if(packageName.startsWith("com.todoroo")) {
return true; return true;
@ -96,7 +94,6 @@ public class DependencyInjectionService {
* @param field * @param field
* field to inject * field to inject
*/ */
@SuppressWarnings("nls")
private synchronized void handleField(Object caller, Field field) private synchronized void handleField(Object caller, Field field)
throws IllegalStateException, IllegalArgumentException, throws IllegalStateException, IllegalArgumentException,
IllegalAccessException { IllegalAccessException {
@ -130,7 +127,6 @@ public class DependencyInjectionService {
// --- default dependency injector // --- default dependency injector
private class DefaultDependencyInjector extends AbstractDependencyInjector { private class DefaultDependencyInjector extends AbstractDependencyInjector {
@SuppressWarnings("nls")
@Override @Override
protected void addInjectables() { protected void addInjectables() {
injectables.put("debug", false); injectables.put("debug", false);

@ -61,7 +61,6 @@ public class HttpRestClient implements RestClient {
private int timeout = TIMEOUT_MILLIS; private int timeout = TIMEOUT_MILLIS;
@SuppressWarnings("nls")
public HttpRestClient() { public HttpRestClient() {
DependencyInjectionService.getInstance().inject(this); DependencyInjectionService.getInstance().inject(this);
@ -101,7 +100,6 @@ public class HttpRestClient implements RestClient {
return httpClient.get(); return httpClient.get();
} }
@SuppressWarnings("nls")
protected void actsAsGzippable(DefaultHttpClient client) { protected void actsAsGzippable(DefaultHttpClient client) {
client.addRequestInterceptor(new HttpRequestInterceptor() { client.addRequestInterceptor(new HttpRequestInterceptor() {
@Override @Override

@ -37,7 +37,6 @@ public class Field extends DBObject<Field> {
* @param value string which field must equal * @param value string which field must equal
* @return the criterion * @return the criterion
*/ */
@SuppressWarnings("nls")
public Criterion eqCaseInsensitive(String value) { public Criterion eqCaseInsensitive(String value) {
if(value == null) { if(value == null) {
return UnaryCriterion.isNull(this); return UnaryCriterion.isNull(this);

@ -12,7 +12,6 @@ import com.todoroo.andlib.data.Property.StringProperty;
@SuppressWarnings("nls")
public final class Functions { public final class Functions {
public static String caseStatement(Criterion when, Object ifTrue, Object ifFalse) { public static String caseStatement(Criterion when, Object ifTrue, Object ifFalse) {

@ -38,7 +38,6 @@ public class Join {
} }
@Override @Override
@SuppressWarnings("nls")
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(joinType).append(SPACE).append(JOIN).append(SPACE).append(joinTable).append(SPACE).append(ON).append(SPACE).append("("); sb.append(joinType).append(SPACE).append(JOIN).append(SPACE).append(joinTable).append(SPACE).append(ON).append(SPACE).append("(");

@ -10,7 +10,6 @@ import static com.todoroo.andlib.sql.SqlConstants.SPACE;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@SuppressWarnings("nls")
public final class Operator { public final class Operator {
private final String operator; private final String operator;

@ -145,7 +145,6 @@ public final class Query {
sql.deleteCharAt(sql.length() - 1).append(SPACE); sql.deleteCharAt(sql.length() - 1).append(SPACE);
} }
@SuppressWarnings("nls")
private void visitGroupByClause(StringBuilder sql) { private void visitGroupByClause(StringBuilder sql) {
if (groupBies.isEmpty()) { if (groupBies.isEmpty()) {
return; return;
@ -303,7 +302,6 @@ public final class Query {
public static class QueryTemplateHelper { public static class QueryTemplateHelper {
/** build a content resolver query */ /** build a content resolver query */
@SuppressWarnings("nls")
public static void queryForContentResolver(String queryTemplate, public static void queryForContentResolver(String queryTemplate,
StringBuilder selectionClause, StringBuilder orderClause, StringBuilder selectionClause, StringBuilder orderClause,
StringBuilder groupByClause) { StringBuilder groupByClause) {

@ -75,7 +75,6 @@ public final class QueryTemplate {
sql.deleteCharAt(sql.length() - 1).append(SPACE); sql.deleteCharAt(sql.length() - 1).append(SPACE);
} }
@SuppressWarnings("nls")
private void visitGroupByClause(StringBuilder sql) { private void visitGroupByClause(StringBuilder sql) {
if (groupBies.isEmpty()) { if (groupBies.isEmpty()) {
return; return;

@ -5,7 +5,6 @@
*/ */
package com.todoroo.andlib.sql; package com.todoroo.andlib.sql;
@SuppressWarnings("nls")
public final class SqlConstants { public final class SqlConstants {
public static final String SELECT = "SELECT"; public static final String SELECT = "SELECT";
public static final String DISTINCT = "DISTINCT"; public static final String DISTINCT = "DISTINCT";

@ -15,7 +15,6 @@ public class SqlTable extends DBObject<SqlTable> {
return new SqlTable(table); return new SqlTable(table);
} }
@SuppressWarnings("nls")
protected String fieldExpression(String fieldName) { protected String fieldExpression(String fieldName) {
if (hasAlias()) { if (hasAlias()) {
return alias + "." + fieldName; return alias + "." + fieldName;

@ -36,7 +36,6 @@ public class UnaryCriterion extends Criterion {
sb.append(operator); sb.append(operator);
} }
@SuppressWarnings("nls")
protected void afterPopulateOperator(StringBuilder sb) { protected void afterPopulateOperator(StringBuilder sb) {
if(value == null) { if(value == null) {
return; return;
@ -52,7 +51,6 @@ public class UnaryCriterion extends Criterion {
* @param input * @param input
* @return * @return
*/ */
@SuppressWarnings("nls")
public static String sanitize(String input) { public static String sanitize(String input) {
return input.replace("'", "''"); return input.replace("'", "''");
} }
@ -110,7 +108,6 @@ public class UnaryCriterion extends Criterion {
protected void populateOperator(StringBuilder sb) { protected void populateOperator(StringBuilder sb) {
sb.append(SPACE).append(operator).append(SPACE); sb.append(SPACE).append(operator).append(SPACE);
} }
@SuppressWarnings("nls")
@Override @Override
protected void afterPopulateOperator(StringBuilder sb) { protected void afterPopulateOperator(StringBuilder sb) {
super.afterPopulateOperator(sb); super.afterPopulateOperator(sb);

@ -411,7 +411,6 @@ public class AndroidUtilities {
public void put(T object, String key, char type, String value) throws NumberFormatException; public void put(T object, String key, char type, String value) throws NumberFormatException;
} }
@SuppressWarnings("nls")
private static <T> void fromSerialized(String string, T object, SerializedPut<T> putter) { private static <T> void fromSerialized(String string, T object, SerializedPut<T> putter) {
String[] pairs = string.split("\\" + SERIALIZATION_SEPARATOR); //$NON-NLS-1$ String[] pairs = string.split("\\" + SERIALIZATION_SEPARATOR); //$NON-NLS-1$
for(int i = 0; i < pairs.length; i += 2) { for(int i = 0; i < pairs.length; i += 2) {
@ -438,7 +437,6 @@ public class AndroidUtilities {
* @param string * @param string
* @return * @return
*/ */
@SuppressWarnings("nls")
public static ContentValues contentValuesFromString(String string) { public static ContentValues contentValuesFromString(String string) {
if(string == null) { if(string == null) {
return null; return null;
@ -665,7 +663,6 @@ public class AndroidUtilities {
* @param args arguments * @param args arguments
* @return method return value, or null if nothing was called or exception * @return method return value, or null if nothing was called or exception
*/ */
@SuppressWarnings("nls")
public static Object callApiStaticMethod(int minSdk, String className, public static Object callApiStaticMethod(int minSdk, String className,
String methodName, Class<?>[] params, Object... args) { String methodName, Class<?>[] params, Object... args) {
if(getSdkVersion() < minSdk) { if(getSdkVersion() < minSdk) {
@ -690,7 +687,6 @@ public class AndroidUtilities {
* @param args arguments * @param args arguments
* @return method return value, or null if nothing was called or exception * @return method return value, or null if nothing was called or exception
*/ */
@SuppressWarnings("nls")
public static Object callMethod(Class<?> cls, Object receiver, public static Object callMethod(Class<?> cls, Object receiver,
String methodName, Class<?>[] params, Object... args) { String methodName, Class<?>[] params, Object... args) {
try { try {
@ -771,7 +767,6 @@ public class AndroidUtilities {
* @param input * @param input
* @return * @return
*/ */
@SuppressWarnings("nls")
public static String md5(String input) { public static String md5(String input) {
try { try {
byte[] bytesOfMessage = input.getBytes("UTF-8"); byte[] bytesOfMessage = input.getBytes("UTF-8");
@ -1008,7 +1003,6 @@ public class AndroidUtilities {
* @param file * @param file
* @return * @return
*/ */
@SuppressWarnings("nls")
public static String getFileExtension(String file) { public static String getFileExtension(String file) {
int index = file.lastIndexOf('.'); int index = file.lastIndexOf('.');
String extension = ""; String extension = "";
@ -1024,7 +1018,6 @@ public class AndroidUtilities {
/** /**
* Logs a JSONObject using in a readable way * Logs a JSONObject using in a readable way
*/ */
@SuppressWarnings("nls")
public static void logJSONObject(String tag, JSONObject object) { public static void logJSONObject(String tag, JSONObject object) {
if (object == null) { if (object == null) {
Log.e(tag, "JSONOBject: null"); Log.e(tag, "JSONOBject: null");

@ -99,7 +99,6 @@ public class DateUtilities {
* @param date time to format * @param date time to format
* @return time, with hours and minutes * @return time, with hours and minutes
*/ */
@SuppressWarnings("nls")
public static String getTimeString(Context context, Date date, boolean excludeZeroMinutes) { public static String getTimeString(Context context, Date date, boolean excludeZeroMinutes) {
String value; String value;
if (is24HourFormat(context)) { if (is24HourFormat(context)) {
@ -128,7 +127,6 @@ public class DateUtilities {
* @param date date to format * @param date date to format
* @return date, with month, day, and year * @return date, with month, day, and year
*/ */
@SuppressWarnings("nls")
public static String getDateString(Context context, Date date, boolean includeYear) { public static String getDateString(Context context, Date date, boolean includeYear) {
String month = DateUtils.getMonthString(date.getMonth() + String month = DateUtils.getMonthString(date.getMonth() +
Calendar.JANUARY, DateUtils.LENGTH_MEDIUM); Calendar.JANUARY, DateUtils.LENGTH_MEDIUM);
@ -163,7 +161,6 @@ public class DateUtilities {
* @param date date to format * @param date date to format
* @return date, with month, day, and year * @return date, with month, day, and year
*/ */
@SuppressWarnings("nls")
public static String getDateStringHideYear(Context context, Date date) { public static String getDateStringHideYear(Context context, Date date) {
String month = DateUtils.getMonthString(date.getMonth() + String month = DateUtils.getMonthString(date.getMonth() +
Calendar.JANUARY, DateUtils.LENGTH_MEDIUM); Calendar.JANUARY, DateUtils.LENGTH_MEDIUM);
@ -194,7 +191,6 @@ public class DateUtilities {
/** /**
* @return date format as getDateFormat with weekday * @return date format as getDateFormat with weekday
*/ */
@SuppressWarnings("nls")
public static String getDateStringWithWeekday(Context context, Date date) { public static String getDateStringWithWeekday(Context context, Date date) {
String weekday = getWeekday(date); String weekday = getWeekday(date);
return weekday + ", " + getDateString(context, date); return weekday + ", " + getDateString(context, date);
@ -220,7 +216,6 @@ public class DateUtilities {
/** /**
* @return date format as getDateFormat with weekday * @return date format as getDateFormat with weekday
*/ */
@SuppressWarnings("nls")
public static String getDateStringWithTimeAndWeekday(Context context, Date date) { public static String getDateStringWithTimeAndWeekday(Context context, Date date) {
return getDateStringWithWeekday(context, date) + " " + getTimeString(context, date); return getDateStringWithWeekday(context, date) + " " + getTimeString(context, date);
} }
@ -228,7 +223,6 @@ public class DateUtilities {
/** /**
* @return date with time at the end * @return date with time at the end
*/ */
@SuppressWarnings("nls")
public static String getDateStringWithTime(Context context, Date date) { public static String getDateStringWithTime(Context context, Date date) {
return getDateString(context, date) + " " + getTimeString(context, date); return getDateString(context, date) + " " + getTimeString(context, date);
} }

@ -55,7 +55,6 @@ public class DialogUtilities {
* @param html * @param html
* @param title * @param title
*/ */
@SuppressWarnings("nls")
public static void htmlDialog(Context context, String html, int title) { public static void htmlDialog(Context context, String html, int title) {
WebView webView = new WebView(context); WebView webView = new WebView(context);
webView.loadDataWithBaseURL("file:///android_asset/", html, "text/html", "utf-8", null); webView.loadDataWithBaseURL("file:///android_asset/", html, "text/html", "utf-8", null);

@ -13,7 +13,6 @@ import android.widget.RemoteViews;
* *
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
*/ */
@SuppressWarnings("nls")
public class AstridApiConstants { public class AstridApiConstants {
// --- General Constants // --- General Constants

@ -72,7 +72,6 @@ public class FilterCategoryWithNewButton extends FilterCategory {
/** /**
* Parcelable creator * Parcelable creator
*/ */
@SuppressWarnings("hiding")
public static final Parcelable.Creator<FilterCategoryWithNewButton> CREATOR = new Parcelable.Creator<FilterCategoryWithNewButton>() { public static final Parcelable.Creator<FilterCategoryWithNewButton> CREATOR = new Parcelable.Creator<FilterCategoryWithNewButton>() {
/** /**

@ -87,7 +87,6 @@ public class FilterWithCustomIntent extends Filter {
/** /**
* Parcelable Creator Object * Parcelable Creator Object
*/ */
@SuppressWarnings("hiding")
public static final Parcelable.Creator<FilterWithCustomIntent> CREATOR = new Parcelable.Creator<FilterWithCustomIntent>() { public static final Parcelable.Creator<FilterWithCustomIntent> CREATOR = new Parcelable.Creator<FilterWithCustomIntent>() {
/** /**

@ -68,7 +68,6 @@ public class FilterWithUpdate extends FilterWithCustomIntent {
/** /**
* Parcelable Creator Object * Parcelable Creator Object
*/ */
@SuppressWarnings("hiding")
public static final Parcelable.Creator<FilterWithUpdate> CREATOR = new Parcelable.Creator<FilterWithUpdate>() { public static final Parcelable.Creator<FilterWithUpdate> CREATOR = new Parcelable.Creator<FilterWithUpdate>() {
/** /**

@ -45,7 +45,6 @@ public class SortHelper {
* @param sort * @param sort
* @return * @return
*/ */
@SuppressWarnings("nls")
public static String adjustQueryForFlagsAndSort(String originalSql, int flags, int sort) { public static String adjustQueryForFlagsAndSort(String originalSql, int flags, int sort) {
// sort // sort
if(originalSql == null) { if(originalSql == null) {
@ -89,7 +88,6 @@ public class SortHelper {
return flags; return flags;
} }
@SuppressWarnings("nls")
public static Order orderForSortType(int sortType) { public static Order orderForSortType(int sortType) {
Order order; Order order;
switch(sortType) { switch(sortType) {
@ -124,7 +122,6 @@ public class SortHelper {
* Returns SQL task ordering that is astrid's default algorithm * Returns SQL task ordering that is astrid's default algorithm
* @return * @return
*/ */
@SuppressWarnings("nls")
public static Order defaultTaskOrder() { public static Order defaultTaskOrder() {
return Order.asc(Functions.caseStatement(Task.DUE_DATE.eq(0), return Order.asc(Functions.caseStatement(Task.DUE_DATE.eq(0),
Functions.now() + "*2", Functions.now() + "*2",
@ -132,7 +129,6 @@ public class SortHelper {
Task.IMPORTANCE + " + 2*" + Task.COMPLETION_DATE); Task.IMPORTANCE + " + 2*" + Task.COMPLETION_DATE);
} }
@SuppressWarnings("nls")
private static String adjustedDueDateFunction() { private static String adjustedDueDateFunction() {
return new StringBuilder("(CASE WHEN (").append(Task.DUE_DATE.name).append(" / 1000) % 60 > 0") return new StringBuilder("(CASE WHEN (").append(Task.DUE_DATE.name).append(" / 1000) % 60 > 0")
.append(" THEN ").append(Task.DUE_DATE.name).append(" ELSE ").append("(").append(Task.DUE_DATE.name) .append(" THEN ").append(Task.DUE_DATE.name).append(" ELSE ").append("(").append(Task.DUE_DATE.name)

@ -11,7 +11,6 @@ import com.todoroo.andlib.data.Table;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
@SuppressWarnings("nls")
public class History extends AbstractModel { public class History extends AbstractModel {
/** table for this model */ /** table for this model */

@ -23,7 +23,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public class Metadata extends AbstractModel { public class Metadata extends AbstractModel {
// --- table // --- table

@ -4,7 +4,6 @@ import com.todoroo.andlib.data.AbstractModel;
import com.todoroo.andlib.data.Property.LongProperty; import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
@SuppressWarnings("nls")
public abstract class OutstandingEntry<TYPE extends RemoteModel> extends AbstractModel { public abstract class OutstandingEntry<TYPE extends RemoteModel> extends AbstractModel {
public static final String ENTITY_ID_PROPERTY_NAME = "entityId"; public static final String ENTITY_ID_PROPERTY_NAME = "entityId";

@ -137,7 +137,6 @@ abstract public class RemoteModel extends AbstractModel {
return String.format("cached::%s%s", tagData.getValue(TagData.NAME), tag_date); return String.format("cached::%s%s", tagData.getValue(TagData.NAME), tag_date);
} }
@SuppressWarnings("nls")
public static JSONObject savePictureJson(Context context, Bitmap bitmap) { public static JSONObject savePictureJson(Context context, Bitmap bitmap) {
try { try {
String name = DateUtilities.now() + ".jpg"; String name = DateUtilities.now() + ".jpg";
@ -189,7 +188,6 @@ abstract public class RemoteModel extends AbstractModel {
} }
} }
@SuppressWarnings("nls")
public static Bitmap getPictureBitmap(String value) { public static Bitmap getPictureBitmap(String value) {
try { try {
if (value == null) { if (value == null) {

@ -23,7 +23,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public class StoreObject extends AbstractModel { public class StoreObject extends AbstractModel {
// --- table // --- table

@ -5,7 +5,6 @@
*/ */
package com.todoroo.astrid.data; package com.todoroo.astrid.data;
@SuppressWarnings("nls")
public class SyncFlags { public class SyncFlags {
public static final String GTASKS_SUPPRESS_SYNC = "gtasks_suppress_sync"; public static final String GTASKS_SUPPRESS_SYNC = "gtasks_suppress_sync";

@ -24,7 +24,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public final class TagData extends RemoteModel { public final class TagData extends RemoteModel {
// --- table and uri // --- table and uri

@ -11,7 +11,6 @@ import com.todoroo.andlib.data.Table;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
@SuppressWarnings("nls")
public class TagMetadata extends AbstractModel { public class TagMetadata extends AbstractModel {
public static final Table TABLE = new Table("tag_metadata", TagMetadata.class); public static final Table TABLE = new Table("tag_metadata", TagMetadata.class);

@ -8,7 +8,6 @@ import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.andlib.data.Table; import com.todoroo.andlib.data.Table;
@SuppressWarnings("nls")
public class TagOutstanding extends OutstandingEntry<TagData> { public class TagOutstanding extends OutstandingEntry<TagData> {
/** table for this model */ /** table for this model */

@ -29,7 +29,6 @@ import org.astrid.api.R;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public final class Task extends RemoteModel { public final class Task extends RemoteModel {
// --- table and uri // --- table and uri

@ -89,7 +89,6 @@ public class TaskApiDao extends ContentResolverDao<Task> {
} }
/** @return tasks that have a blank or null title */ /** @return tasks that have a blank or null title */
@SuppressWarnings("nls")
public static Criterion hasNoTitle() { public static Criterion hasNoTitle() {
return Criterion.or(Task.TITLE.isNull(), Task.TITLE.eq("")); return Criterion.or(Task.TITLE.isNull(), Task.TITLE.eq(""));
} }

@ -25,7 +25,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public final class TaskAttachment extends RemoteModel { public final class TaskAttachment extends RemoteModel {
// --- table and uri // --- table and uri

@ -8,7 +8,6 @@ import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.andlib.data.Table; import com.todoroo.andlib.data.Table;
@SuppressWarnings("nls")
public class TaskAttachmentOutstanding extends OutstandingEntry<TaskAttachment> { public class TaskAttachmentOutstanding extends OutstandingEntry<TaskAttachment> {
/** table for this model */ /** table for this model */

@ -25,7 +25,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public final class TaskListMetadata extends RemoteModel { public final class TaskListMetadata extends RemoteModel {
// --- table and uri // --- table and uri

@ -8,7 +8,6 @@ import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.andlib.data.Table; import com.todoroo.andlib.data.Table;
@SuppressWarnings("nls")
public class TaskListMetadataOutstanding extends OutstandingEntry<TaskListMetadata> { public class TaskListMetadataOutstanding extends OutstandingEntry<TaskListMetadata> {
/** table for this model */ /** table for this model */

@ -8,7 +8,6 @@ import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.andlib.data.Table; import com.todoroo.andlib.data.Table;
@SuppressWarnings("nls")
public class TaskOutstanding extends OutstandingEntry<Task> { public class TaskOutstanding extends OutstandingEntry<Task> {
/** table for this model */ /** table for this model */

@ -24,7 +24,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
@Deprecated @Deprecated
public class Update extends RemoteModel { public class Update extends RemoteModel {

@ -24,7 +24,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public final class User extends RemoteModel { public final class User extends RemoteModel {
// --- table and uri // --- table and uri

@ -11,7 +11,6 @@ import com.todoroo.andlib.data.Table;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
@SuppressWarnings("nls")
public class UserActivity extends RemoteModel { public class UserActivity extends RemoteModel {
// --- table // --- table

@ -8,7 +8,6 @@ import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.andlib.data.Table; import com.todoroo.andlib.data.Table;
@SuppressWarnings("nls")
public class UserActivityOutstanding extends OutstandingEntry<UserActivity> { public class UserActivityOutstanding extends OutstandingEntry<UserActivity> {
/** table for this model */ /** table for this model */

@ -12,7 +12,6 @@ import com.todoroo.andlib.data.Table;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
@SuppressWarnings("nls")
public class WaitingOnMe extends RemoteModel { public class WaitingOnMe extends RemoteModel {
/** table for this model */ /** table for this model */

@ -8,7 +8,6 @@ import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.andlib.data.Table; import com.todoroo.andlib.data.Table;
@SuppressWarnings("nls")
public class WaitingOnMeOutstanding extends OutstandingEntry<WaitingOnMe> { public class WaitingOnMeOutstanding extends OutstandingEntry<WaitingOnMe> {
/** table for this model */ /** table for this model */

@ -241,7 +241,6 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
readRemotelyUpdated(data); readRemotelyUpdated(data);
} }
@SuppressWarnings("nls")
protected String getFinalSyncStatus() { protected String getFinalSyncStatus() {
if (getUtilities().getLastError() != null || getUtilities().getLastAttemptedSyncDate() != 0) { if (getUtilities().getLastError() != null || getUtilities().getLastAttemptedSyncDate() != 0) {
if (getUtilities().getLastAttemptedSyncDate() == 0) { if (getUtilities().getLastAttemptedSyncDate() == 0) {

@ -193,7 +193,6 @@ abstract public class SyncProviderPreferences extends TodorooPreferenceActivity
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() { preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override @Override
@SuppressWarnings("nls")
public boolean onPreferenceClick(Preference pref) { public boolean onPreferenceClick(Preference pref) {
// Show last error // Show last error
new AlertDialog.Builder(SyncProviderPreferences.this) new AlertDialog.Builder(SyncProviderPreferences.this)
@ -256,7 +255,6 @@ abstract public class SyncProviderPreferences extends TodorooPreferenceActivity
*/ */
private static HashMap<String, Integer> exceptionsToDisplayMessages; private static HashMap<String, Integer> exceptionsToDisplayMessages;
@SuppressWarnings("nls")
private static HashMap<String, Integer> getExceptionMap() { private static HashMap<String, Integer> getExceptionMap() {
if (exceptionsToDisplayMessages == null) { if (exceptionsToDisplayMessages == null) {
exceptionsToDisplayMessages = new HashMap<String, Integer>(); exceptionsToDisplayMessages = new HashMap<String, Integer>();

@ -37,7 +37,6 @@ import org.astrid.R;
import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.astrid.ui.ErrorCatchingListView; import com.todoroo.astrid.ui.ErrorCatchingListView;
@SuppressWarnings("nls")
public class TouchListView extends ErrorCatchingListView { public class TouchListView extends ErrorCatchingListView {
private ImageView mDragView; private ImageView mDragView;
private View mOriginalView; private View mOriginalView;

@ -20,7 +20,6 @@ import com.mdimension.jchronic.tags.TimeZone;
import com.mdimension.jchronic.utils.Span; import com.mdimension.jchronic.utils.Span;
import com.mdimension.jchronic.utils.Token; import com.mdimension.jchronic.utils.Token;
@SuppressWarnings("nls")
public class AstridChronic { public class AstridChronic {
public static final String VERSION = "0.2.3"; public static final String VERSION = "0.2.3";
@ -71,7 +70,6 @@ public class AstridChronic {
* will be made, and the first matching instance of that time will * will be made, and the first matching instance of that time will
* be used. * be used.
*/ */
@SuppressWarnings("unchecked")
public static Span parse(String text, Options options) { public static Span parse(String text, Options options) {
// store now for later =) // store now for later =)
//_now = options.getNow(); //_now = options.getNow();

@ -16,7 +16,6 @@ import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.service.DependencyInjectionService;
/** Abstract controller class. Mostly contains some static fields */ /** Abstract controller class. Mostly contains some static fields */
@SuppressWarnings("nls")
abstract public class LegacyAbstractController { abstract public class LegacyAbstractController {
protected Context context; protected Context context;

@ -12,7 +12,6 @@ import android.content.ContentValues;
import android.database.Cursor; import android.database.Cursor;
/** A data object backed by a database */ /** A data object backed by a database */
@SuppressWarnings("nls")
public abstract class LegacyAbstractModel { public abstract class LegacyAbstractModel {
/* Data Source Ordering: /* Data Source Ordering:

@ -20,7 +20,6 @@ import com.timsu.astrid.data.task.TaskIdentifier;
/** A single alert on a task */ /** A single alert on a task */
@SuppressWarnings("nls")
public class Alert extends LegacyAbstractModel { public class Alert extends LegacyAbstractModel {
/** Version number of this model */ /** Version number of this model */

@ -22,7 +22,6 @@ import com.timsu.astrid.data.alerts.Alert.AlertDatabaseHelper;
import com.timsu.astrid.data.task.TaskIdentifier; import com.timsu.astrid.data.task.TaskIdentifier;
/** Controller for Tag-related operations */ /** Controller for Tag-related operations */
@SuppressWarnings("nls")
public class AlertController extends LegacyAbstractController { public class AlertController extends LegacyAbstractController {
private SQLiteDatabase alertDatabase; private SQLiteDatabase alertDatabase;

@ -21,7 +21,6 @@ import com.timsu.astrid.data.task.TaskIdentifier;
import com.timsu.astrid.data.task.TaskModelForSync; import com.timsu.astrid.data.task.TaskModelForSync;
/** Controller for Tag-related operations */ /** Controller for Tag-related operations */
@SuppressWarnings("nls")
public class SyncDataController extends LegacyAbstractController { public class SyncDataController extends LegacyAbstractController {
private SQLiteDatabase syncDatabase; private SQLiteDatabase syncDatabase;

@ -18,7 +18,6 @@ import com.timsu.astrid.data.task.TaskIdentifier;
/** A single tag on a task */ /** A single tag on a task */
@SuppressWarnings("nls")
public class SyncMapping extends LegacyAbstractModel { public class SyncMapping extends LegacyAbstractModel {

@ -24,7 +24,6 @@ import com.timsu.astrid.data.LegacyAbstractModel;
* @author timsu * @author timsu
* *
*/ */
@SuppressWarnings("nls")
public abstract class AbstractTagModel extends LegacyAbstractModel { public abstract class AbstractTagModel extends LegacyAbstractModel {
/** Version number of this model */ /** Version number of this model */

@ -23,7 +23,6 @@ import com.timsu.astrid.data.task.TaskIdentifier;
import com.todoroo.astrid.provider.Astrid2TaskProvider; import com.todoroo.astrid.provider.Astrid2TaskProvider;
/** Controller for Tag-related operations */ /** Controller for Tag-related operations */
@SuppressWarnings("nls")
@Deprecated @Deprecated
public class TagController extends LegacyAbstractController { public class TagController extends LegacyAbstractController {

@ -11,7 +11,6 @@ import com.timsu.astrid.data.LegacyAbstractController;
/** Tag model for viewing purposes. Contains task name */ /** Tag model for viewing purposes. Contains task name */
@SuppressWarnings("nls")
public class TagModelForView extends AbstractTagModel { public class TagModelForView extends AbstractTagModel {
static String[] FIELD_LIST = new String[] { static String[] FIELD_LIST = new String[] {

@ -18,7 +18,6 @@ import com.timsu.astrid.data.task.TaskIdentifier;
/** A single tag on a task */ /** A single tag on a task */
@SuppressWarnings("nls")
public class TagToTaskMapping extends LegacyAbstractModel { public class TagToTaskMapping extends LegacyAbstractModel {
/** Version number of this model */ /** Version number of this model */

@ -27,7 +27,6 @@ import com.timsu.astrid.data.enums.RepeatInterval;
* @author timsu * @author timsu
* *
*/ */
@SuppressWarnings("nls")
public abstract class AbstractTaskModel extends LegacyAbstractModel { public abstract class AbstractTaskModel extends LegacyAbstractModel {
/** Version number of this model */ /** Version number of this model */
@ -140,7 +139,6 @@ public abstract class AbstractTaskModel extends LegacyAbstractModel {
} }
@Override @Override
@SuppressWarnings("fallthrough")
public synchronized void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { public synchronized void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.w(getClass().getSimpleName(), "Upgrading database from version " + Log.w(getClass().getSimpleName(), "Upgrading database from version " +
oldVersion + " to " + newVersion + "."); oldVersion + " to " + newVersion + ".");

@ -37,7 +37,6 @@ import com.todoroo.astrid.widget.TasksWidget.WidgetUpdateService;
* *
*/ */
@Deprecated @Deprecated
@SuppressWarnings("nls")
public class TaskController extends LegacyAbstractController { public class TaskController extends LegacyAbstractController {
private SQLiteDatabase database; private SQLiteDatabase database;

@ -43,7 +43,6 @@ public class TaskModelForHandlers extends AbstractTaskModel {
* @param taskController * @param taskController
* @param repeatInfo * @param repeatInfo
*/ */
@SuppressWarnings("deprecation")
public void repeatTaskBy(Context context, TaskController taskController, public void repeatTaskBy(Context context, TaskController taskController,
RepeatInfo repeatInfo) { RepeatInfo repeatInfo) {

@ -16,7 +16,6 @@ import com.timsu.astrid.data.enums.Importance;
/** Fields that you would want to see in the TaskView activity */ /** Fields that you would want to see in the TaskView activity */
@SuppressWarnings("nls")
public class TaskModelForProvider extends AbstractTaskModel { public class TaskModelForProvider extends AbstractTaskModel {
static String[] FIELD_LIST = new String[] { static String[] FIELD_LIST = new String[] {

@ -15,7 +15,6 @@ import com.timsu.astrid.data.enums.Importance;
/** Fields that you would want to see in the TaskView activity */ /** Fields that you would want to see in the TaskView activity */
@SuppressWarnings("nls")
public class TaskModelForWidget extends AbstractTaskModel { public class TaskModelForWidget extends AbstractTaskModel {
static String[] FIELD_LIST = new String[] { static String[] FIELD_LIST = new String[] {

@ -15,7 +15,6 @@ import com.timsu.astrid.data.enums.Importance;
import com.timsu.astrid.data.enums.RepeatInterval; import com.timsu.astrid.data.enums.RepeatInterval;
import com.todoroo.astrid.backup.BackupDateUtilities; import com.todoroo.astrid.backup.BackupDateUtilities;
@SuppressWarnings("nls")
public class TaskModelForXml extends AbstractTaskModel { public class TaskModelForXml extends AbstractTaskModel {
static String[] FIELD_LIST = new String[] { static String[] FIELD_LIST = new String[] {

@ -35,7 +35,6 @@ import com.timsu.astrid.data.task.TaskIdentifier;
import com.timsu.astrid.data.task.TaskModelForXml; import com.timsu.astrid.data.task.TaskModelForXml;
import com.todoroo.astrid.backup.BackupDateUtilities; import com.todoroo.astrid.backup.BackupDateUtilities;
@SuppressWarnings({"nls", "deprecation"})
public class LegacyTasksXmlExporter { public class LegacyTasksXmlExporter {
private TaskController taskController; private TaskController taskController;

@ -57,7 +57,6 @@ public class ActFmCameraModule {
android.R.layout.simple_spinner_dropdown_item, options.toArray(new String[options.size()])); android.R.layout.simple_spinner_dropdown_item, options.toArray(new String[options.size()]));
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
@SuppressWarnings("nls")
@Override @Override
public void onClick(DialogInterface d, int which) { public void onClick(DialogInterface d, int which) {
if(which == 0 && cameraAvailable) { if(which == 0 && cameraAvailable) {
@ -107,7 +106,6 @@ public class ActFmCameraModule {
android.R.layout.simple_spinner_dropdown_item, options.toArray(new String[options.size()])); android.R.layout.simple_spinner_dropdown_item, options.toArray(new String[options.size()]));
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
@SuppressWarnings("nls")
@Override @Override
public void onClick(DialogInterface d, int which) { public void onClick(DialogInterface d, int which) {
if(which == 0 && cameraAvailable) { if(which == 0 && cameraAvailable) {
@ -135,7 +133,6 @@ public class ActFmCameraModule {
.show().setOwnerActivity(fragment.getActivity()); .show().setOwnerActivity(fragment.getActivity());
} }
@SuppressWarnings("nls")
private static File getTempFile(Activity activity) { private static File getTempFile(Activity activity) {
try { try {
String storageState = Environment.getExternalStorageState(); String storageState = Environment.getExternalStorageState();

@ -274,7 +274,6 @@ public class TagSettingsActivity extends SherlockFragmentActivity {
} }
} }
@SuppressWarnings("nls")
private void saveSettings() { private void saveSettings() {
String oldName = tagData.getValue(TagData.NAME); String oldName = tagData.getValue(TagData.NAME);
String newName = tagName.getText().toString().trim(); String newName = tagName.getText().toString().trim();
@ -413,7 +412,6 @@ public class TagSettingsActivity extends SherlockFragmentActivity {
} }
@SuppressWarnings("nls")
private void updateMembers(String peopleJson, String tagUuid) { private void updateMembers(String peopleJson, String tagUuid) {
JSONArray people = null; JSONArray people = null;
try { try {

@ -438,7 +438,6 @@ public class TagViewFragment extends TaskListFragment {
// --- receivers // --- receivers
private final BroadcastReceiver notifyReceiver = new BroadcastReceiver() { private final BroadcastReceiver notifyReceiver = new BroadcastReceiver() {
@SuppressWarnings("nls")
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
if(!intent.hasExtra("tag_id")) { if(!intent.hasExtra("tag_id")) {

@ -33,7 +33,6 @@ import com.todoroo.andlib.utility.Pair;
import com.todoroo.andlib.utility.Preferences; import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.utility.Constants; import com.todoroo.astrid.utility.Constants;
@SuppressWarnings("nls")
public class ActFmInvoker { public class ActFmInvoker {
/** NOTE: these values are development values & will not work on production */ /** NOTE: these values are development values & will not work on production */

@ -134,7 +134,6 @@ public class ActFmPreferenceService extends SyncProviderUtilities {
populateUser(); populateUser();
} }
@SuppressWarnings("nls")
private static void populateUser() { private static void populateUser() {
try { try {
user.put("name", Preferences.getStringValue(PREF_NAME)); user.put("name", Preferences.getStringValue(PREF_NAME));
@ -177,7 +176,6 @@ public class ActFmPreferenceService extends SyncProviderUtilities {
return name; return name;
} }
@SuppressWarnings("nls")
public static String thisUserName() { public static String thisUserName() {
JSONObject thisUser = thisUser(); JSONObject thisUser = thisUser();

@ -30,7 +30,6 @@ import com.todoroo.astrid.tags.reusable.FeaturedListFilterExposer;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public final class ActFmSyncService { public final class ActFmSyncService {
// --- instance variables // --- instance variables

@ -247,7 +247,6 @@ public class ActFmSyncThread {
public void runOnErrors(List<JSONArray> errors) {/**/} public void runOnErrors(List<JSONArray> errors) {/**/}
}; };
@SuppressWarnings("nls")
private void sync() { private void sync() {
try { try {
int batchSize = 4; int batchSize = 4;
@ -432,7 +431,6 @@ public class ActFmSyncThread {
private JSONObject clientVersion = null; private JSONObject clientVersion = null;
@SuppressWarnings("nls")
private JSONObject getClientVersion() { private JSONObject getClientVersion() {
if (clientVersion == null) { if (clientVersion == null) {
try { try {

@ -51,7 +51,6 @@ import com.todoroo.astrid.subtasks.SubtasksHelper;
import com.todoroo.astrid.subtasks.SubtasksUpdater; import com.todoroo.astrid.subtasks.SubtasksUpdater;
import com.todoroo.astrid.tags.TaskToTagMetadata; import com.todoroo.astrid.tags.TaskToTagMetadata;
@SuppressWarnings("nls")
public class AstridNewSyncMigrator { public class AstridNewSyncMigrator {
@Autowired private MetadataService metadataService; @Autowired private MetadataService metadataService;
@ -75,7 +74,6 @@ public class AstridNewSyncMigrator {
DependencyInjectionService.getInstance().inject(this); DependencyInjectionService.getInstance().inject(this);
} }
@SuppressWarnings("deprecation")
public void performMigration() { public void performMigration() {
if (Preferences.getBoolean(PREF_SYNC_MIGRATION, false)) { if (Preferences.getBoolean(PREF_SYNC_MIGRATION, false)) {
return; return;

@ -40,7 +40,6 @@ import com.todoroo.astrid.data.UserActivityOutstanding;
import com.todoroo.astrid.data.WaitingOnMe; import com.todoroo.astrid.data.WaitingOnMe;
import com.todoroo.astrid.data.WaitingOnMeOutstanding; import com.todoroo.astrid.data.WaitingOnMeOutstanding;
@SuppressWarnings("nls")
public class ChangesHappened<TYPE extends RemoteModel, OE extends OutstandingEntry<TYPE>> extends ClientToServerMessage<TYPE> { public class ChangesHappened<TYPE extends RemoteModel, OE extends OutstandingEntry<TYPE>> extends ClientToServerMessage<TYPE> {
private static final String ERROR_TAG = "actfm-changes-happened"; private static final String ERROR_TAG = "actfm-changes-happened";

@ -11,7 +11,6 @@ import com.todoroo.astrid.dao.DaoReflectionHelpers;
import com.todoroo.astrid.dao.RemoteModelDao; import com.todoroo.astrid.dao.RemoteModelDao;
import com.todoroo.astrid.data.RemoteModel; import com.todoroo.astrid.data.RemoteModel;
@SuppressWarnings("nls")
public abstract class ClientToServerMessage<TYPE extends RemoteModel> { public abstract class ClientToServerMessage<TYPE extends RemoteModel> {
protected final Class<TYPE> modelClass; protected final Class<TYPE> modelClass;

@ -15,7 +15,6 @@ import com.todoroo.astrid.dao.RemoteModelDao;
import com.todoroo.astrid.data.OutstandingEntry; import com.todoroo.astrid.data.OutstandingEntry;
import com.todoroo.astrid.data.RemoteModel; import com.todoroo.astrid.data.RemoteModel;
@SuppressWarnings("nls")
public class ConstructOutstandingTableFromMasterTable<TYPE extends RemoteModel, OE extends OutstandingEntry<TYPE>> { public class ConstructOutstandingTableFromMasterTable<TYPE extends RemoteModel, OE extends OutstandingEntry<TYPE>> {
protected final String table; protected final String table;

@ -12,7 +12,6 @@ public class Debug extends ServerToClientMessage {
} }
@Override @Override
@SuppressWarnings("nls")
public void processMessage(String serverTime) { public void processMessage(String serverTime) {
String message = json.optString("message"); String message = json.optString("message");
if (!TextUtils.isEmpty(message)) { if (!TextUtils.isEmpty(message)) {

@ -65,7 +65,6 @@ public class FetchHistory<TYPE extends RemoteModel> {
this.done = done; this.done = done;
} }
@SuppressWarnings("nls")
public void execute() { public void execute() {
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override

@ -17,7 +17,6 @@ import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
@SuppressWarnings("nls")
public class JSONChangeToPropertyVisitor implements PropertyVisitor<Void, String> { public class JSONChangeToPropertyVisitor implements PropertyVisitor<Void, String> {
private static final String ERROR_TAG = "actfm-make-changes"; private static final String ERROR_TAG = "actfm-make-changes";

@ -41,7 +41,6 @@ import com.todoroo.astrid.service.MetadataService;
import com.todoroo.astrid.tags.TagService; import com.todoroo.astrid.tags.TagService;
import com.todoroo.astrid.tags.TaskToTagMetadata; import com.todoroo.astrid.tags.TaskToTagMetadata;
@SuppressWarnings("nls")
public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage { public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage {
private static final String ERROR_TAG = "actfm-make-changes"; private static final String ERROR_TAG = "actfm-make-changes";
@ -217,7 +216,6 @@ public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage
super(model, changes, uuid); super(model, changes, uuid);
} }
@SuppressWarnings("deprecation")
@Override @Override
public void performChanges() { public void performChanges() {
JSONArray addMembers = changes.optJSONArray("member_added"); JSONArray addMembers = changes.optJSONArray("member_added");
@ -237,7 +235,6 @@ public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage
this.oldUuid = oldUuid; this.oldUuid = oldUuid;
} }
@SuppressWarnings("null")
@Override @Override
public void performChanges() { public void performChanges() {
if (!TextUtils.isEmpty(oldUuid) && !oldUuid.equals(uuid)) { if (!TextUtils.isEmpty(oldUuid) && !oldUuid.equals(uuid)) {
@ -332,7 +329,6 @@ public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage
this.oldUuid = oldUuid; this.oldUuid = oldUuid;
} }
@SuppressWarnings("null")
@Override @Override
public void performChanges() { public void performChanges() {
if (!TextUtils.isEmpty(oldUuid) && !oldUuid.equals(uuid)) { if (!TextUtils.isEmpty(oldUuid) && !oldUuid.equals(uuid)) {

@ -17,7 +17,6 @@ import com.todoroo.astrid.data.User;
import com.todoroo.astrid.data.UserActivity; import com.todoroo.astrid.data.UserActivity;
import com.todoroo.astrid.data.WaitingOnMe; import com.todoroo.astrid.data.WaitingOnMe;
@SuppressWarnings("nls")
public class NameMaps { public class NameMaps {
// -------------------------------- // --------------------------------

@ -16,7 +16,6 @@ import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.User; import com.todoroo.astrid.data.User;
@SuppressWarnings("nls")
public class NowBriefed<TYPE extends RemoteModel> extends ServerToClientMessage { public class NowBriefed<TYPE extends RemoteModel> extends ServerToClientMessage {
private static final String ERROR_TAG = "actfm-now-briefed"; private static final String ERROR_TAG = "actfm-now-briefed";

@ -15,7 +15,6 @@ import com.todoroo.astrid.data.OutstandingEntry;
import com.todoroo.astrid.data.RemoteModel; import com.todoroo.astrid.data.RemoteModel;
import com.todoroo.astrid.data.SyncFlags; import com.todoroo.astrid.data.SyncFlags;
@SuppressWarnings("nls")
public class ReplayOutstandingEntries<T extends RemoteModel, OE extends OutstandingEntry<T>> { public class ReplayOutstandingEntries<T extends RemoteModel, OE extends OutstandingEntry<T>> {
private static final String ERROR_TAG = "actfm-replay-outstanding"; private static final String ERROR_TAG = "actfm-replay-outstanding";

@ -11,7 +11,6 @@ import com.todoroo.astrid.data.User;
import com.todoroo.astrid.data.UserActivity; import com.todoroo.astrid.data.UserActivity;
import com.todoroo.astrid.data.WaitingOnMe; import com.todoroo.astrid.data.WaitingOnMe;
@SuppressWarnings("nls")
public abstract class ServerToClientMessage { public abstract class ServerToClientMessage {
public abstract void processMessage(String serverTime); public abstract void processMessage(String serverTime);

@ -19,7 +19,6 @@ public class UserData extends ServerToClientMessage {
} }
@Override @Override
@SuppressWarnings("nls")
public void processMessage(String serverTime) { public void processMessage(String serverTime) {
String uuid = json.optString("uuid"); String uuid = json.optString("uuid");
String email = json.optString("email"); String email = json.optString("email");

@ -34,7 +34,6 @@ class About {
* *
* @param activity For context. * @param activity For context.
*/ */
@SuppressWarnings("nls")
public static void showAbout(final Activity activity, final String versionName) { public static void showAbout(final Activity activity, final String versionName) {
Resources r = activity.getResources(); Resources r = activity.getResources();

@ -22,7 +22,6 @@ import android.widget.ListAdapter;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
@SuppressWarnings("nls")
public class ExpandableListFragment extends Fragment public class ExpandableListFragment extends Fragment
implements OnCreateContextMenuListener, implements OnCreateContextMenuListener,
ExpandableListView.OnChildClickListener, ExpandableListView.OnGroupCollapseListener, ExpandableListView.OnChildClickListener, ExpandableListView.OnGroupCollapseListener,

@ -19,7 +19,6 @@ import com.todoroo.astrid.adapter.FilterAdapter;
import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.Filter;
import com.todoroo.astrid.service.ThemeService; import com.todoroo.astrid.service.ThemeService;
@SuppressWarnings("nls")
public class FilterShortcutActivity extends ListActivity { public class FilterShortcutActivity extends ListActivity {
private FilterAdapter adapter = null; private FilterAdapter adapter = null;

@ -724,7 +724,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
* *
* @param intent * @param intent
*/ */
@SuppressWarnings("nls")
protected void loadItem(Intent intent) { protected void loadItem(Intent intent) {
if (model != null) { if (model != null) {
// came from bundle // came from bundle
@ -1169,7 +1168,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
createNewFileAttachment(path, name, type); createNewFileAttachment(path, name, type);
} }
@SuppressWarnings("nls")
private void attachImage(Bitmap bitmap) { private void attachImage(Bitmap bitmap) {
AtomicReference<String> nameRef = new AtomicReference<String>(); AtomicReference<String> nameRef = new AtomicReference<String>();

@ -235,7 +235,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
* @param customComponent * @param customComponent
* @return * @return
*/ */
@SuppressWarnings("nls")
public static TaskListFragment instantiateWithFilterAndExtras(Filter filter, Bundle extras, Class<?> customComponent) { public static TaskListFragment instantiateWithFilterAndExtras(Filter filter, Bundle extras, Class<?> customComponent) {
Class<?> component = customComponent; Class<?> component = customComponent;
if (filter instanceof FilterWithCustomIntent && component == null) { if (filter instanceof FilterWithCustomIntent && component == null) {
@ -995,7 +994,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
return filter; return filter;
} }
@SuppressWarnings("nls")
private TodorooCursor<Task> constructCursor() { private TodorooCursor<Task> constructCursor() {
String tagName = null; String tagName = null;
if (getActiveTagData() != null) { if (getActiveTagData() != null) {

@ -108,11 +108,8 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
public static final String BROADCAST_EXTRA_TASK = "model"; //$NON-NLS-1$ public static final String BROADCAST_EXTRA_TASK = "model"; //$NON-NLS-1$
@SuppressWarnings("nls")
private static final StringProperty TAGS = new StringProperty(null, "group_concat(nullif(" + TaskListFragment.TAGS_METADATA_JOIN + "." + TaskToTagMetadata.TAG_NAME.name + ", '')"+ ", ' | ')").as("tags"); private static final StringProperty TAGS = new StringProperty(null, "group_concat(nullif(" + TaskListFragment.TAGS_METADATA_JOIN + "." + TaskToTagMetadata.TAG_NAME.name + ", '')"+ ", ' | ')").as("tags");
@SuppressWarnings("nls")
private static final LongProperty FILE_ID_PROPERTY = TaskAttachment.ID.cloneAs(TaskListFragment.FILE_METADATA_JOIN, "fileId"); private static final LongProperty FILE_ID_PROPERTY = TaskAttachment.ID.cloneAs(TaskListFragment.FILE_METADATA_JOIN, "fileId");
@SuppressWarnings("nls")
private static final IntegerProperty HAS_NOTES_PROPERTY = new IntegerProperty(null, "length(" + Task.NOTES + ") > 0").as("hasNotes"); private static final IntegerProperty HAS_NOTES_PROPERTY = new IntegerProperty(null, "length(" + Task.NOTES + ") > 0").as("hasNotes");
private static final StringProperty PICTURE = User.PICTURE.cloneAs(TaskListFragment.USER_IMAGE_JOIN, null); private static final StringProperty PICTURE = User.PICTURE.cloneAs(TaskListFragment.USER_IMAGE_JOIN, null);
@ -562,7 +559,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
} }
} }
@SuppressWarnings("nls")
private void drawDetails(ViewHolder viewHolder, String details, float rightWidth) { private void drawDetails(ViewHolder viewHolder, String details, float rightWidth) {
SpannableStringBuilder prospective = new SpannableStringBuilder(); SpannableStringBuilder prospective = new SpannableStringBuilder();
SpannableStringBuilder actual = new SpannableStringBuilder(); SpannableStringBuilder actual = new SpannableStringBuilder();
@ -726,7 +722,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
private final HashMap<Long, String> dateCache = new HashMap<Long, String>(8); private final HashMap<Long, String> dateCache = new HashMap<Long, String>(8);
@SuppressWarnings("nls")
private String formatDate(long date) { private String formatDate(long date) {
if(dateCache.containsKey(date)) { if(dateCache.containsKey(date)) {
return dateCache.get(date); return dateCache.get(date);
@ -871,7 +866,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
private final HashMap<Integer, Drawable> cache = private final HashMap<Integer, Drawable> cache =
new HashMap<Integer, Drawable>(3); new HashMap<Integer, Drawable>(3);
@Override @Override
@SuppressWarnings("nls")
public Drawable getDrawable(String source) { public Drawable getDrawable(String source) {
int drawable = 0; int drawable = 0;
if(source.equals("silk_clock")) { if(source.equals("silk_clock")) {

@ -494,7 +494,6 @@ public class UpdateAdapter extends CursorAdapter {
return builder; return builder;
} }
@SuppressWarnings("nls")
public static String getHistoryComment(final AstridActivity context, History history, User user, String linkColor, String fromView) { public static String getHistoryComment(final AstridActivity context, History history, User user, String linkColor, String fromView) {
boolean hasTask = false; boolean hasTask = false;
JSONArray taskAttrs = null; JSONArray taskAttrs = null;
@ -735,10 +734,8 @@ public class UpdateAdapter extends CursorAdapter {
INTERVAL_LABELS.put("MINUTELY", R.string.repeat_minutes); //$NON-NLS-1$ INTERVAL_LABELS.put("MINUTELY", R.string.repeat_minutes); //$NON-NLS-1$
} }
@SuppressWarnings("nls")
private static final String[] SORTED_WEEKDAYS = { "SU", "MO", "TU", "WE", "TH", "FR", "SA" }; private static final String[] SORTED_WEEKDAYS = { "SU", "MO", "TU", "WE", "TH", "FR", "SA" };
@SuppressWarnings("nls")
private static String getRepeatString(Context context, String value) { private static String getRepeatString(Context context, String value) {
if (TextUtils.isEmpty(value) || "null".equals(value)) { if (TextUtils.isEmpty(value) || "null".equals(value)) {
return null; return null;
@ -823,7 +820,6 @@ public class UpdateAdapter extends CursorAdapter {
} }
} }
@SuppressWarnings("nls")
private static String userDisplay(Context context, String historyUserId, JSONObject userJson) { private static String userDisplay(Context context, String historyUserId, JSONObject userJson) {
try { try {
String id = userJson.getString("id"); String id = userJson.getString("id");
@ -843,7 +839,6 @@ public class UpdateAdapter extends CursorAdapter {
} }
} }
@SuppressWarnings("nls")
private static final String[] PRIORITY_STRINGS = { "!!!", "!!", "!", "o" }; private static final String[] PRIORITY_STRINGS = { "!!!", "!!", "!", "o" };
private static String priorityString(int priority) { private static String priorityString(int priority) {
return PRIORITY_STRINGS[priority]; return PRIORITY_STRINGS[priority];

@ -184,7 +184,6 @@ public class AlarmService {
* @param shouldPerformPropertyCheck * @param shouldPerformPropertyCheck
* whether to check if task has requisite properties * whether to check if task has requisite properties
*/ */
@SuppressWarnings("nls")
private void scheduleAlarm(Metadata alarm) { private void scheduleAlarm(Metadata alarm) {
if(alarm == null) { if(alarm == null) {
return; return;

@ -16,7 +16,6 @@ import android.os.Environment;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public class BackupConstants { public class BackupConstants {
// Do NOT edit the constants in this file! You will break compatibility with old backups // Do NOT edit the constants in this file! You will break compatibility with old backups

@ -18,7 +18,6 @@ import android.util.Log;
* @author Tim Su <tim@todoroo.com> * @author Tim Su <tim@todoroo.com>
* *
*/ */
@SuppressWarnings("nls")
public class BackupDateUtilities { public class BackupDateUtilities {
private static final String ISO_8601_FORMAT = "yyyy-MM-dd'T'HH:mm:ssz"; private static final String ISO_8601_FORMAT = "yyyy-MM-dd'T'HH:mm:ssz";

@ -16,7 +16,6 @@ import android.util.Log;
import org.astrid.R; import org.astrid.R;
import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.AndroidUtilities;
@SuppressWarnings("nls")
public class FilePickerBuilder extends AlertDialog.Builder implements DialogInterface.OnClickListener { public class FilePickerBuilder extends AlertDialog.Builder implements DialogInterface.OnClickListener {
public interface OnFilePickedListener { public interface OnFilePickedListener {

@ -157,7 +157,6 @@ public class TasksXmlExporter {
} }
@SuppressWarnings("nls")
private void doTasksExport(String output) throws IOException { private void doTasksExport(String output) throws IOException {
File xmlFile = new File(output); File xmlFile = new File(output);
xmlFile.createNewFile(); xmlFile.createNewFile();

@ -132,7 +132,6 @@ public class TasksXmlImporter {
}).start(); }).start();
} }
@SuppressWarnings("nls")
private void performImport() throws IOException, XmlPullParserException { private void performImport() throws IOException, XmlPullParserException {
XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
XmlPullParser xpp = factory.newPullParser(); XmlPullParser xpp = factory.newPullParser();
@ -246,7 +245,6 @@ public class TasksXmlImporter {
} }
} }
@SuppressWarnings("nls")
private void parseTask() { private void parseTask() {
taskCount++; taskCount++;
setProgressMessage(context.getString(R.string.import_progress_read, setProgressMessage(context.getString(R.string.import_progress_read,
@ -492,7 +490,6 @@ public class TasksXmlImporter {
tags.clear(); tags.clear();
} }
@SuppressWarnings("nls")
private Task parseTask() { private Task parseTask() {
taskCount++; taskCount++;
setProgressMessage(context.getString(R.string.import_progress_read, setProgressMessage(context.getString(R.string.import_progress_read,
@ -553,7 +550,6 @@ public class TasksXmlImporter {
} }
/** helper method to set field on a task */ /** helper method to set field on a task */
@SuppressWarnings("nls")
private final boolean setTaskField(Task task, String field, String value) { private final boolean setTaskField(Task task, String field, String value) {
if(field.equals(LegacyTaskModel.ID)) { if(field.equals(LegacyTaskModel.ID)) {
// ignore // ignore

@ -23,7 +23,6 @@ import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.Preferences; import com.todoroo.andlib.utility.Preferences;
@SuppressWarnings("nls")
public class PhoneStateChangedReceiver extends BroadcastReceiver { public class PhoneStateChangedReceiver extends BroadcastReceiver {
private static final String PREF_LAST_INCOMING_NUMBER = "last_incoming_number"; private static final String PREF_LAST_INCOMING_NUMBER = "last_incoming_number";

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save