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>
*
*/
@SuppressWarnings("nls")
abstract public class AbstractDatabase {
// --- abstract methods

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

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

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

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

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

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

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

@ -38,7 +38,6 @@ public class Join {
}
@Override
@SuppressWarnings("nls")
public String toString() {
StringBuilder sb = new StringBuilder();
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.Map;
@SuppressWarnings("nls")
public final class Operator {
private final String operator;

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

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

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

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

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

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

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

@ -55,7 +55,6 @@ public class DialogUtilities {
* @param html
* @param title
*/
@SuppressWarnings("nls")
public static void htmlDialog(Context context, String html, int title) {
WebView webView = new WebView(context);
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>
*/
@SuppressWarnings("nls")
public class AstridApiConstants {
// --- General Constants

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

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

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

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

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

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

@ -4,7 +4,6 @@ import com.todoroo.andlib.data.AbstractModel;
import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty;
@SuppressWarnings("nls")
public abstract class OutstandingEntry<TYPE extends RemoteModel> extends AbstractModel {
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);
}
@SuppressWarnings("nls")
public static JSONObject savePictureJson(Context context, Bitmap bitmap) {
try {
String name = DateUtilities.now() + ".jpg";
@ -189,7 +188,6 @@ abstract public class RemoteModel extends AbstractModel {
}
}
@SuppressWarnings("nls")
public static Bitmap getPictureBitmap(String value) {
try {
if (value == null) {

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

@ -5,7 +5,6 @@
*/
package com.todoroo.astrid.data;
@SuppressWarnings("nls")
public class SyncFlags {
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>
*
*/
@SuppressWarnings("nls")
public final class TagData extends RemoteModel {
// --- table and uri

@ -11,7 +11,6 @@ import com.todoroo.andlib.data.Table;
import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.astrid.api.AstridApiConstants;
@SuppressWarnings("nls")
public class TagMetadata extends AbstractModel {
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.Table;
@SuppressWarnings("nls")
public class TagOutstanding extends OutstandingEntry<TagData> {
/** table for this model */

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

@ -89,7 +89,6 @@ public class TaskApiDao extends ContentResolverDao<Task> {
}
/** @return tasks that have a blank or null title */
@SuppressWarnings("nls")
public static Criterion hasNoTitle() {
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>
*
*/
@SuppressWarnings("nls")
public final class TaskAttachment extends RemoteModel {
// --- 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.Table;
@SuppressWarnings("nls")
public class TaskAttachmentOutstanding extends OutstandingEntry<TaskAttachment> {
/** table for this model */

@ -25,7 +25,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
* @author Tim Su <tim@todoroo.com>
*
*/
@SuppressWarnings("nls")
public final class TaskListMetadata extends RemoteModel {
// --- 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.Table;
@SuppressWarnings("nls")
public class TaskListMetadataOutstanding extends OutstandingEntry<TaskListMetadata> {
/** 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.Table;
@SuppressWarnings("nls")
public class TaskOutstanding extends OutstandingEntry<Task> {
/** table for this model */

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

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

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

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

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

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

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

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

@ -20,7 +20,6 @@ import com.mdimension.jchronic.tags.TimeZone;
import com.mdimension.jchronic.utils.Span;
import com.mdimension.jchronic.utils.Token;
@SuppressWarnings("nls")
public class AstridChronic {
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
* be used.
*/
@SuppressWarnings("unchecked")
public static Span parse(String text, Options options) {
// store now for later =)
//_now = options.getNow();

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -16,7 +16,6 @@ import com.timsu.astrid.data.enums.Importance;
/** Fields that you would want to see in the TaskView activity */
@SuppressWarnings("nls")
public class TaskModelForProvider extends AbstractTaskModel {
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 */
@SuppressWarnings("nls")
public class TaskModelForWidget extends AbstractTaskModel {
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.todoroo.astrid.backup.BackupDateUtilities;
@SuppressWarnings("nls")
public class TaskModelForXml extends AbstractTaskModel {
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.todoroo.astrid.backup.BackupDateUtilities;
@SuppressWarnings({"nls", "deprecation"})
public class LegacyTasksXmlExporter {
private TaskController taskController;

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

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

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

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

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

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

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

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

@ -40,7 +40,6 @@ import com.todoroo.astrid.data.UserActivityOutstanding;
import com.todoroo.astrid.data.WaitingOnMe;
import com.todoroo.astrid.data.WaitingOnMeOutstanding;
@SuppressWarnings("nls")
public class ChangesHappened<TYPE extends RemoteModel, OE extends OutstandingEntry<TYPE>> extends ClientToServerMessage<TYPE> {
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.data.RemoteModel;
@SuppressWarnings("nls")
public abstract class ClientToServerMessage<TYPE extends RemoteModel> {
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.RemoteModel;
@SuppressWarnings("nls")
public class ConstructOutstandingTableFromMasterTable<TYPE extends RemoteModel, OE extends OutstandingEntry<TYPE>> {
protected final String table;

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

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

@ -17,7 +17,6 @@ import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
import com.todoroo.astrid.data.Task;
@SuppressWarnings("nls")
public class JSONChangeToPropertyVisitor implements PropertyVisitor<Void, String> {
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.TaskToTagMetadata;
@SuppressWarnings("nls")
public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage {
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);
}
@SuppressWarnings("deprecation")
@Override
public void performChanges() {
JSONArray addMembers = changes.optJSONArray("member_added");
@ -237,7 +235,6 @@ public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage
this.oldUuid = oldUuid;
}
@SuppressWarnings("null")
@Override
public void performChanges() {
if (!TextUtils.isEmpty(oldUuid) && !oldUuid.equals(uuid)) {
@ -332,7 +329,6 @@ public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage
this.oldUuid = oldUuid;
}
@SuppressWarnings("null")
@Override
public void performChanges() {
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.WaitingOnMe;
@SuppressWarnings("nls")
public class NameMaps {
// --------------------------------

@ -16,7 +16,6 @@ import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.User;
@SuppressWarnings("nls")
public class NowBriefed<TYPE extends RemoteModel> extends ServerToClientMessage {
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.SyncFlags;
@SuppressWarnings("nls")
public class ReplayOutstandingEntries<T extends RemoteModel, OE extends OutstandingEntry<T>> {
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.WaitingOnMe;
@SuppressWarnings("nls")
public abstract class ServerToClientMessage {
public abstract void processMessage(String serverTime);

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

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

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

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

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

@ -235,7 +235,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
* @param customComponent
* @return
*/
@SuppressWarnings("nls")
public static TaskListFragment instantiateWithFilterAndExtras(Filter filter, Bundle extras, Class<?> customComponent) {
Class<?> component = customComponent;
if (filter instanceof FilterWithCustomIntent && component == null) {
@ -995,7 +994,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
return filter;
}
@SuppressWarnings("nls")
private TodorooCursor<Task> constructCursor() {
String tagName = 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$
@SuppressWarnings("nls")
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");
@SuppressWarnings("nls")
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);
@ -562,7 +559,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
}
}
@SuppressWarnings("nls")
private void drawDetails(ViewHolder viewHolder, String details, float rightWidth) {
SpannableStringBuilder prospective = 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);
@SuppressWarnings("nls")
private String formatDate(long date) {
if(dateCache.containsKey(date)) {
return dateCache.get(date);
@ -871,7 +866,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
private final HashMap<Integer, Drawable> cache =
new HashMap<Integer, Drawable>(3);
@Override
@SuppressWarnings("nls")
public Drawable getDrawable(String source) {
int drawable = 0;
if(source.equals("silk_clock")) {

@ -494,7 +494,6 @@ public class UpdateAdapter extends CursorAdapter {
return builder;
}
@SuppressWarnings("nls")
public static String getHistoryComment(final AstridActivity context, History history, User user, String linkColor, String fromView) {
boolean hasTask = false;
JSONArray taskAttrs = null;
@ -735,10 +734,8 @@ public class UpdateAdapter extends CursorAdapter {
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" };
@SuppressWarnings("nls")
private static String getRepeatString(Context context, String value) {
if (TextUtils.isEmpty(value) || "null".equals(value)) {
return null;
@ -823,7 +820,6 @@ public class UpdateAdapter extends CursorAdapter {
}
}
@SuppressWarnings("nls")
private static String userDisplay(Context context, String historyUserId, JSONObject userJson) {
try {
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 String priorityString(int priority) {
return PRIORITY_STRINGS[priority];

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

@ -16,7 +16,6 @@ import android.os.Environment;
* @author Tim Su <tim@todoroo.com>
*
*/
@SuppressWarnings("nls")
public class BackupConstants {
// 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>
*
*/
@SuppressWarnings("nls")
public class BackupDateUtilities {
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 com.todoroo.andlib.utility.AndroidUtilities;
@SuppressWarnings("nls")
public class FilePickerBuilder extends AlertDialog.Builder implements DialogInterface.OnClickListener {
public interface OnFilePickedListener {

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

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

@ -23,7 +23,6 @@ import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.Preferences;
@SuppressWarnings("nls")
public class PhoneStateChangedReceiver extends BroadcastReceiver {
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