Merge branch 'master' into unifiedtabletphone-ui

Conflicts:
	astrid/plugin-src/com/todoroo/astrid/actfm/TagViewActivity.java
	astrid/src/com/todoroo/astrid/activity/TaskEditActivity.java
	astrid/src/com/todoroo/astrid/activity/TaskListActivity.java
pull/14/head
Arne Jans 13 years ago
commit 28a339467f

3
.gitignore vendored

@ -4,8 +4,9 @@
org.eclipse.ltk.core.refactoring.prefs
gen
local.properties
ecbuild
antbuild
astrid/bin
astrid/ecbuild
astrid/src-combined
release
dev

@ -0,0 +1,2 @@
# output files and apk
out.dir=antbuild

@ -10,6 +10,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import android.content.ContentValues;
import android.os.Parcel;
@ -67,6 +68,9 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
/** Values from database */
protected ContentValues values = null;
/** Transitory Metadata (not saved in database) */
protected HashMap<String, Object> transitoryData = null;
/** Get database-read values for this object */
public ContentValues getDatabaseValues() {
return values;
@ -160,6 +164,7 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
// clears user-set values
setValues = null;
transitoryData = null;
for (Property<?> property : cursor.getProperties()) {
try {
@ -345,6 +350,21 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
return (getValue(property) & flag) > 0;
}
// --- setting and retrieving flags
public synchronized void putTransitory(String key, Object value) {
if(transitoryData == null)
transitoryData = new HashMap<String, Object>();
transitoryData.put(key, value);
}
public Object getTransitory(String key) {
if(transitoryData == null)
return null;
return transitoryData.get(key);
}
// --- property management
/**

@ -171,6 +171,17 @@ public final class Task extends RemoteModel {
/** whether task is read-only */
public static final int FLAG_IS_READONLY = 1 << 2;
// --- user id special values
/** user id = read user email value */
public static final long USER_ID_EMAIL = -2L;
/** user id = unassigned */
public static final long USER_ID_UNASSIGNED = -1L;
/** user id = myself */
public static final long USER_ID_SELF = 0L;
// --- notification flags
/** whether to send a reminder at deadline */

@ -148,14 +148,28 @@ public abstract class SyncProvider<TYPE extends SyncContainer> {
notification.flags |= Notification.FLAG_ONGOING_EVENT;
}
/**
* Synchronize this provider with sync toast
* @param context
*/
public void synchronize(final Context context) {
synchronize(context, true);
}
/**
* Synchronize this provider
* @param context
* @param showSyncToast should we toast to indicate synchronizing?
*/
public void synchronize(final Context context, final boolean showSyncToast) {
// display toast
if(context instanceof Activity) {
if(getUtilities().isLoggedIn() && getUtilities().shouldShowToast()) {
((Activity) context).runOnUiThread(new Runnable() {
@Override
public void run() {
makeSyncToast(context);
if(showSyncToast)
makeSyncToast(context);
}
});
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timsu.astrid"
android:versionName="3.9.0.2"
android:versionName="3.9.1"
android:versionCode="204">
<!-- widgets, alarms, and services will break if Astrid is installed on SD card -->

@ -1,7 +1,7 @@
# Astrid build properties
# output files and apk
out.dir=bin
out.dir=antbuild
# source directory must be underneath output directory
# because we pull in from multiple source folders

@ -212,11 +212,13 @@
<!-- Zip aligns the APK -->
<mkdir dir="../release" />
<property name="out.final.package"
<property name="out.final.file" location="${out.absolute.dir}/${ant.project.name}-release.apk" />
<property name="out.release.file"
location="../release/${ant.project.name}-${manifest.version.code}-${manifest.version.name}-release.apk" />
<zipalign-helper in.package="${out.unaligned.file}"
out.package="${out.final.package}" />
<echo>Final Release Package: ${out.final.package}</echo>
out.package="${out.final.file}" />
<copy file="${out.final.file}" tofile="${out.release.file}" />
<echo>Final Release Package: ${out.release.file}</echo>
<record-build-info />
</target>

@ -234,7 +234,7 @@ public class C2DMReceiver extends BroadcastReceiver {
if(cursor.getCount() == 0) {
task.setValue(Task.TITLE, intent.getStringExtra("title"));
task.setValue(Task.REMOTE_ID, Long.parseLong(intent.getStringExtra("task_id")));
task.setValue(Task.USER_ID, -1L); // set it to invalid number because we don't know whose it is
task.setValue(Task.USER_ID, Task.USER_ID_UNASSIGNED);
Flags.set(Flags.ACTFM_SUPPRESS_SYNC);
taskService.save(task);

@ -40,6 +40,7 @@ import android.content.res.Configuration;
import android.graphics.PixelFormat;
import android.os.Build;
import android.os.Bundle;
import android.text.InputType;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.view.View.OnClickListener;
@ -224,6 +225,9 @@ public class ActFmLoginActivity extends Activity implements AuthListener {
final EditText name = addEditField(body,
R.string.actfm_ALA_name_label);
name.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PERSON_NAME |
InputType.TYPE_TEXT_FLAG_CAP_WORDS);
final AtomicReference<AlertDialog> dialog = new AtomicReference<AlertDialog>();
final AtomicBoolean isNew = new AtomicBoolean(true);
@ -255,6 +259,8 @@ public class ActFmLoginActivity extends Activity implements AuthListener {
final EditText email = addEditField(body,
R.string.actfm_ALA_email_label);
email.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
getCredentials(new OnGetCredentials() {
@Override
public void getCredentials(String[] accounts) {
@ -265,6 +271,8 @@ public class ActFmLoginActivity extends Activity implements AuthListener {
final EditText password = addEditField(body,
R.string.actfm_ALA_password_label);
password.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PASSWORD);
password.setTransformationMethod(new PasswordTransformationMethod());
password.setText(generateRandomPassword());

@ -2,7 +2,6 @@ package com.todoroo.astrid.actfm;
import greendroid.widget.AsyncImageView;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@ -13,7 +12,6 @@ import org.json.JSONObject;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@ -40,23 +38,16 @@ import android.widget.Toast;
import com.timsu.astrid.R;
import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.ContextManager;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.actfm.sync.ActFmInvoker;
import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
import com.todoroo.astrid.actfm.sync.ActFmSyncService;
import com.todoroo.astrid.actfm.sync.ActFmSyncService.JsonHelper;
import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.dao.MetadataDao.MetadataCriteria;
import com.todoroo.astrid.data.Metadata;
import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.service.AstridDependencyInjector;
import com.todoroo.astrid.service.MetadataService;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.service.TagDataService;
import com.todoroo.astrid.service.TaskService;
import com.todoroo.astrid.service.ThemeService;
@ -64,7 +55,6 @@ import com.todoroo.astrid.tags.TagService;
import com.todoroo.astrid.ui.PeopleContainer;
import com.todoroo.astrid.ui.PeopleContainer.OnAddNewPersonListener;
import com.todoroo.astrid.ui.PopupControlSet;
import com.todoroo.astrid.utility.Flags;
public class EditPeopleControlSet extends PopupControlSet {
@ -108,8 +98,6 @@ public class EditPeopleControlSet extends PopupControlSet {
private final ArrayList<AssignedToUser> listValues = new ArrayList<AssignedToUser>();
private String saveToast = null;
private final int loginRequestCode;
static {
@ -302,12 +290,14 @@ public class EditPeopleControlSet extends PopupControlSet {
}
JSONObject myself = new JSONObject();
myself.put("id", 0L);
myself.put("id", Task.USER_ID_SELF);
sharedPeople.add(0, myself);
if (actFmPreferenceService.isLoggedIn()) {
boolean hasTags = task.getTransitory("tags") != null &&
((HashSet<String>)task.getTransitory("tags")).size() > 0;
if (actFmPreferenceService.isLoggedIn() && hasTags) {
JSONObject unassigned = new JSONObject();
unassigned.put("id", -1L);
unassigned.put("id", Task.USER_ID_UNASSIGNED);
sharedPeople.add(1, unassigned);
}
@ -361,15 +351,15 @@ public class EditPeopleControlSet extends PopupControlSet {
for (int i = 0; i < listValues.size(); i++) {
JSONObject user = listValues.get(i).user;
if (user != null) {
if (user.optLong("id") == assignedId || (user.optString("email").equals(assignedEmail) && !(TextUtils.isEmpty(assignedEmail))))
if (user.optLong("id") == assignedId ||
(user.optString("email").equals(assignedEmail) &&
!(TextUtils.isEmpty(assignedEmail))))
assignedIndex = i;
}
}
}
final int selected = assignedIndex;
// final ArrayAdapter<AssignedToUser> usersAdapter = new ArrayAdapter<AssignedToUser>(activity,
// android.R.layout.simple_list_item_single_choice, listValues);
final AssignedUserAdapter usersAdapter = new AssignedUserAdapter(activity, listValues);
activity.runOnUiThread(new Runnable() {
@ -388,6 +378,7 @@ public class EditPeopleControlSet extends PopupControlSet {
super(context, R.layout.assigned_adapter_row, people);
}
@SuppressWarnings("nls")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if(convertView == null)
@ -425,7 +416,7 @@ public class EditPeopleControlSet extends PopupControlSet {
long id) {
AssignedToUser user = (AssignedToUser) assignedList.getAdapter().getItem(position);
assignedDisplay.setText(user.toString());
assignedCustom.setText("");
assignedCustom.setText(""); //$NON-NLS-1$
refreshDisplayView();
DialogUtilities.dismissDialog(activity, dialog);
}
@ -435,7 +426,7 @@ public class EditPeopleControlSet extends PopupControlSet {
assignedClear.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
assignedCustom.setText("");
assignedCustom.setText(""); //$NON-NLS-1$
assignedList.setItemChecked(0, true);
}
});
@ -477,8 +468,8 @@ public class EditPeopleControlSet extends PopupControlSet {
if(task == null)
return false;
saveToast = toast;
boolean dirty = false;
String sharedToast = null;
try {
JSONObject userJson = null;
TextView assignedView = null;
@ -498,11 +489,14 @@ public class EditPeopleControlSet extends PopupControlSet {
activity.getString(R.string.actfm_EPA_invalid_email, userJson.optString("email")));
}
if(userJson == null || userJson.optLong("id", -2) == 0) {
dirty = task.getValue(Task.USER_ID) == 0L ? dirty : true;
task.setValue(Task.USER_ID, 0L);
if(userJson == null || userJson.optLong("id", Task.USER_ID_EMAIL) == Task.USER_ID_SELF) {
dirty = task.getValue(Task.USER_ID) == Task.USER_ID_SELF ? dirty : true;
task.setValue(Task.USER_ID, Task.USER_ID_SELF);
if(!TextUtils.isEmpty(task.getValue(Task.USER)))
task.setValue(Task.USER, "{}");
task.setValue(Task.USER, "");
} else if(userJson.optLong("id") == Task.USER_ID_UNASSIGNED) {
dirty = task.getValue(Task.USER_ID) == Task.USER_ID_UNASSIGNED ? dirty : true;
task.setValue(Task.USER_ID, Task.USER_ID_UNASSIGNED);
} else {
String user = userJson.toString();
@ -510,21 +504,29 @@ public class EditPeopleControlSet extends PopupControlSet {
String taskUserEmail = "";
try {
JSONObject taskUser = new JSONObject(task.getValue(Task.USER));
taskUserId = taskUser.optLong("id", -2);
taskUserId = taskUser.optLong("id", Task.USER_ID_EMAIL);
taskUserEmail = taskUser.optString("email");
} catch (JSONException e) {
// sad times
}
long userId = userJson.optLong("id", -2);
long userId = userJson.optLong("id", Task.USER_ID_EMAIL);
String userEmail = userJson.optString("email");
boolean match = (userId == taskUserId && userId != -2);
boolean match = (userId == taskUserId && userId != Task.USER_ID_EMAIL);
match = match || (userEmail.equals(taskUserEmail) && !TextUtils.isEmpty(userEmail));
dirty = match ? dirty : true;
task.setValue(Task.USER_ID, userJson.optLong("id", -2));
task.setValue(Task.USER_ID, userJson.optLong("id", Task.USER_ID_EMAIL));
task.setValue(Task.USER, user);
String assignedName = userJson.optString("name", userEmail);
if(task.getTransitory("tags") == null ||
((HashSet<String>)task.getTransitory("tags")).size() == 0) {
sharedToast = activity.getString(R.string.actfm_EPA_assigned_toast, assignedName,
assignedName);
}
}
JSONObject sharedWith = parseSharedWithAndTags();
@ -543,13 +545,15 @@ public class EditPeopleControlSet extends PopupControlSet {
public void onClick(DialogInterface d, int which) {
makePrivateTask();
AssignedToUser me = (AssignedToUser) assignedList.getAdapter().getItem(0);
task.setValue(Task.USER_ID, me.user.optLong("id", -2));
task.setValue(Task.USER_ID, me.user.optLong("id", Task.USER_ID_EMAIL));
task.setValue(Task.USER, me.user.toString());
}
};
DialogUtilities.okCancelCustomDialog(activity, activity.getString(R.string.actfm_EPA_login_button),
activity.getString(R.string.actfm_EPA_login_to_share), R.string.actfm_EPA_login_button,
R.string.actfm_EPA_dont_share_button, android.R.drawable.ic_dialog_alert, okListener, cancelListener);
R.string.actfm_EPA_dont_share_button, android.R.drawable.ic_dialog_alert,
okListener, cancelListener);
showSaveToast(toast);
return false;
}
@ -557,14 +561,11 @@ public class EditPeopleControlSet extends PopupControlSet {
if(!TextUtils.isEmpty(task.getValue(Task.SHARED_WITH)) || sharedWith.length() != 0)
task.setValue(Task.SHARED_WITH, sharedWith.toString());
if(dirty)
taskService.save(task);
task.putTransitory("task-assigned", true);
if(dirty)
shareTask(sharedWith);
else
showSaveToast();
if(sharedToast != null)
toast = (toast != null) ? toast + "\n" + sharedToast : sharedToast + "\n";
showSaveToast(toast);
return true;
} catch (JSONException e) {
@ -582,12 +583,14 @@ public class EditPeopleControlSet extends PopupControlSet {
private void makePrivateTask() {
assignToMe();
sharedWithContainer.removeAllViews();
sharedWithContainer.addPerson("");
sharedWithContainer.addPerson(""); //$NON-NLS-1$
refreshDisplayView();
}
private void showSaveToast() {
int length = saveToast.indexOf('\n') > -1 ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT;
private void showSaveToast(String saveToast) {
if(saveToast == null) return;
int length = saveToast.contains("\n") ? //$NON-NLS-1$
Toast.LENGTH_LONG : Toast.LENGTH_SHORT;
Toast.makeText(activity, saveToast, length).show();
}
@ -631,104 +634,6 @@ public class EditPeopleControlSet extends PopupControlSet {
return sharedWith;
}
@SuppressWarnings("nls")
private void shareTask(final JSONObject sharedWith) {
final JSONArray emails = sharedWith.optJSONArray("p");
final ProgressDialog pd = DialogUtilities.progressDialog(activity,
activity.getString(R.string.DLG_please_wait));
new Thread() {
@Override
public void run() {
ActFmInvoker invoker = new ActFmInvoker(actFmPreferenceService.getToken());
try {
if(task.getValue(Task.REMOTE_ID) == 0) {
actFmSyncService.pushTask(task.getId());
task.setValue(Task.REMOTE_ID, taskService.fetchById(task.getId(),
Task.REMOTE_ID).getValue(Task.REMOTE_ID));
}
if(task.getValue(Task.REMOTE_ID) == 0) {
DialogUtilities.okDialog(activity, "We had an error saving " +
"this task to Astrid.com. Could you let us know why this happened?", null);
return;
}
Object[] args = buildSharingArgs(emails);
JSONObject result = invoker.invoke("task_share", args);
sharedWith.remove("p");
task.setValue(Task.SHARED_WITH, sharedWith.toString());
task.setValue(Task.DETAILS_DATE, 0L);
readTagData(result.getJSONArray("tags"));
JSONObject assignee = result.getJSONObject("assignee");
JsonHelper.readUser(assignee,
task, Task.USER_ID, Task.USER);
Flags.set(Flags.ACTFM_SUPPRESS_SYNC);
taskService.save(task);
String assignedName = assignee.optString("name");
long id = assignee.optLong("id", -2);
if (!(id == -2 || id == ActFmPreferenceService.userId() || assignedName == null)) {
saveToast += "\n" +
activity.getString(R.string.actfm_EPA_assigned_toast, assignedName);
}
int count = result.optInt("shared", 0);
if(count > 0) {
saveToast += "\n" +
activity.getString(R.string.actfm_EPA_emailed_toast,
activity.getResources().getQuantityString(R.plurals.Npeople, count, count));
StatisticsService.reportEvent(StatisticsConstants.ACTFM_TASK_SHARED);
}
Intent broadcastIntent = new Intent(AstridApiConstants.BROADCAST_EVENT_REFRESH);
ContextManager.getContext().sendBroadcast(broadcastIntent, AstridApiConstants.PERMISSION_READ);
DialogUtilities.dismissDialog(activity, pd);
activity.runOnUiThread(new Runnable() {
public void run() {
showSaveToast();
activity.finish();
}
});
} catch (IOException e) {
DialogUtilities.okDialog(activity,
activity.getString(R.string.SyP_ioerror),
android.R.drawable.ic_dialog_alert, e.toString(), null);
} catch (JSONException e) {
DialogUtilities.okDialog(activity,
activity.getString(R.string.SyP_ioerror),
android.R.drawable.ic_dialog_alert, e.toString(), null);
} finally {
DialogUtilities.dismissDialog(activity, pd);
}
}
}.start();
}
@SuppressWarnings("nls")
private void readTagData(JSONArray tags) throws JSONException {
ArrayList<Metadata> metadata = new ArrayList<Metadata>();
for(int i = 0; i < tags.length(); i++) {
JSONObject tagObject = tags.getJSONObject(i);
TagData tagData = tagDataService.getTag(tagObject.getString("name"), TagData.ID);
if(tagData == null)
tagData = new TagData();
ActFmSyncService.JsonHelper.tagFromJson(tagObject, tagData);
tagDataService.save(tagData);
Metadata tagMeta = new Metadata();
tagMeta.setValue(Metadata.KEY, TagService.KEY);
tagMeta.setValue(TagService.TAG, tagData.getValue(TagData.NAME));
tagMeta.setValue(TagService.REMOTE_ID, tagData.getValue(TagData.REMOTE_ID));
metadata.add(tagMeta);
}
metadataService.synchronizeMetadata(task.getId(), metadata, MetadataCriteria.withKey(TagService.KEY));
}
@SuppressWarnings("nls")
protected Object[] buildSharingArgs(JSONArray emails) throws JSONException {
ArrayList<Object> values = new ArrayList<Object>();
@ -783,8 +688,11 @@ public class EditPeopleControlSet extends PopupControlSet {
/** Resume save
* @param data */
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == loginRequestCode && resultCode == Activity.RESULT_OK)
saveSharingSettings(saveToast);
if(requestCode == loginRequestCode && resultCode == Activity.RESULT_OK) {
// clear user values & reset them to trigger a save
task.clearValue(Task.USER_ID);
task.clearValue(Task.USER);
}
else if (requestCode == loginRequestCode)
makePrivateTask();
}

@ -252,7 +252,6 @@ public class TagSettingsActivity extends Activity {
} catch (JSONException e) {
Log.e("tag-view-activity", "json error refresh owner", e);
ownerLabel.setText("<error>");
System.err.println(tagData.getValue(TagData.USER));
}
String peopleJson = tagData.getValue(TagData.MEMBERS);
@ -267,8 +266,7 @@ public class TagSettingsActivity extends Activity {
JSONArray people = new JSONArray(peopleJson);
tagMembers.fromJSONArray(people);
} catch (JSONException e) {
System.err.println(peopleJson);
Log.e("tag-view-activity", "json error refresh members", e);
Log.e("tag-view-activity", "json error refresh members - " + peopleJson, e);
}
}

@ -381,7 +381,6 @@ public class TagViewActivity extends TaskListActivity {
}
image.setOnClickListener(listenerForImage(memberToUse, id, memberName));
} catch (JSONException e) {
System.err.println("Unable to create listener");
e.printStackTrace();
}
membersView.addView(image);
@ -405,7 +404,6 @@ public class TagViewActivity extends TaskListActivity {
assignedCriterion = Task.USER_ID.eq(id);
Criterion assigned = Criterion.and(TaskCriteria.activeAndVisible(), assignedCriterion);
filter = TagFilterExposer.filterFromTag(getActivity(), new Tag(tagData), assigned);
System.err.println("Filter: " + filter.sqlQuery); //$NON-NLS-1$
TextView filterByAssigned = (TextView) getView().findViewById(R.id.filter_assigned);
filterByAssigned.setVisibility(View.VISIBLE);
filterByAssigned.setText(getString(R.string.actfm_TVA_filtered_by_assign, displayName));

@ -26,7 +26,7 @@ import com.todoroo.andlib.utility.Preferences;
public class ActFmInvoker {
/** NOTE: these values are development values & will not work on production */
private static final String URL = "//10.0.0.2:3000/api/";
private static final String URL = "//10.0.2.2:3000/api/";
private static final String APP_ID = "a4732a32859dbcd3e684331acd36432c";
private static final String APP_SECRET = "e389bfc82a0d932332f9a8bd8203735f";
@ -211,7 +211,6 @@ public class ActFmInvoker {
}
sigBuilder.append(APP_SECRET);
System.err.println("SIG: " + sigBuilder);
String signature = DigestUtils.md5Hex(sigBuilder.toString());
requestBuilder.append("sig").append('=').append(signature);
return requestBuilder.toString();

@ -111,7 +111,6 @@ public class ActFmPreferenceService extends SyncProviderUtilities {
user.put("email", Preferences.getStringValue(PREF_EMAIL));
user.put("picture", Preferences.getStringValue(PREF_PICTURE));
user.put("id", Preferences.getLong(PREF_USER_ID, 0));
System.err.println(user);
} catch (JSONException e) {
throw new RuntimeException(e);
}

@ -44,7 +44,6 @@ import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.sync.SyncProvider;
import com.todoroo.astrid.sync.SyncProviderUtilities;
import com.todoroo.astrid.utility.Constants;
import com.todoroo.astrid.utility.Flags;
@SuppressWarnings("nls")
public class ActFmSyncProvider extends SyncProvider<ActFmTaskContainer> {
@ -124,12 +123,6 @@ public class ActFmSyncProvider extends SyncProvider<ActFmTaskContainer> {
}
}
protected void makeSyncToast(Context context) {
if (!Flags.checkAndClear(Flags.ACTFM_SUPPRESS_SYNC_TOAST)) {
super.makeSyncToast(context);
}
}
// ----------------------------------------------------------------------
// ----------------------------------------------------- synchronization!
// ----------------------------------------------------------------------

@ -118,7 +118,7 @@ public final class ActFmSyncService {
public void onModelUpdated(final Task model) {
if(Flags.checkAndClear(Flags.ACTFM_SUPPRESS_SYNC))
return;
if (actFmPreferenceService.isOngoing())
if (actFmPreferenceService.isOngoing() && model.getTransitory("task-edit-save") == null)
return;
final ContentValues setValues = model.getSetValues();
if(setValues == null || !checkForToken() || setValues.containsKey(RemoteModel.REMOTE_ID_PROPERTY_NAME))
@ -319,7 +319,7 @@ public final class ActFmSyncService {
if(values.containsKey(Task.DELETION_DATE.name)) {
params.add("deleted_at"); params.add(task.getValue(Task.DELETION_DATE) / 1000L);
}
if(Flags.checkAndClear(Flags.ACTFM_REPEATED_TASK)) {
if(task.getTransitory("repeat-complete") != null) {
params.add("completed"); params.add(DateUtilities.now() / 1000L);
} else if(values.containsKey(Task.COMPLETION_DATE.name)) {
params.add("completed"); params.add(task.getValue(Task.COMPLETION_DATE) / 1000L);
@ -334,14 +334,25 @@ public final class ActFmSyncService {
recurrence = recurrence + ";FROM=COMPLETION";
params.add("repeat"); params.add(recurrence);
}
long userId = task.getValue(Task.USER_ID);
if(values.containsKey(Task.USER_ID.name) && userId >= 0 || userId == -1) {
params.add("user_id");
if(task.getValue(Task.USER_ID) == 0)
params.add(ActFmPreferenceService.userId());
else
params.add(task.getValue(Task.USER_ID));
if(values.containsKey(Task.USER_ID.name) && task.getTransitory("task-assigned") != null) {
if(task.getValue(Task.USER_ID) == Task.USER_ID_EMAIL) {
try {
JSONObject user = new JSONObject(task.getValue(Task.USER));
params.add("user_email");
params.add(user.get("email"));
} catch (JSONException e) {
Log.e("Error parsing user", task.getValue(Task.USER), e);
}
} else {
params.add("user_id");
if(task.getValue(Task.USER_ID) == Task.USER_ID_SELF)
params.add(ActFmPreferenceService.userId());
else
params.add(task.getValue(Task.USER_ID));
}
}
if(Flags.checkAndClear(Flags.TAGS_CHANGED) || newlyCreated) {
TodorooCursor<Metadata> cursor = TagService.getInstance().getTags(task.getId());
try {

@ -216,7 +216,6 @@ public class GtasksSyncProvider extends SyncProvider<GtasksTaskContainer> {
} catch (IOException e) {
handleException("gtasks-sync", e, true);
} finally {
System.err.println("Sent " + localCreated.getCount() + " new tasks");
localCreated.close();
}
}

@ -264,7 +264,6 @@ public class ProducteevSyncProvider extends SyncProvider<ProducteevTaskContainer
} catch (IOException e) {
handleException("gtasks-sync", e, true);
} finally {
System.err.println("Sent " + localCreated.getCount() + " new tasks");
localCreated.close();
}
}

@ -75,7 +75,7 @@ public class RepeatTaskCompleteListener extends BroadcastReceiver {
task.setValue(Task.COMPLETION_DATE, 0L);
task.setValue(Task.DUE_DATE, newDueDate);
task.setValue(Task.HIDE_UNTIL, hideUntil);
Flags.set(Flags.ACTFM_REPEATED_TASK);
task.putTransitory("repeat-complete", true); //$NON-NLS-1$
PluginServices.getTaskService().save(task);
return;
}

@ -2,6 +2,7 @@ package com.todoroo.astrid.tags;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import android.app.Activity;
@ -99,7 +100,7 @@ public final class TagsControlSet extends PopupControlSet {
LinkedHashSet<String> tags = getTagSet();
for (String tag : tags) {
if (builder.length() != 0)
builder.append(", ");
builder.append(", "); //$NON-NLS-1$
builder.append(tag);
}
@ -231,16 +232,19 @@ public final class TagsControlSet extends PopupControlSet {
if(task.getId() != AbstractModel.NO_ID) {
TodorooCursor<Metadata> cursor = tagService.getTags(task.getId());
HashSet<String> tags = new HashSet<String>(cursor.getCount());
try {
for(cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
String tag = cursor.get(TagService.TAG);
setTagSelected(tag);
tags.add(tag);
}
} finally {
cursor.close();
}
task.putTransitory("tags", tags); //$NON-NLS-1$
}
addTag("", false);
addTag("", false); //$NON-NLS-1$
refreshDisplayView();
populated = true;
}

@ -56,7 +56,6 @@ public class TimerPlugin extends BroadcastReceiver {
task.setValue(Task.TIMER_START, 0L);
task.setValue(Task.ELAPSED_SECONDS,
task.getValue(Task.ELAPSED_SECONDS) + newElapsed);
System.err.println("Elapsed: " + task.getValue(Task.ELAPSED_SECONDS));
StatisticsService.reportEvent(StatisticsConstants.TIMER_STOP);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -60,7 +60,7 @@
android:layout_height="fill_parent"
android:background="@drawable/footer_editbutton"
android:gravity="center"
android:text="@string/FLA_new_filter"
android:text="@string/FLA_new_list"
android:textStyle="bold"
style="@style/TextAppearance.TEA_action"/>

@ -106,7 +106,7 @@
<string name="actfm_EPA_share_with">Share with:</string>
<!-- Toast when assigning a task -->
<string name="actfm_EPA_assigned_toast">Sent to %2$s (you can see on a new shared list between you and %2$s).</string>
<string name="actfm_EPA_assigned_toast">Sent to %1$s (you can see it in the list between you and %2$s).</string>
<!-- task sharing dialog: shared with label -->
<string name="actfm_EPA_collaborators_header">Share with Friends</string>

@ -246,7 +246,10 @@
<string name="FLA_toast_onCreateShortcut">Created Shortcut: %s</string>
<!-- Menu: new filter -->
<string name="FLA_new_filter">New List</string>
<string name="FLA_new_filter">New Filter</string>
<!-- Button: new list -->
<string name="FLA_new_list">New List</string>
<!-- ================================================= TaskEditActivity == -->

@ -41,10 +41,10 @@ public abstract class AbstractModel {
protected ContentValues setValues = new ContentValues();
/** Cached values from database */
private final ContentValues values = new ContentValues();
private final ContentValues values = new ContentValues();
/** Cursor into the database */
private Cursor cursor = null;
private Cursor cursor = null;
// --- constructors

@ -54,8 +54,6 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RemoteViews;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
@ -157,7 +155,7 @@ public final class TaskEditActivity extends Fragment {
public static final String TAB_MORE = "more"; //$NON-NLS-1$
public static final String OVERRIDE_FINISH_ANIM = "finishAnim";
public static final String OVERRIDE_FINISH_ANIM = "finishAnim"; //$NON-NLS-1$
// --- services
@ -210,7 +208,6 @@ public final class TaskEditActivity extends Fragment {
private VoiceInputAssistant voiceNoteAssistant;
private EditText notesEditText;
private ScrollView scrollView;
private Dialog whenDialog;
@ -255,8 +252,6 @@ public final class TaskEditActivity extends Fragment {
// during a configuration change.
setRetainInstance(true);
overrideFinishAnim = getActivity().getIntent().getBooleanExtra(OVERRIDE_FINISH_ANIM, true);
new StartupService().onStartupApplication(getActivity());
// if we were editing a task already, restore it
@ -296,6 +291,9 @@ public final class TaskEditActivity extends Fragment {
mDualFragments = (tasklistFrame != null) && tasklistFrame.isInLayout();
setUpUIComponents();
adjustInfoPopovers();
overrideFinishAnim = getActivity().getIntent().getBooleanExtra(OVERRIDE_FINISH_ANIM, true);
// disable keyboard until user requests it
AndroidUtilities.suppressVirtualKeyboard(title);
@ -303,10 +301,9 @@ public final class TaskEditActivity extends Fragment {
/** Initialize UI components */
private void setUpUIComponents() {
scrollView = (ScrollView) getView().findViewById(R.id.edit_scroll);
LinearLayout basicControls = (LinearLayout) getView().findViewById(R.id.basic_controls);
LinearLayout whenDialogView = (LinearLayout) LayoutInflater.from(getActivity()).inflate(R.layout.task_edit_when_controls, null);
LinearLayout whenDialogView = (LinearLayout) LayoutInflater.from(getActivity()).inflate(
R.layout.task_edit_when_controls, null);
LinearLayout whenControls = (LinearLayout) whenDialogView.findViewById(R.id.when_controls);
LinearLayout whenHeader = (LinearLayout) getView().findViewById(R.id.when_header);
LinearLayout moreControls = (LinearLayout) getView().findViewById(R.id.more_controls);
@ -316,52 +313,82 @@ public final class TaskEditActivity extends Fragment {
HashMap<String, TaskEditControlSet> controlSetMap = new HashMap<String, TaskEditControlSet>();
// populate control set
EditTitleControlSet editTitle = new EditTitleControlSet(getActivity(), R.layout.control_set_title, Task.TITLE, R.id.title);
EditTitleControlSet editTitle = new EditTitleControlSet(getActivity(),
R.layout.control_set_title, Task.TITLE, R.id.title);
title = (EditText) editTitle.getView().findViewById(R.id.title);
controls.add(editTitle);
controlSetMap.put(getString(R.string.TEA_ctrl_title_pref), editTitle);
TimerActionControlSet timerAction = new TimerActionControlSet(getActivity(), editTitle.getView());
TimerActionControlSet timerAction = new TimerActionControlSet(getActivity(),
editTitle.getView());
controls.add(timerAction);
controls.add(peopleControlSet = new EditPeopleControlSet(getActivity(), R.layout.control_set_assigned, R.layout.control_set_assigned_display, R.string.actfm_EPA_assign_label, REQUEST_LOG_IN));
controlSetMap.put(getString(R.string.TEA_ctrl_who_pref), peopleControlSet);
DeadlineControlSet deadlineControl = new DeadlineControlSet(getActivity(), R.layout.control_set_deadline, R.layout.control_set_deadline_display, whenHeader, R.id.aux_date, R.id.when_shortcut_container, R.id.when_label, R.id.when_image);
controls.add(peopleControlSet = new EditPeopleControlSet(
getActivity(), R.layout.control_set_assigned,
R.layout.control_set_assigned_display,
R.string.actfm_EPA_assign_label, REQUEST_LOG_IN));
controlSetMap.put(getString(R.string.TEA_ctrl_who_pref),
peopleControlSet);
DeadlineControlSet deadlineControl = new DeadlineControlSet(
getActivity(), R.layout.control_set_deadline,
R.layout.control_set_deadline_display, whenHeader,
R.id.aux_date, R.id.when_shortcut_container, R.id.when_label,
R.id.when_image);
controls.add(deadlineControl);
whenControls.addView(deadlineControl.getDisplayView());
RepeatControlSet repeatControls = new RepeatControlSet(getActivity(), R.layout.control_set_repeat, R.layout.control_set_repeat_display, R.string.repeat_enabled);
RepeatControlSet repeatControls = new RepeatControlSet(
getActivity(), R.layout.control_set_repeat,
R.layout.control_set_repeat_display, R.string.repeat_enabled);
controls.add(repeatControls);
whenControls.addView(repeatControls.getDisplayView());
GCalControlSet gcalControl = new GCalControlSet(getActivity(), R.layout.control_set_gcal, R.layout.control_set_gcal_display, R.string.gcal_TEA_addToCalendar_label);
GCalControlSet gcalControl = new GCalControlSet(getActivity(),
R.layout.control_set_gcal, R.layout.control_set_gcal_display,
R.string.gcal_TEA_addToCalendar_label);
controls.add(gcalControl);
whenControls.addView(gcalControl.getDisplayView());
hideUntilControls = new HideUntilControlSet(getActivity(), R.layout.control_set_hide, R.layout.control_set_hide_display, R.string.hide_until_prompt);
hideUntilControls = new HideUntilControlSet(getActivity(),
R.layout.control_set_hide, R.layout.control_set_hide_display,
R.string.hide_until_prompt);
controls.add(hideUntilControls);
whenControls.addView(hideUntilControls.getDisplayView());
ImportanceControlSet importanceControl = new ImportanceControlSet(getActivity(), R.layout.control_set_importance);
ImportanceControlSet importanceControl = new ImportanceControlSet(
getActivity(), R.layout.control_set_importance);
controls.add(importanceControl);
importanceControl.addListener(editTitle);
controlSetMap.put(getString(R.string.TEA_ctrl_importance_pref), importanceControl);
controlSetMap.put(getString(R.string.TEA_ctrl_importance_pref),
importanceControl);
tagsControlSet = new TagsControlSet(getActivity(), R.layout.control_set_tags, R.layout.control_set_tags_display, R.string.TEA_tags_label);
tagsControlSet = new TagsControlSet(getActivity(),
R.layout.control_set_tags, R.layout.control_set_tags_display,
R.string.TEA_tags_label);
controls.add(tagsControlSet);
controlSetMap.put(getString(R.string.TEA_ctrl_lists_pref), tagsControlSet);
controlSetMap.put(getString(R.string.TEA_ctrl_lists_pref),
tagsControlSet);
notesControlSet = new EditNotesControlSet(getActivity(), R.layout.control_set_notes, R.layout.control_set_notes_display);
notesEditText = (EditText) notesControlSet.getView().findViewById(R.id.notes);
notesControlSet = new EditNotesControlSet(getActivity(),
R.layout.control_set_notes, R.layout.control_set_notes_display);
notesEditText = (EditText) notesControlSet.getView().findViewById(
R.id.notes);
controls.add(notesControlSet);
controlSetMap.put(getString(R.string.TEA_ctrl_notes_pref), notesControlSet);
controlSetMap.put(getString(R.string.TEA_ctrl_notes_pref),
notesControlSet);
ReminderControlSet reminderControl = new ReminderControlSet(getActivity(), R.layout.control_set_reminders, R.layout.control_set_reminders_display);
ReminderControlSet reminderControl = new ReminderControlSet(
getActivity(), R.layout.control_set_reminders,
R.layout.control_set_reminders_display);
controls.add(reminderControl);
controlSetMap.put(getString(R.string.TEA_ctrl_reminders_pref), reminderControl);
controlSetMap.put(getString(R.string.TEA_ctrl_reminders_pref),
reminderControl);
TimerControlSet timerControl = new TimerControlSet(getActivity(), R.layout.control_set_timers, R.layout.control_set_timers_extras_display, R.string.TEA_timer_controls);
TimerControlSet timerControl = new TimerControlSet(
getActivity(), R.layout.control_set_timers,
R.layout.control_set_timers_extras_display,
R.string.TEA_timer_controls);
timerAction.setListener(timerControl);
controls.add(timerControl);
controlSetMap.put(getString(R.string.TEA_ctrl_timer_pref), timerControl);
@ -372,7 +399,6 @@ public final class TaskEditActivity extends Fragment {
controls.add(producteevControl);
basicControls.addView(producteevControl.getDisplayView());
notesEditText.setHint(R.string.producteev_TEA_notes);
//((TextView) notesControlSet.getView().findViewById(R.id.notes)).setHint(R.string.producteev_TEA_notes);
}
} catch (Exception e) {
Log.e("astrid-error", "loading-control-set", e); //$NON-NLS-1$ //$NON-NLS-2$
@ -384,7 +410,6 @@ public final class TaskEditActivity extends Fragment {
controls.add(ocrxControl);
basicControls.addView(ocrxControl.getDisplayView());
notesEditText.setHint(R.string.opencrx_TEA_notes);
//((TextView) notesControlSet.getView().findViewById(R.id.notes)).setHint(R.string.opencrx_TEA_notes);
}
} catch (Exception e) {
Log.e("astrid-error", "loading-control-set", e); //$NON-NLS-1$ //$NON-NLS-2$
@ -683,13 +708,15 @@ public final class TaskEditActivity extends Fragment {
}
}
taskService.save(model);
String processedToast = addDueTimeToToast(toast.toString());
if(!onPause && peopleControlSet != null && !peopleControlSet.saveSharingSettings(processedToast))
return;
boolean cancelFinish = !onPause && peopleControlSet != null &&
!peopleControlSet.saveSharingSettings(processedToast);
if (!onPause) { // Saving during on pause could cause a double finish
model.putTransitory("task-edit-save", true); //$NON-NLS-1$
taskService.save(model);
if (!onPause && !cancelFinish) {
shouldSaveState = false;
getActivity().finish();
}
@ -732,9 +759,6 @@ public final class TaskEditActivity extends Fragment {
@Override
public void onReceive(Context context, Intent intent) {
try {
Bundle extras = intent.getExtras();
RemoteViews view = extras.getParcelable(AstridApiConstants.EXTRAS_RESPONSE);
// add a separator
View separator = new View(getActivity());
separator.setPadding(5, 5, 5, 5);
@ -914,6 +938,12 @@ public final class TaskEditActivity extends Fragment {
StatisticsService.sessionStop(getActivity());
}
private void adjustInfoPopovers() {
Preferences.setBoolean(R.string.p_showed_tap_task_help, true);
if (!Preferences.isSet(getString(R.string.p_showed_lists_help)))
Preferences.setBoolean(R.string.p_showed_lists_help, false);
}
/* ======================================================================
* ========================================== UI component helper classes
* ====================================================================== */

@ -550,8 +550,7 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
@Override
public void run() {
Preferences.setLong(LAST_AUTOSYNC_ATTEMPT, DateUtilities.now());
Flags.set(Flags.ACTFM_SUPPRESS_SYNC_TOAST);
new ActFmSyncProvider().synchronize(getActivity());
new ActFmSyncProvider().synchronize(getActivity(), false);
}
}.start();
}
@ -641,6 +640,12 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
if (!Preferences.getBoolean(R.string.p_showed_add_task_help, false)) {
HelpInfoPopover.showPopover(getActivity(), quickAddBox, R.string.help_popover_add_task, null);
Preferences.setBoolean(R.string.p_showed_add_task_help, true);
} else if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
showTaskEditHelpPopover();
} else if (Preferences.isSet(getString(R.string.p_showed_lists_help)) &&
!Preferences.getBoolean(R.string.p_showed_lists_help, false)) {
HelpInfoPopover.showPopover(getActivity(), getView().findViewById(R.id.back), R.string.help_popover_lists, null);
Preferences.setBoolean(R.string.p_showed_lists_help, true);
}
if (filter.title != null && filter.title.equals(getString(R.string.BFE_Active))) {
@ -889,7 +894,7 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
currentCursor.moveToPosition(i);
if(currentCursor.get(Task.ID) == withCustomId) {
getListView().setSelection(i);
showHelpPopover();
showTaskEditHelpPopover();
return;
}
}
@ -916,31 +921,35 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
currentCursor.moveToPosition(i);
if(currentCursor.get(Task.ID) == withCustomId) {
getListView().setSelection(i);
showHelpPopover();
showTaskEditHelpPopover();
break;
}
}
}
private void showHelpPopover() {
private void showTaskEditHelpPopover() {
if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
Preferences.setBoolean(R.string.p_showed_tap_task_help, true);
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(quickAddBox.getWindowToken(), 0);
getListView().postDelayed(new Runnable() {
public void run() {
final View view = getListView().getChildAt(getListView().getChildCount() - 1);
if (view != null) {
OnDismissListener onDismiss = new OnDismissListener() {
@Override
public void onDismiss() {
if (!Preferences.getBoolean(R.string.p_showed_lists_help, false)) {
Preferences.setBoolean(R.string.p_showed_lists_help, true);
HelpInfoPopover.showPopover(getActivity(), getView().findViewById(R.id.back), R.string.help_popover_lists, null);
if (taskAdapter.getCount() > 0) {
final View view = getListView().getChildAt(getListView().getChildCount() - 1);
if (view != null) {
OnDismissListener onDismiss = new OnDismissListener() {
@Override
public void onDismiss() {
if (!Preferences.isSet(getString(R.string.p_showed_lists_help))) {
Preferences.setBoolean(R.string.p_showed_lists_help, false);
} else if (!Preferences.getBoolean(R.string.p_showed_lists_help, false)) {
Preferences.setBoolean(R.string.p_showed_lists_help, true);
HelpInfoPopover.showPopover(getActivity(), getView().findViewById(R.id.back), R.string.help_popover_lists, null);
}
}
}
};
HelpInfoPopover.showPopover(getActivity(), view, R.string.help_popover_tap_task, onDismiss);
};
HelpInfoPopover.showPopover(getActivity(), view, R.string.help_popover_tap_task, onDismiss);
}
}
}
}, 1000L);

@ -24,7 +24,6 @@ import com.todoroo.astrid.reminders.ReminderService;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.utility.AstridPreferences;
import com.todoroo.astrid.utility.Flags;
/**
* Data Access layer for {@link Task}-related operations.
@ -286,7 +285,7 @@ public class TaskDao extends DatabaseDao<Task> {
* Astrid. Order matters here!
*/
public static void afterSave(Task task, ContentValues values) {
if(values == null || Flags.checkAndClear(Flags.SUPPRESS_HOOKS))
if(values == null)
return;
task.markSaved();

@ -39,7 +39,7 @@ import com.todoroo.astrid.utility.AstridPreferences;
public final class UpgradeService {
public static final int V3_9_0_2 = 204;
public static final int V3_9_1 = 204;
public static final int V3_9_0_1 = 203;
public static final int V3_9 = 202;
public static final int V3_8_5_1 = 201;
@ -161,12 +161,12 @@ public final class UpgradeService {
Preferences.clear(AstridPreferences.P_UPGRADE_FROM);
StringBuilder changeLog = new StringBuilder();
if (from >= V3_9 && from < V3_9_0_2) {
newVersionString(changeLog, "3.9.0.2 (12/21/11)", new String[] {
if (from >= V3_9 && from < V3_9_1) {
newVersionString(changeLog, "3.9.1 (12/23/11)", new String[] {
"UI enhancements, better scrolling performance, and themed task edit dialogs",
"Clickable links in task notes",
"Fixed fields that were getting hidden under the keyboard",
"Other small UI improvements and bug fixes"
"Minor UI improvements and bug fixes"
});
}

@ -184,7 +184,6 @@ public class AstridTimePicker extends LinearLayout {
toReturn += 12;
}
}
System.err.println("Returning hours: " + toReturn);
return toReturn;
}

@ -26,25 +26,10 @@ public class Flags {
*/
public static final int ACTFM_SUPPRESS_SYNC = 1 << 3;
/**
* If set, indicates save hooks should be suppressed
*/
public static final int SUPPRESS_HOOKS = 1 << 4;
/**
* If set, indicates to suppress the next gtasks sync attempt
*/
public static final int GTASKS_SUPPRESS_SYNC = 1 << 5;
/**
* If set, indicates next task was a completed repeating task
*/
public static final int ACTFM_REPEATED_TASK = 1 << 6;
/**
* If set, indicates to suppress the toast when synchronizing (used for act.fm autosync)
*/
public static final int ACTFM_SUPPRESS_SYNC_TOAST = 1 << 7;
public static final int GTASKS_SUPPRESS_SYNC = 1 << 4;
public static boolean checkAndClear(int flag) {
boolean set = (state & flag) > 0;

@ -0,0 +1,2 @@
# output files and apk
out.dir=antbuild

@ -0,0 +1,2 @@
# output files and apk
out.dir=antbuild

@ -42,7 +42,7 @@ public class NewRepeatTests<REMOTE_MODEL> extends DatabaseTestCase {
}
private void saveAndTriggerRepeatListener(Task task) {
Flags.set(Flags.SUPPRESS_HOOKS);
Flags.set(Flags.ACTFM_SUPPRESS_SYNC);
if(task.isSaved())
taskDao.saveExisting(task);
else

@ -52,7 +52,7 @@ public class RepeatTests extends DatabaseTestCase {
}
private void saveAndTriggerRepeatListener(Task task) {
Flags.set(Flags.SUPPRESS_HOOKS);
Flags.set(Flags.ACTFM_SUPPRESS_SYNC);
if(task.isSaved())
taskDao.saveExisting(task);
else

Loading…
Cancel
Save