* Remove FileMetadata, ContactsAutoComplete, ContactListAdapter
* Remove unnecessary overrides
* Remove invalid javadoc
pull/46/head
Alex Baker 12 years ago
parent 11523d454d
commit e137484b4e

@ -66,8 +66,6 @@ abstract public class AbstractDatabase {
/** /**
* Upgrades an open database from one version to the next * Upgrades an open database from one version to the next
* @param oldVersion
* @param newVersion
* @return true if upgrade was handled, false otherwise * @return true if upgrade was handled, false otherwise
*/ */
protected abstract boolean onUpgrade(int oldVersion, int newVersion); protected abstract boolean onUpgrade(int oldVersion, int newVersion);
@ -120,8 +118,6 @@ abstract public class AbstractDatabase {
/** /**
* Return the name of the table containing these models * Return the name of the table containing these models
* @param modelType
* @return
*/ */
public final Table getTable(Class<? extends AbstractModel> modelType) { public final Table getTable(Class<? extends AbstractModel> modelType) {
for(Table table : getTables()) { for(Table table : getTables()) {

@ -270,7 +270,6 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
} }
/** /**
* @param property
* @return true if setValues or values contains this property * @return true if setValues or values contains this property
*/ */
public boolean containsValue(Property<?> property) { public boolean containsValue(Property<?> property) {
@ -284,7 +283,6 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
} }
/** /**
* @param property
* @return true if setValues or values contains this property, and the value * @return true if setValues or values contains this property, and the value
* stored is not null * stored is not null
*/ */
@ -371,7 +369,6 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
/** /**
* Clear the key for the given property * Clear the key for the given property
* @param property
*/ */
public synchronized void clearValue(Property<?> property) { public synchronized void clearValue(Property<?> property) {
if(setValues != null && setValues.containsKey(property.getColumnName())) { if(setValues != null && setValues.containsKey(property.getColumnName())) {
@ -384,9 +381,6 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
/** /**
* Sets the state of the given flag on the given property * Sets the state of the given flag on the given property
* @param property
* @param flag
* @param value
*/ */
public void setFlag(IntegerProperty property, int flag, boolean value) { public void setFlag(IntegerProperty property, int flag, boolean value) {
if(value) { if(value) {

@ -5,10 +5,6 @@
*/ */
package com.todoroo.andlib.data; package com.todoroo.andlib.data;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Set;
import android.content.ContentResolver; import android.content.ContentResolver;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
@ -22,6 +18,10 @@ import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Query; import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.AndroidUtilities;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Set;
/** /**
* DAO for reading and writing values from an Android ContentResolver * DAO for reading and writing values from an Android ContentResolver
@ -57,8 +57,6 @@ public class ContentResolverDao<TYPE extends AbstractModel> {
/** /**
* Returns a URI for a single id * Returns a URI for a single id
* @param id
* @return
*/ */
private Uri uriWithId(long id) { private Uri uriWithId(long id) {
return Uri.withAppendedPath(baseUri, Long.toString(id)); return Uri.withAppendedPath(baseUri, Long.toString(id));
@ -66,7 +64,6 @@ public class ContentResolverDao<TYPE extends AbstractModel> {
/** /**
* Delete specific item from the given table * Delete specific item from the given table
* @param id
* @return number of rows affected * @return number of rows affected
*/ */
public int delete(long id) { public int delete(long id) {
@ -75,7 +72,6 @@ public class ContentResolverDao<TYPE extends AbstractModel> {
/** /**
* Delete by criteria * Delete by criteria
* @param where
* @return number of rows affected * @return number of rows affected
*/ */
public int deleteWhere(Criterion where) { public int deleteWhere(Criterion where) {
@ -84,8 +80,6 @@ public class ContentResolverDao<TYPE extends AbstractModel> {
/** /**
* Query content provider * Query content provider
* @param query
* @return
*/ */
public TodorooCursor<TYPE> query(Query query) { public TodorooCursor<TYPE> query(Query query) {
if(debug) { if(debug) {
@ -97,7 +91,6 @@ public class ContentResolverDao<TYPE extends AbstractModel> {
/** /**
* Create new or save existing model * Create new or save existing model
* @param model
* @return true if data was written to the db, false otherwise * @return true if data was written to the db, false otherwise
*/ */
public boolean save(TYPE model) { public boolean save(TYPE model) {
@ -133,9 +126,6 @@ public class ContentResolverDao<TYPE extends AbstractModel> {
/** /**
* Returns object corresponding to the given identifier * Returns object corresponding to the given identifier
* *
* @param database
* @param table
* name of table
* @param properties * @param properties
* properties to read * properties to read
* @param id * @param id

@ -76,8 +76,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Sets database accessed by this DAO. Used for dependency-injected * Sets database accessed by this DAO. Used for dependency-injected
* initialization by child classes and unit tests * initialization by child classes and unit tests
*
* @param database
*/ */
public void setDatabase(AbstractDatabase database) { public void setDatabase(AbstractDatabase database) {
if(database == this.database) { if(database == this.database) {
@ -112,9 +110,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Construct a query with SQL DSL objects * Construct a query with SQL DSL objects
*
* @param query
* @return
*/ */
public TodorooCursor<TYPE> query(Query query) { public TodorooCursor<TYPE> query(Query query) {
query.from(table); query.from(table);
@ -127,11 +122,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Construct a query with raw SQL * Construct a query with raw SQL
*
* @param properties
* @param selection
* @param selectionArgs
* @return
*/ */
public TodorooCursor<TYPE> rawQuery(String selection, String[] selectionArgs, Property<?>... properties) { public TodorooCursor<TYPE> rawQuery(String selection, String[] selectionArgs, Property<?>... properties) {
String[] fields = new String[properties.length]; String[] fields = new String[properties.length];
@ -145,10 +135,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Returns object corresponding to the given identifier * Returns object corresponding to the given identifier
*
* @param database
* @param table
* name of table
* @param properties * @param properties
* properties to read * properties to read
* @param id * @param id
@ -186,9 +172,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Delete the given id * Delete the given id
*
* @param database
* @param id
* @return true if delete was successful * @return true if delete was successful
*/ */
public boolean delete(long id) { public boolean delete(long id) {
@ -346,10 +329,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Creates the given item. * Creates the given item.
*
* @param database
* @param table
* table name
* @param item * @param item
* item model * item model
* @return returns true on success. * @return returns true on success.
@ -374,10 +353,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Saves the given item. Will not create a new item! * Saves the given item. Will not create a new item!
*
* @param database
* @param table
* table name
* @param item * @param item
* item model * item model
* @return returns true on success. * @return returns true on success.
@ -427,8 +402,6 @@ public class DatabaseDao<TYPE extends AbstractModel> {
* Returns true if an entry in the outstanding table should be recorded for this * Returns true if an entry in the outstanding table should be recorded for this
* column. Subclasses can override to return false for insignificant columns * column. Subclasses can override to return false for insignificant columns
* (e.g. Task.DETAILS, last modified, etc.) * (e.g. Task.DETAILS, last modified, etc.)
* @param columnName
* @return
*/ */
protected boolean shouldRecordOutstandingEntry(String columnName, Object value) { protected boolean shouldRecordOutstandingEntry(String columnName, Object value) {
return true; return true;
@ -439,15 +412,10 @@ public class DatabaseDao<TYPE extends AbstractModel> {
/** /**
* Returns cursor to object corresponding to the given identifier * Returns cursor to object corresponding to the given identifier
*
* @param database
* @param table
* name of table
* @param properties * @param properties
* properties to read * properties to read
* @param id * @param id
* id of item * id of item
* @return
*/ */
protected TodorooCursor<TYPE> fetchItem(long id, Property<?>... properties) { protected TodorooCursor<TYPE> fetchItem(long id, Property<?>... properties) {
TodorooCursor<TYPE> cursor = query( TodorooCursor<TYPE> cursor = query(

@ -60,8 +60,6 @@ public final class Table extends SqlTable {
/** /**
* Create a field object based on the given property * Create a field object based on the given property
* @param property
* @return
*/ */
public Field field(Property<?> property) { public Field field(Property<?> property) {
if(alias != null) { if(alias != null) {

@ -40,7 +40,6 @@ public class TodorooCursor<TYPE extends AbstractModel> extends CursorWrapper {
* Create an <code>AstridCursor</code> from the supplied {@link Cursor} * Create an <code>AstridCursor</code> from the supplied {@link Cursor}
* object. * object.
* *
* @param cursor
* @param properties properties read from this cursor * @param properties properties read from this cursor
*/ */
public TodorooCursor(Cursor cursor, Property<?>[] properties) { public TodorooCursor(Cursor cursor, Property<?>[] properties) {
@ -56,7 +55,6 @@ public class TodorooCursor<TYPE extends AbstractModel> extends CursorWrapper {
* *
* @param <PROPERTY_TYPE> type to return * @param <PROPERTY_TYPE> type to return
* @param property to retrieve * @param property to retrieve
* @return
*/ */
public <PROPERTY_TYPE> PROPERTY_TYPE get(Property<PROPERTY_TYPE> property) { public <PROPERTY_TYPE> PROPERTY_TYPE get(Property<PROPERTY_TYPE> property) {
return (PROPERTY_TYPE)property.accept(reader, this); return (PROPERTY_TYPE)property.accept(reader, this);
@ -71,7 +69,6 @@ public class TodorooCursor<TYPE extends AbstractModel> extends CursorWrapper {
/** /**
* Gets entire property list * Gets entire property list
* @return
*/ */
public Property<?>[] getProperties() { public Property<?>[] getProperties() {
return properties; return properties;

@ -24,8 +24,6 @@ public final class ContextManager {
/** /**
* Sets the global context * Sets the global context
*
* @param context
*/ */
public static void setContext(Context context) { public static void setContext(Context context) {
if(context == null || context.getApplicationContext() == null) { if(context == null || context.getApplicationContext() == null) {
@ -48,7 +46,6 @@ public final class ContextManager {
* Convenience method to read a string from the resources * Convenience method to read a string from the resources
* *
* @param resId resource * @param resId resource
* @param parameters % arguments
* @return resource string * @return resource string
*/ */
public static String getString(int resId, Object... formatArgs) { public static String getString(int resId, Object... formatArgs) {

@ -145,7 +145,6 @@ public class DependencyInjectionService {
/** /**
* Gets the singleton instance of the dependency injection service. * Gets the singleton instance of the dependency injection service.
* @return
*/ */
public synchronized static DependencyInjectionService getInstance() { public synchronized static DependencyInjectionService getInstance() {
if(instance == null) { if(instance == null) {
@ -156,7 +155,6 @@ public class DependencyInjectionService {
/** /**
* Removes the supplied injector * Removes the supplied injector
* @return
*/ */
public synchronized void removeInjector(AbstractDependencyInjector injector) { public synchronized void removeInjector(AbstractDependencyInjector injector) {
injectors.remove(injector); injectors.remove(injector);
@ -164,7 +162,6 @@ public class DependencyInjectionService {
/** /**
* Adds a Dependency Injector to the front of the list * Adds a Dependency Injector to the front of the list
* @param injectors
*/ */
public synchronized void addInjector(AbstractDependencyInjector injector) { public synchronized void addInjector(AbstractDependencyInjector injector) {
removeInjector(injector); removeInjector(injector);

@ -114,9 +114,6 @@ public class ExceptionService {
/** /**
* Report the error to the logs * Report the error to the logs
*
* @param name
* @param error
*/ */
@Override @Override
public void handleError(String name, Throwable error) { public void handleError(String name, Throwable error) {

@ -215,7 +215,6 @@ public class HttpRestClient implements RestClient {
/** /**
* Issue an HTTP POST for the given URL, return the response * Issue an HTTP POST for the given URL, return the response
* *
* @param url
* @param data * @param data
* url-encoded data * url-encoded data
* @throws IOException * @throws IOException

@ -228,7 +228,6 @@ public final class Query {
/** /**
* Gets a list of fields returned by this query * Gets a list of fields returned by this query
* @return
*/ */
public Property<?>[] getFields() { public Property<?>[] getFields() {
return fields.toArray(new Property<?>[fields.size()]); return fields.toArray(new Property<?>[fields.size()]);
@ -236,7 +235,6 @@ public final class Query {
/** /**
* Add the SQL query template (comes after the "from") * Add the SQL query template (comes after the "from")
* @param template
* @return query * @return query
*/ */
public Query withQueryTemplate(String template) { public Query withQueryTemplate(String template) {
@ -246,9 +244,6 @@ public final class Query {
/** /**
* Parse out properties and run query * Parse out properties and run query
* @param cr
* @param baseUri
* @return
*/ */
public Cursor queryContentResolver(ContentResolver cr, Uri baseUri) { public Cursor queryContentResolver(ContentResolver cr, Uri baseUri) {
Uri uri = baseUri; Uri uri = baseUri;

@ -48,8 +48,6 @@ public class UnaryCriterion extends Criterion {
/** /**
* Sanitize the given input for SQL * Sanitize the given input for SQL
* @param input
* @return
*/ */
public static String sanitize(String input) { public static String sanitize(String input) {
return input.replace("'", "''"); return input.replace("'", "''");

@ -5,34 +5,6 @@
*/ */
package com.todoroo.andlib.utility; package com.todoroo.andlib.utility;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.net.URL;
import java.net.URLConnection;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.Activity; import android.app.Activity;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.ContentValues; import android.content.ContentValues;
@ -60,6 +32,34 @@ import android.widget.TextView;
import com.todoroo.andlib.service.ExceptionService; import com.todoroo.andlib.service.ExceptionService;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.net.URL;
import java.net.URLConnection;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
/** /**
* Android Utility Classes * Android Utility Classes
* *
@ -148,9 +148,6 @@ public class AndroidUtilities {
/** /**
* Start the given intent, handling security exceptions if they arise * Start the given intent, handling security exceptions if they arise
*
* @param context
* @param intent
* @param request request code. if negative, no request. * @param request request code. if negative, no request.
*/ */
public static void startExternalIntent(Context context, Intent intent, int request) { public static void startExternalIntent(Context context, Intent intent, int request) {
@ -169,10 +166,6 @@ public class AndroidUtilities {
/** /**
* Start the given intent, handling security exceptions if they arise * Start the given intent, handling security exceptions if they arise
*
* @param activity
* @param intent
* @param requestCode
*/ */
public static void startExternalIntentForResult( public static void startExternalIntentForResult(
Activity activity, Intent intent, int requestCode) { Activity activity, Intent intent, int requestCode) {
@ -187,9 +180,6 @@ public class AndroidUtilities {
/** /**
* Put an arbitrary object into a {@link ContentValues} * Put an arbitrary object into a {@link ContentValues}
* @param target
* @param key
* @param value
*/ */
public static void putInto(ContentValues target, String key, Object value, boolean errorOnFail) { public static void putInto(ContentValues target, String key, Object value, boolean errorOnFail) {
if (value instanceof Boolean) { if (value instanceof Boolean) {
@ -216,9 +206,6 @@ public class AndroidUtilities {
/** /**
* Put an arbitrary object into a {@link ContentValues} * Put an arbitrary object into a {@link ContentValues}
* @param target
* @param key
* @param value
*/ */
public static void putInto(Bundle target, String key, Object value, boolean errorOnFail) { public static void putInto(Bundle target, String key, Object value, boolean errorOnFail) {
if (value instanceof Boolean) { if (value instanceof Boolean) {
@ -262,7 +249,6 @@ public class AndroidUtilities {
* Return index of value in array * Return index of value in array
* @param array array to search * @param array array to search
* @param value value to look for * @param value value to look for
* @return
*/ */
public static <TYPE> int indexOf(TYPE[] array, TYPE value) { public static <TYPE> int indexOf(TYPE[] array, TYPE value) {
for(int i = 0; i < array.length; i++) { for(int i = 0; i < array.length; i++) {
@ -277,7 +263,6 @@ public class AndroidUtilities {
* Return index of value in integer array * Return index of value in integer array
* @param array array to search * @param array array to search
* @param value value to look for * @param value value to look for
* @return
*/ */
public static int indexOf(int[] array, int value) { public static int indexOf(int[] array, int value) {
for (int i = 0; i < array.length; i++) { for (int i = 0; i < array.length; i++) {
@ -337,8 +322,6 @@ public class AndroidUtilities {
/** /**
* Turn ContentValues into a string * Turn ContentValues into a string
* @param string
* @return
*/ */
public static ContentValues contentValuesFromSerializedString(String string) { public static ContentValues contentValuesFromSerializedString(String string) {
if(string == null) { if(string == null) {
@ -373,8 +356,6 @@ public class AndroidUtilities {
/** /**
* Turn {@link android.os.Bundle} into a string * Turn {@link android.os.Bundle} into a string
* @param string
* @return
*/ */
public static Bundle bundleFromSerializedString(String string) { public static Bundle bundleFromSerializedString(String string) {
if(string == null) { if(string == null) {
@ -434,8 +415,6 @@ public class AndroidUtilities {
/** /**
* Turn ContentValues into a string * Turn ContentValues into a string
* @param string
* @return
*/ */
public static ContentValues contentValuesFromString(String string) { public static ContentValues contentValuesFromString(String string) {
if(string == null) { if(string == null) {
@ -464,9 +443,6 @@ public class AndroidUtilities {
/** /**
* Returns true if a and b or null or a.equals(b) * Returns true if a and b or null or a.equals(b)
* @param a
* @param b
* @return
*/ */
public static boolean equals(Object a, Object b) { public static boolean equals(Object a, Object b) {
if(a == null && b == null) { if(a == null && b == null) {
@ -480,9 +456,6 @@ public class AndroidUtilities {
/** /**
* Copy a file from one place to another * Copy a file from one place to another
*
* @param in
* @param out
* @throws Exception * @throws Exception
*/ */
public static void copyFile(File in, File out) throws Exception { public static void copyFile(File in, File out) throws Exception {
@ -500,8 +473,6 @@ public class AndroidUtilities {
/** /**
* Copy stream from source to destination * Copy stream from source to destination
* @param source
* @param dest
* @throws IOException * @throws IOException
*/ */
public static void copyStream(InputStream source, OutputStream dest) throws IOException { public static void copyStream(InputStream source, OutputStream dest) throws IOException {
@ -527,8 +498,6 @@ public class AndroidUtilities {
/** /**
* Find a child view of a certain type * Find a child view of a certain type
* @param view
* @param type
* @return first view (by DFS) if found, or null if none * @return first view (by DFS) if found, or null if none
*/ */
public static <TYPE> TYPE findViewByType(View view, Class<TYPE> type) { public static <TYPE> TYPE findViewByType(View view, Class<TYPE> type) {
@ -559,7 +528,6 @@ public class AndroidUtilities {
/** /**
* Copy databases to a given folder. Useful for debugging * Copy databases to a given folder. Useful for debugging
* @param folder
*/ */
public static void copyDatabases(Context context, String folder) { public static void copyDatabases(Context context, String folder) {
File folderFile = new File(folder); File folderFile = new File(folder);
@ -579,7 +547,6 @@ public class AndroidUtilities {
/** /**
* Sort files by date so the newest file is on top * Sort files by date so the newest file is on top
* @param files
*/ */
public static void sortFilesByDateDesc(File[] files) { public static void sortFilesByDateDesc(File[] files) {
Arrays.sort(files, new Comparator<File>() { Arrays.sort(files, new Comparator<File>() {
@ -592,8 +559,6 @@ public class AndroidUtilities {
/** /**
* Search for the given value in the map, returning key if found * Search for the given value in the map, returning key if found
* @param map
* @param value
* @return null if not found, otherwise key * @return null if not found, otherwise key
*/ */
public static <KEY, VALUE> KEY findKeyInMap(Map<KEY, VALUE> map, VALUE value){ public static <KEY, VALUE> KEY findKeyInMap(Map<KEY, VALUE> map, VALUE value){
@ -608,8 +573,6 @@ public class AndroidUtilities {
/** /**
* Sleep, ignoring interruption. Before using this method, think carefully * Sleep, ignoring interruption. Before using this method, think carefully
* about why you are ignoring interruptions. * about why you are ignoring interruptions.
*
* @param l
*/ */
public static void sleepDeep(long l) { public static void sleepDeep(long l) {
try { try {
@ -680,7 +643,6 @@ public class AndroidUtilities {
/** /**
* Call a method via reflection * Call a method via reflection
* @param class class to call method on
* @param receiver object to call method on (can be null) * @param receiver object to call method on (can be null)
* @param methodName method name to call * @param methodName method name to call
* @param params method parameter types * @param params method parameter types
@ -711,9 +673,6 @@ public class AndroidUtilities {
/** /**
* From Android MyTracks project (http://mytracks.googlecode.com/). * From Android MyTracks project (http://mytracks.googlecode.com/).
* Licensed under the Apache Public License v2 * Licensed under the Apache Public License v2
* @param activity
* @param id
* @return
*/ */
public static CharSequence readFile(Context activity, int id) { public static CharSequence readFile(Context activity, int id) {
BufferedReader in = null; BufferedReader in = null;
@ -764,8 +723,6 @@ public class AndroidUtilities {
/** /**
* Performs an md5 hash on the input string * Performs an md5 hash on the input string
* @param input
* @return
*/ */
public static String md5(String input) { public static String md5(String input) {
try { try {
@ -785,9 +742,6 @@ public class AndroidUtilities {
/** /**
* Create an intent to a remote activity * Create an intent to a remote activity
* @param appPackage
* @param activityClass
* @return
*/ */
public static Intent remoteIntent(String appPackage, String activityClass) { public static Intent remoteIntent(String appPackage, String activityClass) {
Intent intent = new Intent(); Intent intent = new Intent();
@ -811,11 +765,6 @@ public class AndroidUtilities {
/** /**
* Join items to a list * Join items to a list
* @param <TYPE>
* @param list
* @param newList
* @param newItems
* @return
*/ */
public static <T> T[] addToArray(Class<T> type, T[] list, T... newItems) { public static <T> T[] addToArray(Class<T> type, T[] list, T... newItems) {
int originalListLength = 0; int originalListLength = 0;
@ -859,9 +808,6 @@ public class AndroidUtilities {
/** /**
* Concatenate additional stuff to the end of the array * Concatenate additional stuff to the end of the array
* @param params
* @param additional
* @return
*/ */
public static <TYPE> TYPE[] concat(TYPE[] dest, TYPE[] source, TYPE... additional) { public static <TYPE> TYPE[] concat(TYPE[] dest, TYPE[] source, TYPE... additional) {
int i = 0; int i = 0;
@ -879,8 +825,6 @@ public class AndroidUtilities {
* Returns a map where the keys are the values of the map argument * Returns a map where the keys are the values of the map argument
* and the values are the corresponding keys. Use at your own * and the values are the corresponding keys. Use at your own
* risk if your map is not 1-to-1! * risk if your map is not 1-to-1!
* @param map
* @return
*/ */
public static <K, V> Map<V, K> reverseMap(Map<K, V> map) { public static <K, V> Map<V, K> reverseMap(Map<K, V> map) {
HashMap<V, K> reversed = new HashMap<V, K>(); HashMap<V, K> reversed = new HashMap<V, K>();
@ -894,8 +838,6 @@ public class AndroidUtilities {
/** /**
* Capitalize the first character * Capitalize the first character
* @param string
* @return
*/ */
public static String capitalize(String string) { public static String capitalize(String string) {
return string.substring(0, 1).toUpperCase() + string.substring(1); return string.substring(0, 1).toUpperCase() + string.substring(1);
@ -903,7 +845,6 @@ public class AndroidUtilities {
/** /**
* Dismiss the keyboard if it is displayed by any of the listed views * Dismiss the keyboard if it is displayed by any of the listed views
* @param context
* @param views - a list of views that might potentially be displaying the keyboard * @param views - a list of views that might potentially be displaying the keyboard
*/ */
public static void hideSoftInputForViews(Context context, View...views) { public static void hideSoftInputForViews(Context context, View...views) {
@ -915,8 +856,6 @@ public class AndroidUtilities {
/** /**
* Returns true if the screen is large or xtra large * Returns true if the screen is large or xtra large
* @param context
* @return
*/ */
public static boolean isTabletSized(Context context) { public static boolean isTabletSized(Context context) {
if (context.getPackageManager().hasSystemFeature("com.google.android.tv")) //$NON-NLS-1$ if (context.getPackageManager().hasSystemFeature("com.google.android.tv")) //$NON-NLS-1$
@ -948,8 +887,6 @@ public class AndroidUtilities {
/** /**
* Wraps a call to Activity.unregisterReceiver in a try/catch block to prevent * Wraps a call to Activity.unregisterReceiver in a try/catch block to prevent
* exceptions being thrown if receiver was never registered with that activity * exceptions being thrown if receiver was never registered with that activity
* @param activity
* @param receiver
*/ */
public static void tryUnregisterReceiver(Activity activity, BroadcastReceiver receiver) { public static void tryUnregisterReceiver(Activity activity, BroadcastReceiver receiver) {
try { try {
@ -961,9 +898,6 @@ public class AndroidUtilities {
/** /**
* Dismiss a popup window (should call from main thread) * Dismiss a popup window (should call from main thread)
*
* @param activity
* @param popup
*/ */
public static void tryDismissPopup(Activity activity, final PopupWindow popup) { public static void tryDismissPopup(Activity activity, final PopupWindow popup) {
if (popup == null) { if (popup == null) {
@ -1000,8 +934,6 @@ public class AndroidUtilities {
/** /**
* Returns the final word characters after the last '.' * Returns the final word characters after the last '.'
* @param file
* @return
*/ */
public static String getFileExtension(String file) { public static String getFileExtension(String file) {
int index = file.lastIndexOf('.'); int index = file.lastIndexOf('.');

@ -21,10 +21,6 @@ public class DialogUtilities {
/** /**
* Displays a dialog box with a EditText and an ok / cancel * Displays a dialog box with a EditText and an ok / cancel
*
* @param activity
* @param text
* @param okListener
*/ */
public static void viewDialog(final Activity activity, final String text, public static void viewDialog(final Activity activity, final String text,
final View view, final DialogInterface.OnClickListener okListener, final View view, final DialogInterface.OnClickListener okListener,
@ -50,10 +46,6 @@ public class DialogUtilities {
/** /**
* Display an OK dialog with HTML content * Display an OK dialog with HTML content
*
* @param context
* @param html
* @param title
*/ */
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);
@ -70,10 +62,6 @@ public class DialogUtilities {
/** /**
* Displays a dialog box with an OK button * Displays a dialog box with an OK button
*
* @param activity
* @param text
* @param okListener
*/ */
public static void okDialog(final Activity activity, final String text, public static void okDialog(final Activity activity, final String text,
final DialogInterface.OnClickListener okListener) { final DialogInterface.OnClickListener okListener) {
@ -96,10 +84,6 @@ public class DialogUtilities {
/** /**
* Displays a dialog box with an OK button * Displays a dialog box with an OK button
*
* @param activity
* @param text
* @param okListener
*/ */
public static void okDialog(final Activity activity, final String title, public static void okDialog(final Activity activity, final String title,
final int icon, final CharSequence text, final int icon, final CharSequence text,
@ -123,12 +107,6 @@ public class DialogUtilities {
/** /**
* Displays a dialog box with OK and Cancel buttons and custom title * Displays a dialog box with OK and Cancel buttons and custom title
*
* @param activity
* @param title
* @param text
* @param okListener
* @param cancelListener
*/ */
public static void okCancelDialog(final Activity activity, final String title, public static void okCancelDialog(final Activity activity, final String title,
final String text, final DialogInterface.OnClickListener okListener, final String text, final DialogInterface.OnClickListener okListener,
@ -139,11 +117,6 @@ public class DialogUtilities {
/** /**
* Displays a dialog box with OK and Cancel buttons * Displays a dialog box with OK and Cancel buttons
*
* @param activity
* @param text
* @param okListener
* @param cancelListener
*/ */
public static void okCancelDialog(final Activity activity, final String text, public static void okCancelDialog(final Activity activity, final String text,
final DialogInterface.OnClickListener okListener, final DialogInterface.OnClickListener okListener,
@ -203,9 +176,6 @@ public class DialogUtilities {
/** /**
* Displays a progress dialog. Must be run on the UI thread * Displays a progress dialog. Must be run on the UI thread
* @param context
* @param text
* @return
*/ */
public static ProgressDialog progressDialog(Activity context, String text) { public static ProgressDialog progressDialog(Activity context, String text) {
ProgressDialog dialog = new ProgressDialog(context); ProgressDialog dialog = new ProgressDialog(context);
@ -219,9 +189,6 @@ public class DialogUtilities {
/** /**
* Dismiss a dialog off the UI thread * Dismiss a dialog off the UI thread
*
* @param activity
* @param dialog
*/ */
public static void dismissDialog(Activity activity, final Dialog dialog) { public static void dismissDialog(Activity activity, final Dialog dialog) {
if(dialog == null) { if(dialog == null) {

@ -24,12 +24,6 @@ public class Preferences {
/** /**
* Helper to write to editor if key specified is null. Writes a String * Helper to write to editor if key specified is null. Writes a String
* property with the given integer * property with the given integer
*
* @param prefs
* @param editor
* @param r
* @param keyResource
* @param value
*/ */
public static void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, int value) { public static void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, int value) {
String key = r.getString(keyResource); String key = r.getString(keyResource);
@ -40,11 +34,6 @@ public class Preferences {
/** /**
* Helper to write to editor if key specified is null * Helper to write to editor if key specified is null
* @param prefs
* @param editor
* @param r
* @param keyResource
* @param value
*/ */
public static void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, boolean value) { public static void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, boolean value) {
String key = r.getString(keyResource); String key = r.getString(keyResource);
@ -55,11 +44,6 @@ public class Preferences {
/** /**
* Helper to write to editor if key specified is null * Helper to write to editor if key specified is null
* @param prefs
* @param editor
* @param r
* @param keyResource
* @param value
*/ */
public static void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, String value) { public static void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, String value) {
String key = r.getString(keyResource); String key = r.getString(keyResource);
@ -105,9 +89,6 @@ public class Preferences {
/** Gets an string value from a string preference. Returns null /** Gets an string value from a string preference. Returns null
* if the value is not set * if the value is not set
*
* @param context
* @param key
* @return integer value, or null on error * @return integer value, or null on error
*/ */
public static String getStringValue(String key) { public static String getStringValue(String key) {
@ -117,9 +98,6 @@ public class Preferences {
/** Gets an string value from a string preference. Returns null /** Gets an string value from a string preference. Returns null
* if the value is not set * if the value is not set
*
* @param context
* @param key
* @return integer value, or null on error * @return integer value, or null on error
*/ */
public static String getStringValue(int keyResource) { public static String getStringValue(int keyResource) {
@ -152,7 +130,6 @@ public class Preferences {
* if the value is not set or not an flat. * if the value is not set or not an flat.
* *
* @param keyResource resource from string.xml * @param keyResource resource from string.xml
* @return
*/ */
public static Float getFloatFromString(int keyResource) { public static Float getFloatFromString(int keyResource) {
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();
@ -197,9 +174,6 @@ public class Preferences {
// --- preference fetching (boolean) // --- preference fetching (boolean)
/** Gets a boolean preference (e.g. a CheckBoxPreference setting) /** Gets a boolean preference (e.g. a CheckBoxPreference setting)
*
* @param key
* @param defValue
* @return default if value is unset otherwise the value * @return default if value is unset otherwise the value
*/ */
public static boolean getBoolean(String key, boolean defValue) { public static boolean getBoolean(String key, boolean defValue) {
@ -212,9 +186,6 @@ public class Preferences {
} }
/** Gets a boolean preference (e.g. a CheckBoxPreference setting) /** Gets a boolean preference (e.g. a CheckBoxPreference setting)
*
* @param keyResource
* @param defValue
* @return default if value is unset otherwise the value * @return default if value is unset otherwise the value
*/ */
public static boolean getBoolean(int keyResources, boolean defValue) { public static boolean getBoolean(int keyResources, boolean defValue) {
@ -223,8 +194,6 @@ public class Preferences {
/** /**
* Sets boolean preference * Sets boolean preference
* @param key
* @param value
*/ */
public static void setBoolean(int keyResource, boolean value) { public static void setBoolean(int keyResource, boolean value) {
setBoolean(ContextManager.getString(keyResource), value); setBoolean(ContextManager.getString(keyResource), value);
@ -232,8 +201,6 @@ public class Preferences {
/** /**
* Sets boolean preference * Sets boolean preference
* @param key
* @param value
*/ */
public static void setBoolean(String key, boolean value) { public static void setBoolean(String key, boolean value) {
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();
@ -245,9 +212,6 @@ public class Preferences {
// --- preference fetching (int) // --- preference fetching (int)
/** Gets a int preference /** Gets a int preference
*
* @param key
* @param defValue
* @return default if value is unset otherwise the value * @return default if value is unset otherwise the value
*/ */
public static int getInt(String key, int defValue) { public static int getInt(String key, int defValue) {
@ -257,8 +221,6 @@ public class Preferences {
/** /**
* Sets int preference * Sets int preference
* @param key
* @param value
*/ */
public static void setInt(String key, int value) { public static void setInt(String key, int value) {
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();
@ -270,9 +232,6 @@ public class Preferences {
// --- preference fetching (long) // --- preference fetching (long)
/** Gets a long preference /** Gets a long preference
*
* @param key
* @param defValue
* @return default if value is unset otherwise the value * @return default if value is unset otherwise the value
*/ */
public static long getLong(String key, long defValue) { public static long getLong(String key, long defValue) {
@ -282,8 +241,6 @@ public class Preferences {
/** /**
* Sets long preference * Sets long preference
* @param key
* @param value
*/ */
public static void setLong(String key, long value) { public static void setLong(String key, long value) {
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();
@ -294,7 +251,6 @@ public class Preferences {
/** /**
* Clears a preference * Clears a preference
* @param key
*/ */
public static void clear(String key) { public static void clear(String key) {
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();

@ -39,7 +39,6 @@ abstract public class TodorooPreferenceActivity extends PreferenceActivity {
/** /**
* Update preferences for the given preference * Update preferences for the given preference
* @param preference
* @param value setting. may be null. * @param value setting. may be null.
*/ */
public abstract void updatePreferences(Preference preference, Object value); public abstract void updatePreferences(Preference preference, Object value);

@ -39,11 +39,6 @@ public class Addon implements Parcelable {
/** /**
* Convenience constructor to generate a plug-in object * Convenience constructor to generate a plug-in object
*
* @param addon
* @param title
* @param author
* @param description
*/ */
public Addon(String addon, String title, String author, String description) { public Addon(String addon, String title, String author, String description) {
this.addon = addon; this.addon = addon;

@ -6,7 +6,7 @@
package com.todoroo.astrid.api; package com.todoroo.astrid.api;
/** /**
* Common interface for Astrids filter-exposers to provide their {@link FilterListitem}-instances. * Common interface for Astrids filter-exposers to provide their FilterListitem instances.
* *
* @author Arne Jans * @author Arne Jans
*/ */

@ -81,8 +81,6 @@ public class Filter extends FilterListItem {
* filter, e.g. Inbox (20 tasks) * filter, e.g. Inbox (20 tasks)
* @param sqlQuery * @param sqlQuery
* SQL query for this list (see {@link #sqlQuery} for examples). * SQL query for this list (see {@link #sqlQuery} for examples).
* @param valuesForNewTasks
* see {@link #sqlForNewTasks}
*/ */
public Filter(String listingTitle, String title, public Filter(String listingTitle, String title,
QueryTemplate sqlQuery, ContentValues valuesForNewTasks) { QueryTemplate sqlQuery, ContentValues valuesForNewTasks) {
@ -99,8 +97,6 @@ public class Filter extends FilterListItem {
* filter, e.g. Inbox (20 tasks) * filter, e.g. Inbox (20 tasks)
* @param sqlQuery * @param sqlQuery
* SQL query for this list (see {@link #sqlQuery} for examples). * SQL query for this list (see {@link #sqlQuery} for examples).
* @param valuesForNewTasks
* see {@link #sqlForNewTasks}
*/ */
public Filter(String listingTitle, String title, public Filter(String listingTitle, String title,
String sqlQuery, ContentValues valuesForNewTasks) { String sqlQuery, ContentValues valuesForNewTasks) {
@ -128,9 +124,6 @@ public class Filter extends FilterListItem {
/** /**
* Utility constructor * Utility constructor
*
* @param plugin
* {@link Addon} identifier that encompasses object
*/ */
protected Filter() { protected Filter() {
// do nothing // do nothing
@ -230,7 +223,6 @@ public class Filter extends FilterListItem {
}; };
/** /**
* @param title
* @return a filter that matches nothing * @return a filter that matches nothing
*/ */
public static Filter emptyFilter(String title) { public static Filter emptyFilter(String title) {

@ -36,9 +36,6 @@ public class FilterCategory extends FilterListItem {
/** /**
* Constructor for creating a new FilterCategory * Constructor for creating a new FilterCategory
*
* @param plugin
* {@link Addon} identifier that encompasses object
*/ */
protected FilterCategory() { protected FilterCategory() {
// //

@ -41,9 +41,6 @@ public class FilterCategoryWithNewButton extends FilterCategory {
/** /**
* Constructor for creating a new FilterCategory * Constructor for creating a new FilterCategory
*
* @param plugin
* {@link Addon} identifier that encompasses object
*/ */
protected FilterCategoryWithNewButton() { protected FilterCategoryWithNewButton() {
// //

@ -18,9 +18,6 @@ public class FilterListHeader extends FilterListItem {
/** /**
* Constructor for creating a new FilterListHeader * Constructor for creating a new FilterListHeader
* @param listingTitle
* @param listingIconResource
* @param priority
*/ */
public FilterListHeader(String listingTitle) { public FilterListHeader(String listingTitle) {
this.listingTitle = listingTitle; this.listingTitle = listingTitle;
@ -28,9 +25,6 @@ public class FilterListHeader extends FilterListItem {
/** /**
* Constructor for creating a new FilterListHeader * Constructor for creating a new FilterListHeader
*
* @param plugin
* {@link Addon} identifier that encompasses object
*/ */
protected FilterListHeader() { protected FilterListHeader() {
// //
@ -43,11 +37,6 @@ public class FilterListHeader extends FilterListItem {
return 0; return 0;
} }
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
public static final Parcelable.Creator<FilterListHeader> CREATOR = new Parcelable.Creator<FilterListHeader>() { public static final Parcelable.Creator<FilterListHeader> CREATOR = new Parcelable.Creator<FilterListHeader>() {
@Override @Override

@ -64,8 +64,6 @@ abstract public class FilterListItem implements Parcelable {
/** /**
* Utility method to read FilterListItem properties from a parcel. * Utility method to read FilterListItem properties from a parcel.
*
* @param source
*/ */
public void readFromParcel(Parcel source) { public void readFromParcel(Parcel source) {
listingTitle = source.readString(); listingTitle = source.readString();

@ -32,14 +32,6 @@ public class MultipleSelectCriterion extends CustomFilterCriterion implements Pa
/** /**
* Create a new CustomFilterCriteria object * Create a new CustomFilterCriteria object
*
* @param title
* @param sql
* @param valuesForNewTasks
* @param entryTitles
* @param entryValues
* @param icon
* @param name
*/ */
public MultipleSelectCriterion(String identifier, String title, String sql, public MultipleSelectCriterion(String identifier, String title, String sql,
ContentValues valuesForNewTasks, String[] entryTitles, ContentValues valuesForNewTasks, String[] entryTitles,

@ -41,8 +41,6 @@ public class TaskAction {
* *
* @param text * @param text
* label to display * label to display
* @param intent
* intent to invoke. {@link #EXTRAS_TASK_ID} will be passed
*/ */
public TaskAction(String text, PendingIntent intent, BitmapDrawable icon) { public TaskAction(String text, PendingIntent intent, BitmapDrawable icon) {
super(); super();

@ -45,8 +45,6 @@ public final class TaskDecoration implements Parcelable {
/** /**
* Creates a TaskDetail object * Creates a TaskDetail object
* @param text
* text to display
* @param color * @param color
* color to use for text. Use <code>0</code> for default color * color to use for text. Use <code>0</code> for default color
*/ */

@ -32,15 +32,6 @@ public class TextInputCriterion extends CustomFilterCriterion implements Parcela
/** /**
* Create a new CustomFilterCriteria object * Create a new CustomFilterCriteria object
*
* @param identifier
* @param title
* @param sql
* @param valuesForNewTasks
* @param prompt
* @param hint
* @param icon
* @param name
*/ */
public TextInputCriterion(String identifier, String title, String sql, public TextInputCriterion(String identifier, String title, String sql,
ContentValues valuesForNewTasks, String prompt, String hint, ContentValues valuesForNewTasks, String prompt, String hint,

@ -45,14 +45,6 @@ public class SearchFilter extends FilterListItem {
return 0; return 0;
} }
/**
* {@inheritDoc}
*/
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
/** /**
* Parcelable creator * Parcelable creator
*/ */

@ -40,10 +40,6 @@ public class SortHelper {
/** /**
* Takes a SQL query, and if there isn't already an order, creates an order. * Takes a SQL query, and if there isn't already an order, creates an order.
* @param originalSql
* @param flags
* @param sort
* @return
*/ */
public static String adjustQueryForFlagsAndSort(String originalSql, int flags, int sort) { public static String adjustQueryForFlagsAndSort(String originalSql, int flags, int sort) {
// sort // sort
@ -120,7 +116,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
*/ */
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),

@ -482,7 +482,6 @@ public final class Task extends RemoteModel {
* one of the HIDE_UNTIL_* constants * one of the HIDE_UNTIL_* constants
* @param customDate * @param customDate
* if specific day is set, this value * if specific day is set, this value
* @return
*/ */
public long createHideUntil(int setting, long customDate) { public long createHideUntil(int setting, long customDate) {
long date; long date;

@ -112,7 +112,6 @@ public class TaskApiDao extends ContentResolverDao<Task> {
/** /**
* Count tasks matching criterion * Count tasks matching criterion
* @param criterion
* @return # of tasks matching * @return # of tasks matching
*/ */
public int countTasks(Criterion criterion) { public int countTasks(Criterion criterion) {
@ -126,7 +125,6 @@ public class TaskApiDao extends ContentResolverDao<Task> {
/** /**
* Count tasks matching query tepmlate * Count tasks matching query tepmlate
* @param queryTemplate
* @return # of tasks matching * @return # of tasks matching
*/ */
public int countTasks(String queryTemplate) { public int countTasks(String queryTemplate) {

@ -25,7 +25,6 @@ public class SyncContainer {
/** /**
* Check if the metadata contains anything with the given key * Check if the metadata contains anything with the given key
* @param key
* @return first match. or null * @return first match. or null
*/ */
public Metadata findMetadata(String key) { public Metadata findMetadata(String key) {

@ -5,12 +5,6 @@
*/ */
package com.todoroo.astrid.sync; package com.todoroo.astrid.sync;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import android.app.Activity; import android.app.Activity;
import android.app.Notification; import android.app.Notification;
import android.content.Context; import android.content.Context;
@ -24,9 +18,16 @@ import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService; import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.service.NotificationManager; import com.todoroo.andlib.service.NotificationManager;
import com.todoroo.andlib.utility.DialogUtilities; import com.todoroo.andlib.utility.DialogUtilities;
import org.tasks.api.R;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import org.tasks.api.R;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
/** /**
* A helper class for writing synchronization services for Astrid. This class * A helper class for writing synchronization services for Astrid. This class
* contains logic for merging incoming changes and writing outgoing changes. * contains logic for merging incoming changes and writing outgoing changes.
@ -69,8 +70,6 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
/** /**
* Updates the text of a notification and the intent to open when tapped * Updates the text of a notification and the intent to open when tapped
* @param context
* @param notification
* @return notification id (in Android, there is at most one notification * @return notification id (in Android, there is at most one notification
* in the tray for a given id) * in the tray for a given id)
*/ */
@ -90,7 +89,7 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
* *
* @param task * @param task
* task proxy to push * task proxy to push
* @param remoteTask * @param remote
* remote task that we merged with. may be null * remote task that we merged with. may be null
* @return task pulled on remote server * @return task pulled on remote server
*/ */
@ -107,16 +106,12 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
/** /**
* Reads a task container from a task in the database * Reads a task container from a task in the database
*
* @param task
*/ */
abstract protected TYPE read(TodorooCursor<Task> task) throws IOException; abstract protected TYPE read(TodorooCursor<Task> task) throws IOException;
/** /**
* Save task. Used to save local tasks that have been updated and remote * Save task. Used to save local tasks that have been updated and remote
* tasks that need to be created locally * tasks that need to be created locally
*
* @param task
*/ */
abstract protected void write(TYPE task) throws IOException; abstract protected void write(TYPE task) throws IOException;
@ -152,7 +147,6 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
/** /**
* Synchronize this provider with sync toast * Synchronize this provider with sync toast
* @param context
*/ */
public void synchronize(final Context context) { public void synchronize(final Context context) {
synchronize(context, true); synchronize(context, true);
@ -160,7 +154,6 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
/** /**
* Synchronize this provider * Synchronize this provider
* @param context
* @param showSyncToast should we toast to indicate synchronizing? * @param showSyncToast should we toast to indicate synchronizing?
*/ */
public void synchronize(final Context context, final boolean showSyncToast) { public void synchronize(final Context context, final boolean showSyncToast) {
@ -379,13 +372,10 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
* Deal with a synchronization exception. If requested, will show an error * Deal with a synchronization exception. If requested, will show an error
* to the user (unless synchronization is happening in background) * to the user (unless synchronization is happening in background)
* *
* @param context
* @param tag * @param tag
* error tag * error tag
* @param e * @param e
* exception * exception
* @param showError
* whether to display a dialog
*/ */
protected void handleException(String tag, Exception e, boolean displayError) { protected void handleException(String tag, Exception e, boolean displayError) {
final Context context = ContextManager.getContext(); final Context context = ContextManager.getContext();

@ -94,11 +94,6 @@ abstract public class SyncProviderPreferences extends TodorooPreferenceActivity
}); });
} }
/**
*
* @param resource
* if null, updates all resources
*/
@Override @Override
public void updatePreferences(Preference preference, Object value) { public void updatePreferences(Preference preference, Object value) {
final Resources r = getResources(); final Resources r = getResources();

@ -136,14 +136,9 @@ abstract public class SyncProviderUtilities {
String lastError = getLastError(); String lastError = getLastError();
if (!TextUtils.isEmpty(lastError)) { if (!TextUtils.isEmpty(lastError)) {
String type = getLastErrorType(); String type = getLastErrorType();
reportLastErrorImpl(lastError, type);
} }
} }
protected void reportLastErrorImpl(String lastError, String type) {
// Subclasses can override if necessary
}
/** Set Last Attempted Sync Date */ /** Set Last Attempted Sync Date */
public void recordSyncStart() { public void recordSyncStart() {
Editor editor = getPrefs().edit(); Editor editor = getPrefs().edit();

@ -8,13 +8,11 @@ package com.todoroo.astrid.sync;
public interface SyncResultCallback { public interface SyncResultCallback {
/** /**
* Increment max sync progress * Increment max sync progress
* @param incrementBy
*/ */
public void incrementMax(int incrementBy); public void incrementMax(int incrementBy);
/** /**
* Increment current sync progress * Increment current sync progress
* @param incrementBy
*/ */
public void incrementProgress(int incrementBy); public void incrementProgress(int incrementBy);

@ -41,7 +41,6 @@ public class TestDependencyInjector extends AbstractDependencyInjector {
/** /**
* Remove an installed TestDependencyInjector * Remove an installed TestDependencyInjector
* @param string
*/ */
public static void deinitialize(TestDependencyInjector instance) { public static void deinitialize(TestDependencyInjector instance) {
DependencyInjectionService.getInstance().removeInjector(instance); DependencyInjectionService.getInstance().removeInjector(instance);

@ -1,30 +0,0 @@
/**
* Copyright (c) 2012 Todoroo Inc
*
* See the file "LICENSE" for the full license governing this code.
*/
package com.todoroo.andlib.test;
/**
* Utility methods used in unit tests
*
* @author Tim Su <tim@todoroo.com>
*
*/
public class TestUtilities {
/**
* Sleep, suppressing exceptions
*
* @param millis
*/
public static void sleepDeep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
// do nothing
}
}
}

@ -45,7 +45,6 @@ public class TodorooTestCase extends AndroidTestCase {
/** /**
* Loop through each locale and call runnable * Loop through each locale and call runnable
* @param r
*/ */
public void forEachLocale(Runnable r) { public void forEachLocale(Runnable r) {
Locale[] locales = Locale.getAvailableLocales(); Locale[] locales = Locale.getAvailableLocales();
@ -58,7 +57,6 @@ public class TodorooTestCase extends AndroidTestCase {
/** /**
* Sets locale * Sets locale
* @param locale
*/ */
private void setLocale(Locale locale) { private void setLocale(Locale locale) {
Locale.setDefault(locale); Locale.setDefault(locale);

@ -16,9 +16,10 @@
package com.todoroo.astrid; package com.todoroo.astrid;
import android.test.suitebuilder.TestSuiteBuilder;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import android.test.suitebuilder.TestSuiteBuilder;
/** /**
* A test suite containing all tests for ApiDemos. * A test suite containing all tests for ApiDemos.
@ -32,12 +33,12 @@ import android.test.suitebuilder.TestSuiteBuilder;
* -e class com.example.android.apis.AllTests \ * -e class com.example.android.apis.AllTests \
* com.example.android.apis.tests/android.test.InstrumentationTestRunner * com.example.android.apis.tests/android.test.InstrumentationTestRunner
* *
* To run an individual test case, e.g. {@link com.example.android.apis.os.MorseCodeConverterTest}: * To run an individual test case, e.g. com.example.android.apis.os.MorseCodeConverterTest:
* $ adb shell am instrument -w \ * $ adb shell am instrument -w \
* -e class com.example.android.apis.os.MorseCodeConverterTest \ * -e class com.example.android.apis.os.MorseCodeConverterTest \
* com.example.android.apis.tests/android.test.InstrumentationTestRunner * com.example.android.apis.tests/android.test.InstrumentationTestRunner
* *
* To run an individual test, e.g. {@link com.example.android.apis.os.MorseCodeConverterTest#testCharacterS()}: * To run an individual test, e.g. com.example.android.apis.os.MorseCodeConverterTest#testCharacterS():
* $ adb shell am instrument -w \ * $ adb shell am instrument -w \
* -e class com.example.android.apis.os.MorseCodeConverterTest#testCharacterS \ * -e class com.example.android.apis.os.MorseCodeConverterTest#testCharacterS \
* com.example.android.apis.tests/android.test.InstrumentationTestRunner * com.example.android.apis.tests/android.test.InstrumentationTestRunner

@ -62,26 +62,11 @@ public class NewRepeatTests<REMOTE_MODEL> extends DatabaseTestCase {
AndroidUtilities.sleepDeep(200L); // Delay to make sure changes persist AndroidUtilities.sleepDeep(200L); // Delay to make sure changes persist
} }
/**
* @param t
* @param expectedDueDate
*/
protected REMOTE_MODEL assertTaskExistsRemotely(Task t, long expectedDueDate) { protected REMOTE_MODEL assertTaskExistsRemotely(Task t, long expectedDueDate) {
// Subclasses can override this to check the existence of remote objects // Subclasses can override this to check the existence of remote objects
return null; return null;
} }
/**
* @param t task
*/
protected void assertTaskCompletedRemotely(Task t) {
// Subclasses can override this to check the status of the corresponding remote task
}
/**
* @param remoteModel
*/
protected long setCompletionDate(boolean completeBefore, Task t, protected long setCompletionDate(boolean completeBefore, Task t,
REMOTE_MODEL remoteModel, long dueDate) { REMOTE_MODEL remoteModel, long dueDate) {
long completionDate; long completionDate;

@ -7,13 +7,14 @@ package com.todoroo.astrid.test;
import java.util.Locale;
import android.content.res.Resources; import android.content.res.Resources;
import org.tasks.R;
import com.todoroo.andlib.test.TranslationTests; import com.todoroo.andlib.test.TranslationTests;
import org.tasks.R;
import java.util.Locale;
public class AstridTranslationTests extends TranslationTests { public class AstridTranslationTests extends TranslationTests {
@Override @Override
@ -35,9 +36,6 @@ public class AstridTranslationTests extends TranslationTests {
/** /**
* check if string contains contains substrings * check if string contains contains substrings
* @param string
* @param contains
* @return
*/ */
public void contains(Resources r, int resource, StringBuilder failures, String... contains) { public void contains(Resources r, int resource, StringBuilder failures, String... contains) {
String string = r.getString(resource); String string = r.getString(resource);

@ -48,7 +48,6 @@ public class DatabaseTestCase extends TodorooTestCaseWithInjector {
/** /**
* Helper to delete a database by name * Helper to delete a database by name
* @param toDelete
*/ */
protected void deleteDatabase(String toDelete) { protected void deleteDatabase(String toDelete) {
File db = getContext().getDatabasePath(toDelete); File db = getContext().getDatabasePath(toDelete);

@ -158,22 +158,6 @@ public class ActFmGoogleAuthActivity extends ListActivity {
finish(); finish();
} }
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected void onStop() {
super.onStop();
}
private static final int REQUEST_AUTHENTICATE = 0; private static final int REQUEST_AUTHENTICATE = 0;
@Override @Override

@ -20,7 +20,6 @@ import android.widget.EditText;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.app.SherlockFragmentActivity;
import org.tasks.R;
import com.todoroo.aacenc.RecognizerApi.RecognizerApiListener; import com.todoroo.aacenc.RecognizerApi.RecognizerApiListener;
import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.ContextManager;
@ -43,12 +42,13 @@ import com.todoroo.astrid.dao.TaskDao;
import com.todoroo.astrid.data.TagData; import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.service.StartupService; import com.todoroo.astrid.service.StartupService;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.subtasks.SubtasksHelper; import com.todoroo.astrid.subtasks.SubtasksHelper;
import com.todoroo.astrid.ui.DateChangedAlerts; import com.todoroo.astrid.ui.DateChangedAlerts;
import com.todoroo.astrid.ui.QuickAddBar; import com.todoroo.astrid.ui.QuickAddBar;
import com.todoroo.astrid.voice.VoiceRecognizer; import com.todoroo.astrid.voice.VoiceRecognizer;
import org.tasks.R;
/** /**
* This wrapper activity contains all the glue-code to handle the callbacks between the different * This wrapper activity contains all the glue-code to handle the callbacks between the different
* fragments that could be visible on the screen in landscape-mode. * fragments that could be visible on the screen in landscape-mode.
@ -133,11 +133,6 @@ public class AstridActivity extends SherlockFragmentActivity
AndroidUtilities.tryUnregisterReceiver(this, repeatConfirmationReceiver); AndroidUtilities.tryUnregisterReceiver(this, repeatConfirmationReceiver);
} }
@Override
protected void onStop() {
super.onStop();
}
/** /**
* Handles items being clicked from the filterlist-fragment. Return true if item is handled. * Handles items being clicked from the filterlist-fragment. Return true if item is handled.
*/ */

@ -45,7 +45,6 @@ public class BeastModePreferences extends ListActivity {
/** /**
* Migration for existing users to assert that the "hide always" section divider exists in the preferences. * Migration for existing users to assert that the "hide always" section divider exists in the preferences.
* Knowing that this section will always be in the constructed list of controls simplifies the logic a bit. * Knowing that this section will always be in the constructed list of controls simplifies the logic a bit.
* @param c
*/ */
public static void assertHideUntilSectionExists(Context c, long latestSetVersion) { public static void assertHideUntilSectionExists(Context c, long latestSetVersion) {
if (latestSetVersion == 0) { if (latestSetVersion == 0) {

@ -30,11 +30,6 @@ public class DefaultFilterMode implements FilterModeSpec {
return R.attr.asMainMenu; return R.attr.asMainMenu;
} }
@Override
public void onFilterItemClickedCallback(FilterListItem item) {
//
}
@Override @Override
public boolean showComments() { public boolean showComments() {
return true; return true;

@ -178,16 +178,6 @@ public class FilterListFragment extends SherlockListFragment {
* ============================================================ lifecycle * ============================================================ lifecycle
* ====================================================================== */ * ====================================================================== */
@Override
public void onStart() {
super.onStart();
}
@Override
public void onStop() {
super.onStop();
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
@ -314,9 +304,6 @@ public class FilterListFragment extends SherlockListFragment {
/** /**
* Creates a shortcut on the user's home screen * Creates a shortcut on the user's home screen
*
* @param shortcutIntent
* @param label
*/ */
private static void createShortcut(Activity activity, Filter filter, Intent shortcutIntent, String label) { private static void createShortcut(Activity activity, Filter filter, Intent shortcutIntent, String label) {
if(label.length() == 0) { if(label.length() == 0) {

@ -12,7 +12,6 @@ public interface FilterModeSpec {
public Class<? extends FilterListFragment> getFilterListClass(); public Class<? extends FilterListFragment> getFilterListClass();
public Filter getDefaultFilter(Context context); public Filter getDefaultFilter(Context context);
public int getMainMenuIconAttr(); public int getMainMenuIconAttr();
public void onFilterItemClickedCallback(FilterListItem item);
public boolean showComments(); public boolean showComments();
} }

@ -85,15 +85,4 @@ public class FilterShortcutActivity extends ListActivity {
super.onPause(); super.onPause();
adapter.unregisterRecevier(); adapter.unregisterRecevier();
} }
@Override
protected void onStart() {
super.onStart();
}
@Override
protected void onStop() {
super.onStop();
}
} }

@ -30,8 +30,6 @@ public class SortSelectionActivity {
/** /**
* Create the dialog * Create the dialog
* @param activity
* @return
*/ */
public static AlertDialog createDialog(Activity activity, boolean showDragDrop, public static AlertDialog createDialog(Activity activity, boolean showDragDrop,
OnSortSelectedListener listener, int flags, int sort) { OnSortSelectedListener listener, int flags, int sort) {

@ -256,11 +256,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
public void onTaskEditDetailsClicked(int category, int position); public void onTaskEditDetailsClicked(int category, int position);
} }
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
}
public TaskEditFragment() { public TaskEditFragment() {
DependencyInjectionService.getInstance().inject(this); DependencyInjectionService.getInstance().inject(this);
} }
@ -636,8 +631,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
/** /**
* Loads action item from the given intent * Loads action item from the given intent
*
* @param intent
*/ */
protected void loadItem(Intent intent) { protected void loadItem(Intent intent) {
if (model != null) { if (model != null) {
@ -852,7 +845,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
/** /**
* Helper to remove task edit specific info from activity intent * Helper to remove task edit specific info from activity intent
* @param intent
*/ */
public static void removeExtrasFromIntent(Intent intent) { public static void removeExtrasFromIntent(Intent intent) {
if (intent != null) { if (intent != null) {
@ -875,8 +867,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
* Displays a Toast reporting that the selected task has been saved and, if * Displays a Toast reporting that the selected task has been saved and, if
* it has a due date, that is due in 'x' amount of time, to 1 time-unit of * it has a due date, that is due in 'x' amount of time, to 1 time-unit of
* precision * precision
*
* @param additionalMessage
*/ */
private String addDueTimeToToast(String additionalMessage) { private String addDueTimeToToast(String additionalMessage) {
int stringResource; int stringResource;
@ -1171,16 +1161,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
outState.putString(TASK_UUID, uuid.toString()); outState.putString(TASK_UUID, uuid.toString());
} }
@Override
public void onStart() {
super.onStart();
}
@Override
public void onStop() {
super.onStop();
}
/* /*
* ====================================================================== * ======================================================================
* ========================================== UI component helper classes * ========================================== UI component helper classes
@ -1263,7 +1243,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
@Override @Override
public void onPageScrolled(int position, float positionOffset, public void onPageScrolled(int position, float positionOffset,
int positionOffsetPixels) { int positionOffsetPixels) {
return;
} }
@Override @Override
@ -1273,7 +1252,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
@Override @Override
public void onPageScrollStateChanged(int state) { public void onPageScrollStateChanged(int state) {
return;
} }
// EditNoteActivity Listener when there are new updates/comments // EditNoteActivity Listener when there are new updates/comments

@ -268,10 +268,6 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
return extras; return extras;
} }
/**
*
* @param actionBar
*/
protected void initializeFragments(ActionBar actionBar) { protected void initializeFragments(ActionBar actionBar) {
View filterFragment = findViewById(R.id.filterlist_fragment_container); View filterFragment = findViewById(R.id.filterlist_fragment_container);
View editFragment = findViewById(R.id.taskedit_fragment_container); View editFragment = findViewById(R.id.taskedit_fragment_container);
@ -388,7 +384,6 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
} }
boolean result = super.onFilterItemClicked(item); boolean result = super.onFilterItemClicked(item);
filterModeSpec.onFilterItemClickedCallback(item);
return result; return result;
} }
@ -486,11 +481,6 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
lists.setText(title); lists.setText(title);
} }
@Override
protected void onResume() {
super.onResume();
}
@Override @Override
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();

@ -5,11 +5,6 @@
*/ */
package com.todoroo.astrid.activity; package com.todoroo.astrid.activity;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicReference;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
@ -47,11 +42,9 @@ import android.widget.LinearLayout;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockListFragment; import com.actionbarsherlock.app.SherlockListFragment;
import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem; import com.actionbarsherlock.view.MenuItem;
import org.tasks.R;
import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.Property;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.Autowired;
@ -110,6 +103,13 @@ import com.todoroo.astrid.utility.AstridPreferences;
import com.todoroo.astrid.utility.Flags; import com.todoroo.astrid.utility.Flags;
import com.todoroo.astrid.widget.TasksWidget; import com.todoroo.astrid.widget.TasksWidget;
import org.tasks.R;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicReference;
/** /**
* Primary activity for the Bente application. Shows a list of upcoming tasks * Primary activity for the Bente application. Shows a list of upcoming tasks
* and a user's coaches. * and a user's coaches.
@ -227,10 +227,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
* *
* See also: instantiateWithFilterAndExtras(Filter, Bundle) which uses TaskListFragment as the default * See also: instantiateWithFilterAndExtras(Filter, Bundle) which uses TaskListFragment as the default
* custom component. * custom component.
* @param filter
* @param extras
* @param customComponent
* @return
*/ */
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;
@ -264,9 +260,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
/** /**
* Convenience method for calling instantiateWithFilterAndExtras(Filter, Bundle, Class<?>) with * Convenience method for calling instantiateWithFilterAndExtras(Filter, Bundle, Class<?>) with
* TaskListFragment as the default component * TaskListFragment as the default component
* @param filter
* @param extras
* @return
*/ */
public static TaskListFragment instantiateWithFilterAndExtras(Filter filter, Bundle extras) { public static TaskListFragment instantiateWithFilterAndExtras(Filter filter, Bundle extras) {
return instantiateWithFilterAndExtras(filter, extras, null); return instantiateWithFilterAndExtras(filter, extras, null);
@ -483,8 +476,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
/** /**
* Create options menu (displayed when user presses menu key) * Create options menu (displayed when user presses menu key)
*
* @return true if menu should be displayed
*/ */
@Override @Override
public void onCreateOptionsMenu(Menu menu, com.actionbarsherlock.view.MenuInflater inflater) { public void onCreateOptionsMenu(Menu menu, com.actionbarsherlock.view.MenuInflater inflater) {
@ -879,11 +870,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
} }
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
// do nothing
}
/* /*
* ====================================================================== * ======================================================================
* =================================================== managing list view * =================================================== managing list view
@ -892,8 +878,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
/** /**
* Load or re-load action items and update views * Load or re-load action items and update views
*
* @param requery
*/ */
public void loadTaskListContent(boolean requery) { public void loadTaskListContent(boolean requery) {
if (taskAdapter == null) { if (taskAdapter == null) {
@ -957,9 +941,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
/** /**
* Fill in the Task List with current items * Fill in the Task List with current items
*
* @param withCustomId
* force task with given custom id to be part of list
*/ */
public void setUpTaskList() { public void setUpTaskList() {
if (filter == null) { if (filter == null) {
@ -1053,8 +1034,6 @@ public class TaskListFragment extends SherlockListFragment implements OnSortSele
/** /**
* Select a custom task id in the list. If it doesn't exist, create a new * Select a custom task id in the list. If it doesn't exist, create a new
* custom filter * custom filter
*
* @param withCustomId
*/ */
public void selectCustomId(long withCustomId) { public void selectCustomId(long withCustomId) {
// if already in the list, select it // if already in the list, select it

@ -277,9 +277,6 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
/** /**
* Create or reuse a view * Create or reuse a view
* @param convertView
* @param parent
* @return
*/ */
protected View newView(View convertView, ViewGroup parent) { protected View newView(View convertView, ViewGroup parent) {
if(convertView == null) { if(convertView == null) {
@ -347,7 +344,6 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
/** /**
* Sets the selected item to this one * Sets the selected item to this one
* @param picked
*/ */
public void setSelection(FilterListItem picked) { public void setSelection(FilterListItem picked) {
selection = picked; selection = picked;
@ -431,7 +427,6 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
filter instanceof FilterCategory)) { filter instanceof FilterCategory)) {
continue; continue;
} }
onReceiveFilter((FilterListItem)item);
if (filter instanceof FilterCategory) { if (filter instanceof FilterCategory) {
Filter[] children = ((FilterCategory) filter).children; Filter[] children = ((FilterCategory) filter).children;
@ -481,14 +476,6 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
activity.unregisterReceiver(filterReceiver); activity.unregisterReceiver(filterReceiver);
} }
/**
* Called when an item comes through. Override if you like
* @param item
*/
public void onReceiveFilter(FilterListItem item) {
// do nothing
}
/* ====================================================================== /* ======================================================================
* ================================================================ views * ================================================================ views
* ====================================================================== */ * ====================================================================== */

@ -239,7 +239,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
/** /**
* Constructor * Constructor
* *
* @param fragment
* @param resource * @param resource
* layout resource to inflate * layout resource to inflate
* @param c * @param c
@ -827,9 +826,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
/** /**
* Add detail to a task * Add detail to a task
*
* @param id
* @param detail
*/ */
public void addDetails(long id, String detail) { public void addDetails(long id, String detail) {
final StringBuilder details = taskDetailLoader.get(id); final StringBuilder details = taskDetailLoader.get(id);
@ -1089,10 +1085,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
/** Helper method to adjust a tasks' appearance if the task is completed or /** Helper method to adjust a tasks' appearance if the task is completed or
* uncompleted. * uncompleted.
*
* @param actionItem
* @param name
* @param progress
*/ */
protected void setTaskAppearance(ViewHolder viewHolder, Task task) { protected void setTaskAppearance(ViewHolder viewHolder, Task task) {
Activity activity = fragment.getActivity(); Activity activity = fragment.getActivity();
@ -1277,12 +1269,8 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
* This method is called when user completes a task via check box or other * This method is called when user completes a task via check box or other
* means * means
* *
* @param container
* container for the action item
* @param newState * @param newState
* state that this task should be set to * state that this task should be set to
* @param completeBox
* the box that was clicked. can be null
*/ */
protected void completeTask(final Task task, final boolean newState) { protected void completeTask(final Task task, final boolean newState) {
if(task == null) { if(task == null) {
@ -1301,7 +1289,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
/** /**
* Add a new listener * Add a new listener
* @param newListener
*/ */
public void addOnCompletedTaskListener(final OnCompletedTaskListener newListener) { public void addOnCompletedTaskListener(final OnCompletedTaskListener newListener) {
if(this.onCompletedTaskListener == null) { if(this.onCompletedTaskListener == null) {

@ -51,8 +51,6 @@ public class TaskListFragmentPagerAdapter extends FragmentStatePagerAdapter impl
/** /**
* Lookup the fragment for the specified position * Lookup the fragment for the specified position
* @param position
* @return
*/ */
public Fragment lookupFragmentForPosition(int position) { public Fragment lookupFragmentForPosition(int position) {
return positionToFragment.get(position); return positionToFragment.get(position);
@ -66,8 +64,6 @@ public class TaskListFragmentPagerAdapter extends FragmentStatePagerAdapter impl
/** /**
* Adds the specified filter to the data source if it doesn't exist, * Adds the specified filter to the data source if it doesn't exist,
* returning the position of that filter regardless * returning the position of that filter regardless
* @param filter
* @return
*/ */
public int addOrLookup(Filter filter) { public int addOrLookup(Filter filter) {
return filterAdapter.addOrLookup(filter); return filterAdapter.addOrLookup(filter);
@ -83,8 +79,6 @@ public class TaskListFragmentPagerAdapter extends FragmentStatePagerAdapter impl
/** /**
* Get the filter at the specified position * Get the filter at the specified position
* @param position
* @return
*/ */
public Filter getFilter(int position) { public Filter getFilter(int position) {
return filterAdapter.getItem(position); return filterAdapter.getItem(position);

@ -142,15 +142,12 @@ public class UpdateAdapter extends CursorAdapter {
/** /**
* Constructor * Constructor
* *
* @param activity
* @param resource * @param resource
* layout resource to inflate * layout resource to inflate
* @param c * @param c
* database cursor * database cursor
* @param autoRequery * @param autoRequery
* whether cursor is automatically re-queried on changes * whether cursor is automatically re-queried on changes
* @param onCompletedTaskListener
* goal listener. can be null
*/ */
public UpdateAdapter(Fragment fragment, int resource, public UpdateAdapter(Fragment fragment, int resource,
Cursor c, boolean autoRequery, Cursor c, boolean autoRequery,
@ -405,7 +402,6 @@ public class UpdateAdapter extends CursorAdapter {
image.setButton(fragment.getString(R.string.DLG_close), new DialogInterface.OnClickListener() { image.setButton(fragment.getString(R.string.DLG_close), new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
return;
} }
}); });
image.show(); image.show();

@ -58,8 +58,6 @@ public class AlarmService {
/** /**
* Return alarms for the given task. PLEASE CLOSE THE CURSOR! * Return alarms for the given task. PLEASE CLOSE THE CURSOR!
*
* @param taskId
*/ */
public TodorooCursor<Metadata> getAlarms(long taskId) { public TodorooCursor<Metadata> getAlarms(long taskId) {
return PluginServices.getMetadataService().query(Query.select( return PluginServices.getMetadataService().query(Query.select(
@ -69,8 +67,6 @@ public class AlarmService {
/** /**
* Save the given array of alarms into the database * Save the given array of alarms into the database
* @param taskId
* @param tags
* @return true if data was changed * @return true if data was changed
*/ */
public boolean synchronizeAlarms(final long taskId, LinkedHashSet<Long> alarms) { public boolean synchronizeAlarms(final long taskId, LinkedHashSet<Long> alarms) {
@ -107,7 +103,6 @@ public class AlarmService {
/** /**
* Gets a listing of all alarms that are active * Gets a listing of all alarms that are active
* @param properties
* @return todoroo cursor. PLEASE CLOSE THIS CURSOR! * @return todoroo cursor. PLEASE CLOSE THIS CURSOR!
*/ */
private TodorooCursor<Metadata> getActiveAlarms() { private TodorooCursor<Metadata> getActiveAlarms() {
@ -118,7 +113,6 @@ public class AlarmService {
/** /**
* Gets a listing of alarms by task * Gets a listing of alarms by task
* @param properties
* @return todoroo cursor. PLEASE CLOSE THIS CURSOR! * @return todoroo cursor. PLEASE CLOSE THIS CURSOR!
*/ */
private TodorooCursor<Metadata> getActiveAlarmsForTask(long taskId) { private TodorooCursor<Metadata> getActiveAlarmsForTask(long taskId) {
@ -150,7 +144,6 @@ public class AlarmService {
/** /**
* Schedules alarms for a single task * Schedules alarms for a single task
* @param task
*/ */
public void scheduleAlarms(long taskId) { public void scheduleAlarms(long taskId) {
TodorooCursor<Metadata> cursor = getActiveAlarmsForTask(taskId); TodorooCursor<Metadata> cursor = getActiveAlarmsForTask(taskId);
@ -180,9 +173,6 @@ public class AlarmService {
/** /**
* Schedules alarms for a single task * Schedules alarms for a single task
*
* @param shouldPerformPropertyCheck
* whether to check if task has requisite properties
*/ */
private void scheduleAlarm(Metadata alarm) { private void scheduleAlarm(Metadata alarm) {
if(alarm == null) { if(alarm == null) {

@ -33,7 +33,6 @@ public interface TaskContextActionExposer {
/** /**
* Expose context menu item label, or null if item should not be shown * Expose context menu item label, or null if item should not be shown
* @param task
* *
* @return null if no item should be displayed, or string or id * @return null if no item should be displayed, or string or id
*/ */
@ -41,7 +40,6 @@ public interface TaskContextActionExposer {
/** /**
* Call context menu action * Call context menu action
* @param task
*/ */
public void invoke(Task task); public void invoke(Task task);

@ -21,7 +21,6 @@ public interface TaskDecorationExposer {
/** /**
* Expose task decorations for the given task * Expose task decorations for the given task
* @param task
* *
* @return null if no decorations, or decoration * @return null if no decorations, or decoration
*/ */

@ -62,7 +62,6 @@ public class BackupService extends Service {
/** /**
* Test hook for backup * Test hook for backup
* @param context
*/ */
public void testBackup(Context context) { public void testBackup(Context context) {
startBackup(context); startBackup(context);

@ -226,7 +226,6 @@ public class TasksXmlExporter {
/** /**
* Turn a model into xml attributes * Turn a model into xml attributes
* @param model
*/ */
private void serializeModel(AbstractModel model, Property<?>[] properties, Property<?>... excludes) { private void serializeModel(AbstractModel model, Property<?>[] properties, Property<?>... excludes) {
outer: for(Property<?> property : properties) { outer: for(Property<?> property : properties) {
@ -344,7 +343,6 @@ public class TasksXmlExporter {
/** /**
* Creates directories if necessary and returns fully qualified file * Creates directories if necessary and returns fully qualified file
* @param directory
* @return output file name * @return output file name
* @throws IOException * @throws IOException
*/ */

@ -57,9 +57,6 @@ public class TasksXmlImporter {
/** /**
* Import tasks from the given file * Import tasks from the given file
*
* @param input
* @param runAfterImport
*/ */
public static void importTasks(Context context, String input, Runnable runAfterImport) { public static void importTasks(Context context, String input, Runnable runAfterImport) {
new TasksXmlImporter(context, input, runAfterImport); new TasksXmlImporter(context, input, runAfterImport);
@ -306,7 +303,6 @@ public class TasksXmlImporter {
/** /**
* Turn a model into xml attributes * Turn a model into xml attributes
* @param model
*/ */
private void deserializeModel(AbstractModel model, Property<?>[] properties) { private void deserializeModel(AbstractModel model, Property<?>[] properties) {
for(Property<?> property : properties) { for(Property<?> property : properties) {

@ -9,7 +9,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -19,7 +18,6 @@ import android.graphics.drawable.BitmapDrawable;
import org.tasks.R; import org.tasks.R;
import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.ContextManager;
import com.todoroo.andlib.sql.Criterion; import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Join;
import com.todoroo.andlib.sql.Query; import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.sql.QueryTemplate; import com.todoroo.andlib.sql.QueryTemplate;
import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.AndroidUtilities;
@ -29,7 +27,6 @@ import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.api.AstridFilterExposer; import com.todoroo.astrid.api.AstridFilterExposer;
import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.Filter;
import com.todoroo.astrid.api.FilterListItem; import com.todoroo.astrid.api.FilterListItem;
import com.todoroo.astrid.api.FilterWithCustomIntent;
import com.todoroo.astrid.api.PermaSql; import com.todoroo.astrid.api.PermaSql;
import com.todoroo.astrid.dao.MetadataDao.MetadataCriteria; import com.todoroo.astrid.dao.MetadataDao.MetadataCriteria;
import com.todoroo.astrid.dao.TaskDao.TaskCriteria; import com.todoroo.astrid.dao.TaskDao.TaskCriteria;
@ -72,7 +69,6 @@ public final class CoreFilterExposer extends BroadcastReceiver implements Astrid
/** /**
* Build inbox filter * Build inbox filter
* @return
*/ */
public static Filter buildInboxFilter(Resources r) { public static Filter buildInboxFilter(Resources r) {
Filter inbox = new Filter(r.getString(R.string.BFE_Active), r.getString(R.string.BFE_Active), Filter inbox = new Filter(r.getString(R.string.BFE_Active), r.getString(R.string.BFE_Active),
@ -107,8 +103,6 @@ public final class CoreFilterExposer extends BroadcastReceiver implements Astrid
/** /**
* Is this the inbox? * Is this the inbox?
* @param filter
* @return
*/ */
public static boolean isInbox(Filter filter) { public static boolean isInbox(Filter filter) {
return (filter != null && filter.equals(buildInboxFilter(ContextManager.getContext().getResources()))); return (filter != null && filter.equals(buildInboxFilter(ContextManager.getContext().getResources())));

@ -267,16 +267,6 @@ public class CustomFilterActivity extends SherlockFragmentActivity {
} }
} }
@Override
protected void onStart() {
super.onStart();
}
@Override
protected void onStop() {
super.onStop();
}
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();

@ -105,7 +105,6 @@ public class CustomFilterAdapter extends ArrayAdapter<CriterionInstance> {
/** /**
* Show options menu for the given criterioninstance * Show options menu for the given criterioninstance
* @param item
*/ */
public void showOptionsFor(final CriterionInstance item, final Runnable onComplete) { public void showOptionsFor(final CriterionInstance item, final Runnable onComplete) {
AlertDialog.Builder dialog = new AlertDialog.Builder(activity). AlertDialog.Builder dialog = new AlertDialog.Builder(activity).

@ -38,10 +38,6 @@ public class DefaultsPreferences extends TodorooPreferenceActivity {
Calendars.initCalendarsPreference(this, defaultCalendarPreference); Calendars.initCalendarsPreference(this, defaultCalendarPreference);
} }
/**
*
* @param resource if null, updates all resources
*/
@Override @Override
public void updatePreferences(Preference preference, Object value) { public void updatePreferences(Preference preference, Object value) {
Resources r = getResources(); Resources r = getResources();

@ -48,11 +48,6 @@ public class SavedFilter {
/** /**
* Save a filter * Save a filter
*
* @param adapter
* @param title
* @param sql2
* @param values2
*/ */
public static void persist(CustomFilterAdapter adapter, String title, public static void persist(CustomFilterAdapter adapter, String title,
String sql, ContentValues values) { String sql, ContentValues values) {
@ -93,8 +88,6 @@ public class SavedFilter {
/** /**
* Turn a series of CriterionInstance objects into a string * Turn a series of CriterionInstance objects into a string
* @param adapter
* @return
*/ */
private static String serializeFilters(CustomFilterAdapter adapter) { private static String serializeFilters(CustomFilterAdapter adapter) {
StringBuilder values = new StringBuilder(); StringBuilder values = new StringBuilder();
@ -125,8 +118,6 @@ public class SavedFilter {
/** /**
* Read filter from store * Read filter from store
* @param savedFilter
* @return
*/ */
public static Filter load(StoreObject savedFilter) { public static Filter load(StoreObject savedFilter) {
String title = savedFilter.getValue(NAME); String title = savedFilter.getValue(NAME);

@ -429,10 +429,6 @@ public class Database extends AbstractDatabase {
/** /**
* Create table generation SQL * Create table generation SQL
* @param sql
* @param tableName
* @param properties
* @return
*/ */
public String createTableSql(SqlConstructorVisitor visitor, public String createTableSql(SqlConstructorVisitor visitor,
String tableName, Property<?>[] properties) { String tableName, Property<?>[] properties) {

@ -5,7 +5,6 @@ import com.todoroo.andlib.data.DatabaseDao;
import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.Property;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.sql.Query; import com.todoroo.andlib.sql.Query;
import com.todoroo.astrid.core.PluginServices;
import com.todoroo.astrid.data.RemoteModel; import com.todoroo.astrid.data.RemoteModel;
import com.todoroo.astrid.helper.UUIDHelper; import com.todoroo.astrid.helper.UUIDHelper;
@ -62,9 +61,6 @@ public class RemoteModelDao<RTYPE extends RemoteModel> extends DatabaseDao<RTYPE
/** /**
* Fetch a model object by UUID * Fetch a model object by UUID
* @param uuid
* @param properties
* @return
*/ */
public RTYPE fetch(String uuid, Property<?>... properties) { public RTYPE fetch(String uuid, Property<?>... properties) {
TodorooCursor<RTYPE> cursor = fetchItem(uuid, properties); TodorooCursor<RTYPE> cursor = fetchItem(uuid, properties);
@ -74,14 +70,8 @@ public class RemoteModelDao<RTYPE extends RemoteModel> extends DatabaseDao<RTYPE
/** /**
* Returns cursor to object corresponding to the given identifier * Returns cursor to object corresponding to the given identifier
* *
* @param database
* @param table
* name of table
* @param properties * @param properties
* properties to read * properties to read
* @param id
* id of item
* @return
*/ */
protected TodorooCursor<RTYPE> fetchItem(String uuid, Property<?>... properties) { protected TodorooCursor<RTYPE> fetchItem(String uuid, Property<?>... properties) {
TodorooCursor<RTYPE> cursor = query( TodorooCursor<RTYPE> cursor = query(
@ -92,8 +82,6 @@ public class RemoteModelDao<RTYPE extends RemoteModel> extends DatabaseDao<RTYPE
/** /**
* Get the local id * Get the local id
* @param uuid
* @return
*/ */
public long localIdFromUuid(String uuid) { public long localIdFromUuid(String uuid) {
TodorooCursor<RTYPE> cursor = query(Query.select(AbstractModel.ID_PROPERTY).where(RemoteModel.UUID_PROPERTY.eq(uuid))); TodorooCursor<RTYPE> cursor = query(Query.select(AbstractModel.ID_PROPERTY).where(RemoteModel.UUID_PROPERTY.eq(uuid)));

@ -39,7 +39,7 @@ public class TagDataDao extends RemoteModelDao<TagData> {
*/ */
public static class TagDataCriteria { public static class TagDataCriteria {
/** @returns tasks by id */ /** @return tasks by id */
public static Criterion byId(long id) { public static Criterion byId(long id) {
return TagData.ID.eq(id); return TagData.ID.eq(id);
} }

@ -56,7 +56,7 @@ public class TaskDao extends RemoteModelDao<Task> {
*/ */
public static class TaskCriteria { public static class TaskCriteria {
/** @returns tasks by id */ /** @return tasks by id */
public static Criterion byId(long id) { public static Criterion byId(long id) {
return Task.ID.eq(id); return Task.ID.eq(id);
} }
@ -154,8 +154,6 @@ public class TaskDao extends RemoteModelDao<Task> {
/** /**
* Delete the given item * Delete the given item
* *
* @param database
* @param id
* @return true if delete was successful * @return true if delete was successful
*/ */
@Override @Override
@ -179,7 +177,6 @@ public class TaskDao extends RemoteModelDao<Task> {
* Saves the given task to the database.getDatabase(). Task must already * Saves the given task to the database.getDatabase(). Task must already
* exist. Returns true on success. * exist. Returns true on success.
* *
* @param task
* @return true if save occurred, false otherwise (i.e. nothing changed) * @return true if save occurred, false otherwise (i.e. nothing changed)
*/ */
public boolean save(Task task) { public boolean save(Task task) {
@ -248,7 +245,6 @@ public class TaskDao extends RemoteModelDao<Task> {
/** /**
* Sets default reminders for the given task if reminders are not set * Sets default reminders for the given task if reminders are not set
* @param item
*/ */
public static void setDefaultReminders(Task item) { public static void setDefaultReminders(Task item) {
if(!item.containsValue(Task.REMINDER_PERIOD)) { if(!item.containsValue(Task.REMINDER_PERIOD)) {
@ -422,9 +418,6 @@ public class TaskDao extends RemoteModelDao<Task> {
/** /**
* Called after the task was just completed * Called after the task was just completed
*
* @param task
* @param values
*/ */
private static void afterComplete(Task task, ContentValues values) { private static void afterComplete(Task task, ContentValues values) {
Notifications.cancelNotifications(task.getId()); Notifications.cancelNotifications(task.getId());

@ -1,41 +0,0 @@
/**
* Copyright (c) 2012 Todoroo Inc
*
* See the file "LICENSE" for the full license governing this code.
*/
package com.todoroo.astrid.files;
import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.astrid.data.Metadata;
/**
* This class was deprecated with SyncV2. Use TaskAttachment instead.
* @author Sam
*
*/
@Deprecated
public class FileMetadata {
/** metadata key */
public static final String METADATA_KEY = "file"; //$NON-NLS-1$
public static final StringProperty FILE_PATH = new StringProperty(Metadata.TABLE,
Metadata.VALUE1.name);
public static final StringProperty FILE_TYPE = new StringProperty(Metadata.TABLE,
Metadata.VALUE2.name);
public static final LongProperty DELETION_DATE = new LongProperty(Metadata.TABLE,
Metadata.VALUE3.name);
public static final LongProperty REMOTE_ID = new LongProperty(Metadata.TABLE,
Metadata.VALUE4.name);
public static final StringProperty URL = new StringProperty(Metadata.TABLE,
Metadata.VALUE5.name);
public static final StringProperty NAME = new StringProperty(Metadata.TABLE,
Metadata.VALUE6.name);
}

@ -246,7 +246,6 @@ public class FilesControlSet extends PopupControlSet {
image.setButton(activity.getString(R.string.DLG_close), new DialogInterface.OnClickListener() { image.setButton(activity.getString(R.string.DLG_close), new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface d, int which) { public void onClick(DialogInterface d, int which) {
return;
} }
}); });
image.show(); image.show();

@ -107,11 +107,6 @@ public class Calendars {
/** /**
* Appends all user-modifiable calendars to listPreference. * Appends all user-modifiable calendars to listPreference.
*
* @param context
* context
* @param listPreference
* preference to init
*/ */
public static CalendarResult getCalendars() { public static CalendarResult getCalendars() {
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();

@ -34,7 +34,6 @@ import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.utility.Preferences; import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.gcal.Calendars.CalendarResult; import com.todoroo.astrid.gcal.Calendars.CalendarResult;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.ThemeService; import com.todoroo.astrid.service.ThemeService;
import com.todoroo.astrid.ui.PopupControlSet; import com.todoroo.astrid.ui.PopupControlSet;

@ -28,15 +28,4 @@ public class GtasksBackgroundService extends SyncV2BackgroundService {
} }
return gtasksPreferenceService; return gtasksPreferenceService;
} }
@Override
public void onCreate() {
super.onCreate();
}
@Override
public void onDestroy() {
super.onDestroy();
}
} }

@ -58,7 +58,6 @@ public class GtasksListService {
/** /**
* Get list name * Get list name
* @param listId
* @return NOT_FOUND if no list by this id exists, otherwise list name * @return NOT_FOUND if no list by this id exists, otherwise list name
*/ */
public String getListName(String listId) { public String getListName(String listId) {

@ -51,7 +51,6 @@ public class GtasksMetadata {
/** /**
* Creates default GTasks metadata item * Creates default GTasks metadata item
* @param taskId if > 0, will set metadata task field * @param taskId if > 0, will set metadata task field
* @return
*/ */
public static Metadata createEmptyMetadata(long taskId) { public static Metadata createEmptyMetadata(long taskId) {
Metadata metadata = new Metadata(); Metadata metadata = new Metadata();

@ -170,8 +170,6 @@ public final class GtasksMetadataService extends SyncMetadataService<GtasksTaskC
/** /**
* Gets the remote id string of the parent task * Gets the remote id string of the parent task
* @param gtasksMetadata
* @return
*/ */
public String getRemoteParentId(Metadata gtasksMetadata) { public String getRemoteParentId(Metadata gtasksMetadata) {
String parent = null; String parent = null;
@ -190,9 +188,6 @@ public final class GtasksMetadataService extends SyncMetadataService<GtasksTaskC
/** /**
* Gets the remote id string of the previous sibling task * Gets the remote id string of the previous sibling task
* @param listId
* @param gtasksMetadata
* @return
*/ */
public String getRemoteSiblingId(String listId, Metadata gtasksMetadata) { public String getRemoteSiblingId(String listId, Metadata gtasksMetadata) {
final AtomicInteger indentToMatch = new AtomicInteger(gtasksMetadata.getValue(GtasksMetadata.INDENT).intValue()); final AtomicInteger indentToMatch = new AtomicInteger(gtasksMetadata.getValue(GtasksMetadata.INDENT).intValue());

@ -7,7 +7,6 @@ package com.todoroo.astrid.gtasks;
import org.tasks.R; import org.tasks.R;
import com.todoroo.andlib.utility.Preferences; import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.sync.SyncProviderUtilities; import com.todoroo.astrid.sync.SyncProviderUtilities;
/** /**
@ -54,9 +53,4 @@ public class GtasksPreferenceService extends SyncProviderUtilities {
public String getLoggedInUserName() { public String getLoggedInUserName() {
return Preferences.getStringValue(PREF_USER_NAME); return Preferences.getStringValue(PREF_USER_NAME);
} }
@Override
protected void reportLastErrorImpl(String lastError, String type) {
}
} }

@ -6,7 +6,6 @@
package com.todoroo.astrid.gtasks; package com.todoroo.astrid.gtasks;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle;
import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.service.DependencyInjectionService;
@ -35,11 +34,6 @@ public class GtasksPreferences extends SyncProviderPreferences {
DependencyInjectionService.getInstance().inject(this); DependencyInjectionService.getInstance().inject(this);
} }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override @Override
public int getPreferenceResource() { public int getPreferenceResource() {
return R.xml.preferences_gtasks; return R.xml.preferences_gtasks;

@ -107,7 +107,6 @@ public class GtasksTaskListUpdater extends OrderedMetadataListUpdater<StoreObjec
/** /**
* Update order, parent, and indentation fields for all tasks in the given list * Update order, parent, and indentation fields for all tasks in the given list
* @param listId
*/ */
public void correctMetadataForList(String listId) { public void correctMetadataForList(String listId) {
StoreObject list = gtasksListService.getList(listId); StoreObject list = gtasksListService.getList(listId);

@ -48,8 +48,6 @@ public class GtasksApiUtilities {
* and then truncate h:m:s to 0. This can lead to a loss of date information for * and then truncate h:m:s to 0. This can lead to a loss of date information for
* us, so we adjust here by doing the normalizing/truncating ourselves and * us, so we adjust here by doing the normalizing/truncating ourselves and
* then correcting the date we get back in a similar way. * then correcting the date we get back in a similar way.
* @param time
* @return
*/ */
public static DateTime unixTimeToGtasksDueDate(long time) { public static DateTime unixTimeToGtasksDueDate(long time) {
if (time < 0) { if (time < 0) {

@ -160,26 +160,6 @@ public class GtasksLoginActivity extends ListActivity {
finish(); finish();
} }
@Override
protected void onStart() {
super.onStart();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected void onStop() {
super.onStop();
}
private static final int REQUEST_AUTHENTICATE = 0; private static final int REQUEST_AUTHENTICATE = 0;
@Override @Override

@ -31,7 +31,6 @@ public class GtasksTokenValidator {
/** /**
* Invalidates and then revalidates the auth token for the currently logged in user * Invalidates and then revalidates the auth token for the currently logged in user
* Shouldn't be called from the main thread--will block on network calls * Shouldn't be called from the main thread--will block on network calls
* @param token
* @return valid token on success, null on failure * @return valid token on success, null on failure
*/ */
public static synchronized String validateAuthToken(Context c, String token) throws GoogleTasksException { public static synchronized String validateAuthToken(Context c, String token) throws GoogleTasksException {

@ -167,8 +167,6 @@ public final class GtasksSyncService {
/** /**
* Checks to see if any of the values changed are among the properties we sync * Checks to see if any of the values changed are among the properties we sync
* @param values
* @param properties
* @return false if none of the properties we sync were changed, true otherwise * @return false if none of the properties we sync were changed, true otherwise
*/ */
private boolean checkValuesForProperties(ContentValues values, Property<?>[] properties) { private boolean checkValuesForProperties(ContentValues values, Property<?>[] properties) {

@ -47,7 +47,6 @@ import com.todoroo.astrid.sync.SyncResultCallback;
import com.todoroo.astrid.sync.SyncV2Provider; import com.todoroo.astrid.sync.SyncV2Provider;
import com.todoroo.astrid.tags.TagService; import com.todoroo.astrid.tags.TagService;
import org.json.JSONException;
import org.tasks.R; import org.tasks.R;
import java.io.IOException; import java.io.IOException;
@ -317,8 +316,7 @@ public class GtasksSyncV2Provider extends SyncV2Provider {
} }
} }
/** Create a task container for the given remote task /** Create a task container for the given remote task */
* @throws JSONException */
private GtasksTaskContainer parseRemoteTask(com.google.api.services.tasks.model.Task remoteTask, String listId) { private GtasksTaskContainer parseRemoteTask(com.google.api.services.tasks.model.Task remoteTask, String listId) {
Task task = new Task(); Task task = new Task();

@ -232,10 +232,6 @@ public class SyncActionHelper {
/** /**
* Show menu of sync options. This is shown when you're not logged into any * Show menu of sync options. This is shown when you're not logged into any
* services, or logged into more than one. * services, or logged into more than one.
*
* @param <TYPE>
* @param items
* @param listener
*/ */
private <TYPE> void showSyncOptionMenu(TYPE[] items, private <TYPE> void showSyncOptionMenu(TYPE[] items,
DialogInterface.OnClickListener listener) { DialogInterface.OnClickListener listener) {

@ -21,9 +21,6 @@ abstract public class TaskAdapterAddOnManager<TYPE> {
private final ListFragment fragment; private final ListFragment fragment;
/**
* @param taskAdapter
*/
protected TaskAdapterAddOnManager(ListFragment fragment) { protected TaskAdapterAddOnManager(ListFragment fragment) {
this.fragment = fragment; this.fragment = fragment;
} }
@ -109,7 +106,6 @@ abstract public class TaskAdapterAddOnManager<TYPE> {
/** /**
* Retrieves a list. If it doesn't exist, list is created, but * Retrieves a list. If it doesn't exist, list is created, but
* the method will return null * the method will return null
* @param taskId
* @return list if there was already one * @return list if there was already one
*/ */
protected synchronized Collection<TYPE> initialize(long taskId) { protected synchronized Collection<TYPE> initialize(long taskId) {
@ -122,8 +118,6 @@ abstract public class TaskAdapterAddOnManager<TYPE> {
/** /**
* Adds an item to the cache if it doesn't exist * Adds an item to the cache if it doesn't exist
* @param taskId
* @param item
* @return iterator if item was added, null if it already existed * @return iterator if item was added, null if it already existed
*/ */
protected synchronized Collection<TYPE> addIfNotExists(long taskId, String addOn, protected synchronized Collection<TYPE> addIfNotExists(long taskId, String addOn,
@ -141,8 +135,6 @@ abstract public class TaskAdapterAddOnManager<TYPE> {
/** /**
* Gets an item at the given index * Gets an item at the given index
* @param taskId
* @return
*/ */
protected Collection<TYPE> get(long taskId) { protected Collection<TYPE> get(long taskId) {
if(cache.get(taskId) == null) { if(cache.get(taskId) == null) {

@ -31,9 +31,6 @@ public class NotesPlugin extends BroadcastReceiver {
/** /**
* Does this task have notes to display? * Does this task have notes to display?
*
* @param task
* @return
*/ */
public static boolean hasNotes(Task task) { public static boolean hasNotes(Task task) {
if(task.containsNonNullValue(Task.NOTES) && !TextUtils.isEmpty(task.getValue(Task.NOTES))) { if(task.containsNonNullValue(Task.NOTES) && !TextUtils.isEmpty(task.getValue(Task.NOTES))) {

@ -5,15 +5,12 @@
*/ */
package com.todoroo.astrid.reminders; package com.todoroo.astrid.reminders;
import java.util.Date;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.TimePickerDialog; import android.app.TimePickerDialog;
import android.app.TimePickerDialog.OnTimeSetListener; import android.app.TimePickerDialog.OnTimeSetListener;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
@ -21,7 +18,6 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import org.tasks.R;
import com.todoroo.andlib.utility.AndroidUtilities; 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;
@ -29,9 +25,12 @@ import com.todoroo.astrid.activity.AstridActivity;
import com.todoroo.astrid.activity.TaskListFragment; import com.todoroo.astrid.activity.TaskListFragment;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.repeats.RepeatControlSet; import com.todoroo.astrid.repeats.RepeatControlSet;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.ui.NumberPicker; import com.todoroo.astrid.ui.NumberPicker;
import org.tasks.R;
import java.util.Date;
/** /**
* This activity is launched when a user opens up a notification from the * This activity is launched when a user opens up a notification from the
* tray. It launches the appropriate activity based on the passed in parameters. * tray. It launches the appropriate activity based on the passed in parameters.
@ -50,15 +49,6 @@ public class NotificationFragment extends TaskListFragment {
private long taskId; private long taskId;
/* (non-Javadoc)
* @see com.todoroo.astrid.activity.TaskListActivity#onActivityCreated(android.os.Bundle)
*/
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
@Override @Override
protected void onTaskCompleted(Task item) { protected void onTaskCompleted(Task item) {
} }

@ -5,11 +5,6 @@
*/ */
package com.todoroo.astrid.reminders; package com.todoroo.astrid.reminders;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import android.app.Notification; import android.app.Notification;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
@ -25,7 +20,6 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import org.tasks.R;
import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.ContextManager;
import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.service.DependencyInjectionService;
@ -48,6 +42,13 @@ import com.todoroo.astrid.utility.Constants;
import com.todoroo.astrid.utility.Flags; import com.todoroo.astrid.utility.Flags;
import com.todoroo.astrid.voice.VoiceOutputService; import com.todoroo.astrid.voice.VoiceOutputService;
import org.tasks.R;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public class Notifications extends BroadcastReceiver { public class Notifications extends BroadcastReceiver {
// --- constants // --- constants
@ -259,7 +260,7 @@ public class Notifications extends BroadcastReceiver {
private static long lastNotificationSound = 0L; private static long lastNotificationSound = 0L;
/** /**
* @returns true if notification should sound * @return true if notification should sound
*/ */
private static boolean checkLastNotificationSound() { private static boolean checkLastNotificationSound() {
long now = DateUtilities.now(); long now = DateUtilities.now();

@ -26,10 +26,6 @@ public class ReminderPreferences extends TodorooPreferenceActivity {
return R.xml.preferences_reminders; return R.xml.preferences_reminders;
} }
/**
*
* @param resource if null, updates all resources
*/
@Override @Override
public void updatePreferences(Preference preference, Object value) { public void updatePreferences(Preference preference, Object value) {
Resources r = getResources(); Resources r = getResources();

@ -5,9 +5,6 @@
*/ */
package com.todoroo.astrid.reminders; package com.todoroo.astrid.reminders;
import java.util.Date;
import java.util.Random;
import android.app.AlarmManager; import android.app.AlarmManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
@ -17,7 +14,6 @@ import android.content.SharedPreferences.Editor;
import android.content.res.Resources; import android.content.res.Resources;
import android.util.Log; import android.util.Log;
import org.tasks.R;
import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.Property;
import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.Autowired;
@ -32,6 +28,11 @@ import com.todoroo.astrid.dao.TaskDao.TaskCriteria;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.utility.Constants; import com.todoroo.astrid.utility.Constants;
import org.tasks.R;
import java.util.Date;
import java.util.Random;
/** /**
* Data service for reminders * Data service for reminders
@ -150,7 +151,6 @@ public final class ReminderService {
/** /**
* Schedules alarms for a single task * Schedules alarms for a single task
* @param task
*/ */
public void scheduleAlarm(Task task) { public void scheduleAlarm(Task task) {
scheduleAlarm(task, true); scheduleAlarm(task, true);
@ -246,9 +246,6 @@ public final class ReminderService {
* <p> * <p>
* Pretty simple - if a snooze time is in the future, we use that. If it * Pretty simple - if a snooze time is in the future, we use that. If it
* has already passed, we do nothing. * has already passed, we do nothing.
*
* @param task
* @return
*/ */
private long calculateNextSnoozeReminder(Task task) { private long calculateNextSnoozeReminder(Task task) {
if(task.getValue(Task.REMINDER_SNOOZE) > DateUtilities.now()) { if(task.getValue(Task.REMINDER_SNOOZE) > DateUtilities.now()) {
@ -263,9 +260,6 @@ public final class ReminderService {
* We schedule an alarm for after the due date (which could be in the past), * We schedule an alarm for after the due date (which could be in the past),
* with the exception that if a reminder was recently issued, we move * with the exception that if a reminder was recently issued, we move
* the alarm time to the near future. * the alarm time to the near future.
*
* @param task
* @return
*/ */
private long calculateNextOverdueReminder(Task task) { private long calculateNextOverdueReminder(Task task) {
// Uses getNowValue() instead of DateUtilities.now() // Uses getNowValue() instead of DateUtilities.now()
@ -307,9 +301,6 @@ public final class ReminderService {
* <p> * <p>
* If the date was indicated to not have a due time, we read from * If the date was indicated to not have a due time, we read from
* preferences and assign a time. * preferences and assign a time.
*
* @param task
* @return
*/ */
private long calculateNextDueDateReminder(Task task) { private long calculateNextDueDateReminder(Task task) {
// Uses getNowValue() instead of DateUtilities.now() // Uses getNowValue() instead of DateUtilities.now()
@ -415,9 +406,6 @@ public final class ReminderService {
* We take the last reminder time and add approximately the reminder * We take the last reminder time and add approximately the reminder
* period. If it's still in the past, we set it to some time in the near * period. If it's still in the past, we set it to some time in the near
* future. * future.
*
* @param task
* @return
*/ */
private long calculateNextRandomReminder(Task task) { private long calculateNextRandomReminder(Task task) {
long reminderPeriod = task.getValue(Task.REMINDER_PERIOD); long reminderPeriod = task.getValue(Task.REMINDER_PERIOD);
@ -460,11 +448,6 @@ public final class ReminderService {
private static class ReminderAlarmScheduler implements AlarmScheduler { private static class ReminderAlarmScheduler implements AlarmScheduler {
/** /**
* Create an alarm for the given task at the given type * Create an alarm for the given task at the given type
*
* @param task
* @param time
* @param type
* @param flags
*/ */
@Override @Override
public void createAlarm(Task task, long time, int type) { public void createAlarm(Task task, long time, int type) {
@ -510,7 +493,6 @@ public final class ReminderService {
/** /**
* Gets a listing of all tasks that are active & * Gets a listing of all tasks that are active &
* @param properties
* @return todoroo cursor. PLEASE CLOSE THIS CURSOR! * @return todoroo cursor. PLEASE CLOSE THIS CURSOR!
*/ */
private TodorooCursor<Task> getTasksWithReminders(Property<?>... properties) { private TodorooCursor<Task> getTasksWithReminders(Property<?>... properties) {

@ -38,7 +38,6 @@ import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService; import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.utility.DialogUtilities; import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.TaskService; import com.todoroo.astrid.service.TaskService;
import com.todoroo.astrid.service.ThemeService; import com.todoroo.astrid.service.ThemeService;
import com.todoroo.astrid.ui.DateAndTimeDialog; import com.todoroo.astrid.ui.DateAndTimeDialog;

@ -252,8 +252,7 @@ public class RepeatTaskCompleteListener extends BroadcastReceiver {
return rrule; return rrule;
} }
/** Set up repeat start date /** Set up repeat start date */
* @param frequency */
private static Date setUpStartDate(Task task, boolean repeatAfterCompletion, Frequency frequency) { private static Date setUpStartDate(Task task, boolean repeatAfterCompletion, Frequency frequency) {
Date startDate = new Date(); Date startDate = new Date();
if(task.hasDueDate()) { if(task.hasDueDate()) {

@ -9,7 +9,6 @@ import android.content.Context;
import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.ContextManager;
import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.data.AddOn; import com.todoroo.astrid.data.AddOn;
import com.todoroo.astrid.utility.Constants; import com.todoroo.astrid.utility.Constants;
@ -31,8 +30,6 @@ public class AddOnService {
/** /**
* Check whether a given add-on is installed * Check whether a given add-on is installed
* @param addOn
* @return
*/ */
public boolean isInstalled(AddOn addOn) { public boolean isInstalled(AddOn addOn) {
// it isnt installed if it is null... // it isnt installed if it is null...
@ -44,8 +41,6 @@ public class AddOnService {
/** /**
* Check whether an external add-on is installed * Check whether an external add-on is installed
* @param packageName
* @return
*/ */
public boolean isInstalled(String packageName) { public boolean isInstalled(String packageName) {
return isInstalled(packageName, false); return isInstalled(packageName, false);
@ -53,9 +48,7 @@ public class AddOnService {
/** /**
* Check whether a given add-on is installed * Check whether a given add-on is installed
* @param addOn
* @param internal whether to do api sig check * @param internal whether to do api sig check
* @return
*/ */
private boolean isInstalled(String packageName, boolean internal) { private boolean isInstalled(String packageName, boolean internal) {
if(Constants.PACKAGE.equals(packageName)) { if(Constants.PACKAGE.equals(packageName)) {

@ -13,7 +13,6 @@ import org.tasks.R;
public abstract class MarketStrategy { public abstract class MarketStrategy {
/** /**
* @param packageName
* @return an intent to launch market with this package * @return an intent to launch market with this package
*/ */
abstract public Intent generateMarketLink(String packageName); abstract public Intent generateMarketLink(String packageName);
@ -34,7 +33,6 @@ public abstract class MarketStrategy {
/** /**
* Most market strategies don't support billing at this time, * Most market strategies don't support billing at this time,
* so we'll make the default false * so we'll make the default false
* @return
*/ */
public boolean billingSupported() { public boolean billingSupported() {
return false; return false;
@ -43,7 +41,6 @@ public abstract class MarketStrategy {
/** /**
* Return true if the preference to use the phone layout should be * Return true if the preference to use the phone layout should be
* turned on by default (only true for Nook) * turned on by default (only true for Nook)
* @return
*/ */
public boolean defaultPhoneLayout() { public boolean defaultPhoneLayout() {
return false; return false;

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

Loading…
Cancel
Save