diff --git a/api/build.xml b/api/build.xml
index 56f1f8344..51da4e741 100644
--- a/api/build.xml
+++ b/api/build.xml
@@ -103,14 +103,22 @@
+
+
diff --git a/api/src/com/todoroo/astrid/api/AstridApiConstants.java b/api/src/com/todoroo/astrid/api/AstridApiConstants.java
index e738eb200..54367876d 100644
--- a/api/src/com/todoroo/astrid/api/AstridApiConstants.java
+++ b/api/src/com/todoroo/astrid/api/AstridApiConstants.java
@@ -21,17 +21,22 @@ public class AstridApiConstants {
/**
* Astrid broadcast base package name
*/
- public static final String PACKAGE = "com.todoroo.astrid";
+ public static final String API_PACKAGE = "com.todoroo.astrid";
+
+ /**
+ * Astrid app base package name
+ */
+ public static final String ASTRID_PACKAGE = "com.timsu.astrid";
/**
* Permission for reading tasks and receiving to GET_FILTERS intent
*/
- public static final String PERMISSION_READ = PACKAGE + ".READ";
+ public static final String PERMISSION_READ = API_PACKAGE + ".READ";
/**
* Permission for writing and creating tasks
*/
- public static final String PERMISSION_WRITE = PACKAGE + ".WRITE";
+ public static final String PERMISSION_WRITE = API_PACKAGE + ".WRITE";
/**
* Name of Astrid's publicly readable preference store
@@ -82,34 +87,34 @@ public class AstridApiConstants {
/**
* Action name for broadcast intent requesting add-ons
*/
- public static final String BROADCAST_REQUEST_ADDONS = PACKAGE + ".REQUEST_ADDONS";
+ public static final String BROADCAST_REQUEST_ADDONS = API_PACKAGE + ".REQUEST_ADDONS";
/**
* Action name for broadcast intent sending add-ons back to Astrid
*
EXTRAS_RESPONSE an {@link Addon} object
*/
- public static final String BROADCAST_SEND_ADDONS = PACKAGE + ".SEND_ADDONS";
+ public static final String BROADCAST_SEND_ADDONS = API_PACKAGE + ".SEND_ADDONS";
// --- Filters API
/**
* Action name for broadcast intent requesting filters
*/
- public static final String BROADCAST_REQUEST_FILTERS = PACKAGE + ".REQUEST_FILTERS";
+ public static final String BROADCAST_REQUEST_FILTERS = API_PACKAGE + ".REQUEST_FILTERS";
/**
* Action name for broadcast intent sending filters back to Astrid
* EXTRAS_ADDON your add-on identifier
* EXTRAS_RESPONSE an array of {@link FilterListItem}s
*/
- public static final String BROADCAST_SEND_FILTERS = PACKAGE + ".SEND_FILTERS";
+ public static final String BROADCAST_SEND_FILTERS = API_PACKAGE + ".SEND_FILTERS";
// -- Custom criteria API
/**
* Action name for a broadcast intent requesting custom filter criteria (e.g. "Due by, Tagged, Tag contains", etc.)
*/
- public static final String BROADCAST_REQUEST_CUSTOM_FILTER_CRITERIA = PACKAGE + ".REQUEST_CUSTOM_FILTER_CRITERIA";
+ public static final String BROADCAST_REQUEST_CUSTOM_FILTER_CRITERIA = API_PACKAGE + ".REQUEST_CUSTOM_FILTER_CRITERIA";
/**
@@ -117,7 +122,7 @@ public class AstridApiConstants {
* EXTRAS_ADDON you add-on identifier
* EXTRAS_RESPONSE an array of {@link CustomFilterCriterion}
*/
- public static final String BROADCAST_SEND_CUSTOM_FILTER_CRITERIA = PACKAGE + ".SEND_CUSTOM_FILTER_CRITERIA";
+ public static final String BROADCAST_SEND_CUSTOM_FILTER_CRITERIA = API_PACKAGE + ".SEND_CUSTOM_FILTER_CRITERIA";
// --- Edit Controls API
@@ -125,14 +130,14 @@ public class AstridApiConstants {
* Action name for broadcast intent requesting task edit controls
* EXTRAS_TASK_ID id of the task user is editing
*/
- public static final String BROADCAST_REQUEST_EDIT_CONTROLS = PACKAGE + ".REQUEST_EDIT_CONTROLS";
+ public static final String BROADCAST_REQUEST_EDIT_CONTROLS = API_PACKAGE + ".REQUEST_EDIT_CONTROLS";
/**
* Action name for broadcast intent sending task edit controls back to Astrid
* EXTRAS_ADDON your add-on identifier
* EXTRAS_RESPONSE a {@link RemoteViews} with your edit controls
*/
- public static final String BROADCAST_SEND_EDIT_CONTROLS = PACKAGE + ".SEND_EDIT_CONTROLS";
+ public static final String BROADCAST_SEND_EDIT_CONTROLS = API_PACKAGE + ".SEND_EDIT_CONTROLS";
// --- Task Details API
@@ -143,7 +148,7 @@ public class AstridApiConstants {
* EXTRAS_TASK_ID id of the task
* EXTRAS_EXTENDED whether request is for standard or extended details
*/
- public static final String BROADCAST_REQUEST_DETAILS = PACKAGE + ".REQUEST_DETAILS";
+ public static final String BROADCAST_REQUEST_DETAILS = API_PACKAGE + ".REQUEST_DETAILS";
/**
* Action name for broadcast intent sending details back to Astrid
@@ -152,7 +157,7 @@ public class AstridApiConstants {
* EXTRAS_EXTENDED whether request is for standard or extended details
* EXTRAS_RESPONSE a String
*/
- public static final String BROADCAST_SEND_DETAILS = PACKAGE + ".SEND_DETAILS";
+ public static final String BROADCAST_SEND_DETAILS = API_PACKAGE + ".SEND_DETAILS";
// --- Sync Action API
@@ -160,14 +165,14 @@ public class AstridApiConstants {
* Action name for broadcast intent requesting a listing of active
* sync actions users can activate from the menu
*/
- public static final String BROADCAST_REQUEST_SYNC_ACTIONS = PACKAGE + ".REQUEST_SYNC_ACTIONS";
+ public static final String BROADCAST_REQUEST_SYNC_ACTIONS = API_PACKAGE + ".REQUEST_SYNC_ACTIONS";
/**
* Action name for broadcast intent sending sync provider information back to Astrid
* EXTRAS_ADDON your add-on identifier
* EXTRAS_RESPONSE a {@link SyncAction} to invoke synchronization
*/
- public static final String BROADCAST_SEND_SYNC_ACTIONS = PACKAGE + ".SEND_SYNC_ACTIONS";
+ public static final String BROADCAST_SEND_SYNC_ACTIONS = API_PACKAGE + ".SEND_SYNC_ACTIONS";
// --- Task Decorations API
@@ -175,7 +180,7 @@ public class AstridApiConstants {
* Action name for broadcast intent requesting task list decorations for a task
* EXTRAS_TASK_ID id of the task
*/
- public static final String BROADCAST_REQUEST_DECORATIONS = PACKAGE + ".REQUEST_DECORATIONS";
+ public static final String BROADCAST_REQUEST_DECORATIONS = API_PACKAGE + ".REQUEST_DECORATIONS";
/**
* Action name for broadcast intent sending decorations back to Astrid
@@ -183,7 +188,7 @@ public class AstridApiConstants {
* EXTRAS_TASK_ID id of the task
* EXTRAS_RESPONSE a {@link TaskDecoration}
*/
- public static final String BROADCAST_SEND_DECORATIONS = PACKAGE + ".SEND_DECORATIONS";
+ public static final String BROADCAST_SEND_DECORATIONS = API_PACKAGE + ".SEND_DECORATIONS";
// --- Actions API
@@ -191,33 +196,33 @@ public class AstridApiConstants {
* Action name for intents to be displayed on task context menu
* EXTRAS_TASK_ID id of the task
*/
- public static final String ACTION_TASK_CONTEXT_MENU = PACKAGE + ".CONTEXT_MENU";
+ public static final String ACTION_TASK_CONTEXT_MENU = API_PACKAGE + ".CONTEXT_MENU";
/**
* Action name for intents to be displayed on Astrid's task list menu
* EXTRAS_ADDON your add-on identifier
* EXTRAS_RESPONSE an array of {@link Intent}s
*/
- public static final String ACTION_TASK_LIST_MENU = PACKAGE + ".TASK_LIST_MENU";
+ public static final String ACTION_TASK_LIST_MENU = API_PACKAGE + ".TASK_LIST_MENU";
/**
* Action name for intents to be displayed in Astrid's settings. By default,
* your application will be put into the category named by your application,
* but you can add a string meta-data with name "category" to override this.
*/
- public static final String ACTION_SETTINGS = PACKAGE + ".SETTINGS";
+ public static final String ACTION_SETTINGS = API_PACKAGE + ".SETTINGS";
// --- Events API
/**
* Action name for broadcast intent notifying add-ons that Astrid started up
*/
- public static final String BROADCAST_EVENT_STARTUP = PACKAGE + ".STARTUP";
+ public static final String BROADCAST_EVENT_STARTUP = API_PACKAGE + ".STARTUP";
/**
* Action name for broadcast intent notifying Astrid task list to refresh
*/
- public static final String BROADCAST_EVENT_REFRESH = PACKAGE + ".REFRESH";
+ public static final String BROADCAST_EVENT_REFRESH = API_PACKAGE + ".REFRESH";
/**
* Action name for broadcast intent notifying Astrid to clear detail cache
@@ -225,20 +230,20 @@ public class AstridApiConstants {
* logging out of a sync provider). Use this call carefully, as loading
* details can degrade the performance of Astrid.
*/
- public static final String BROADCAST_EVENT_FLUSH_DETAILS = PACKAGE + ".FLUSH_DETAILS";
+ public static final String BROADCAST_EVENT_FLUSH_DETAILS = API_PACKAGE + ".FLUSH_DETAILS";
/**
* Action name for broadcast intent notifying that task was created or
* title was changed
* EXTRAS_TASK_ID id of the task
*/
- public static final String BROADCAST_EVENT_TASK_LIST_UPDATED = PACKAGE + ".TASK_LIST_UPDATED";
+ public static final String BROADCAST_EVENT_TASK_LIST_UPDATED = API_PACKAGE + ".TASK_LIST_UPDATED";
/**
* Action name for broadcast intent notifying that task was completed
* EXTRAS_TASK_ID id of the task
*/
- public static final String BROADCAST_EVENT_TASK_COMPLETED = PACKAGE + ".TASK_COMPLETED";
+ public static final String BROADCAST_EVENT_TASK_COMPLETED = API_PACKAGE + ".TASK_COMPLETED";
/**
* Action name for broadcast intent notifying that task was created from repeating template
@@ -246,7 +251,7 @@ public class AstridApiConstants {
* EXTRAS_OLD_DUE_DATE task old due date (could be 0)
* EXTRAS_NEW_DUE_DATE task new due date (will not be 0)
*/
- public static final String BROADCAST_EVENT_TASK_REPEATED = PACKAGE + ".TASK_REPEATED";
+ public static final String BROADCAST_EVENT_TASK_REPEATED = API_PACKAGE + ".TASK_REPEATED";
/**
* Action name for broadcast intent notifying that a repeating task has passed its repeat_until value
@@ -254,11 +259,11 @@ public class AstridApiConstants {
* EXTRAS_OLD_DUE_DATE task old due date (could be 0)
* EXTRAS_NEW_DUE_DATE task new due date (will not be 0)
*/
- public static final String BROADCAST_EVENT_TASK_REPEAT_FINISHED = PACKAGE + ".TASK_REPEAT_FINISHED";
+ public static final String BROADCAST_EVENT_TASK_REPEAT_FINISHED = API_PACKAGE + ".TASK_REPEAT_FINISHED";
/**
* Action name for broadcast intent notifying that tag was deleted
*/
- public static final String BROADCAST_EVENT_TAG_DELETED = PACKAGE + ".TAG_DELETED";
+ public static final String BROADCAST_EVENT_TAG_DELETED = API_PACKAGE + ".TAG_DELETED";
}
diff --git a/api/src/com/todoroo/astrid/api/FilterWithCustomIntent.java b/api/src/com/todoroo/astrid/api/FilterWithCustomIntent.java
index 1aee63c48..368d08634 100644
--- a/api/src/com/todoroo/astrid/api/FilterWithCustomIntent.java
+++ b/api/src/com/todoroo/astrid/api/FilterWithCustomIntent.java
@@ -45,7 +45,7 @@ public class FilterWithCustomIntent extends Filter {
public Intent getCustomIntent() {
Intent intent = new Intent();
intent.putExtra("filter", this); //$NON-NLS-1$
- intent.setComponent(new ComponentName("com.timsu.astrid", "com.todoroo.astrid.activity.TaskListActivity")); //$NON-NLS-1$ //$NON-NLS-2$
+ intent.setComponent(new ComponentName(AstridApiConstants.ASTRID_PACKAGE, "com.todoroo.astrid.activity.TaskListActivity")); //$NON-NLS-1$
if(customExtras != null)
intent.putExtras(customExtras);
diff --git a/api/src/com/todoroo/astrid/data/Metadata.java b/api/src/com/todoroo/astrid/data/Metadata.java
index 7fd839c6e..c94fadca8 100644
--- a/api/src/com/todoroo/astrid/data/Metadata.java
+++ b/api/src/com/todoroo/astrid/data/Metadata.java
@@ -32,7 +32,7 @@ public class Metadata extends AbstractModel {
public static final Table TABLE = new Table("metadata", Metadata.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
// --- properties
diff --git a/api/src/com/todoroo/astrid/data/StoreObject.java b/api/src/com/todoroo/astrid/data/StoreObject.java
index db3641c03..4131e713e 100644
--- a/api/src/com/todoroo/astrid/data/StoreObject.java
+++ b/api/src/com/todoroo/astrid/data/StoreObject.java
@@ -32,7 +32,7 @@ public class StoreObject extends AbstractModel {
public static final Table TABLE = new Table("store", StoreObject.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
// --- properties
diff --git a/api/src/com/todoroo/astrid/data/TagData.java b/api/src/com/todoroo/astrid/data/TagData.java
index 71952c547..b4b1d2a5e 100644
--- a/api/src/com/todoroo/astrid/data/TagData.java
+++ b/api/src/com/todoroo/astrid/data/TagData.java
@@ -33,7 +33,7 @@ public final class TagData extends RemoteModel {
public static final Table TABLE = new Table("tagdata", TagData.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
// --- properties
diff --git a/api/src/com/todoroo/astrid/data/Task.java b/api/src/com/todoroo/astrid/data/Task.java
index 5f8adc062..c1c337cbe 100644
--- a/api/src/com/todoroo/astrid/data/Task.java
+++ b/api/src/com/todoroo/astrid/data/Task.java
@@ -38,7 +38,7 @@ public final class Task extends RemoteModel {
public static final Table TABLE = new Table("tasks", Task.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
// --- properties
diff --git a/api/src/com/todoroo/astrid/data/Update.java b/api/src/com/todoroo/astrid/data/Update.java
index 9a13fbfe0..08bf490cb 100644
--- a/api/src/com/todoroo/astrid/data/Update.java
+++ b/api/src/com/todoroo/astrid/data/Update.java
@@ -32,7 +32,7 @@ public class Update extends RemoteModel {
public static final Table TABLE = new Table("updates", Update.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
// --- properties
diff --git a/api/src/com/todoroo/astrid/data/User.java b/api/src/com/todoroo/astrid/data/User.java
index fba07eca7..c38a3931b 100644
--- a/api/src/com/todoroo/astrid/data/User.java
+++ b/api/src/com/todoroo/astrid/data/User.java
@@ -33,7 +33,7 @@ public final class User extends RemoteModel {
public static final Table TABLE = new Table("users", User.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
// --- properties
diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java
index 0bd593e2d..75b4c9c05 100644
--- a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java
+++ b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java
@@ -71,7 +71,7 @@ public class TagViewFragment extends TaskListFragment {
private static final String LAST_FETCH_KEY = "tag-fetch-"; //$NON-NLS-1$
- public static final String BROADCAST_TAG_ACTIVITY = AstridApiConstants.PACKAGE + ".TAG_ACTIVITY"; //$NON-NLS-1$
+ public static final String BROADCAST_TAG_ACTIVITY = AstridApiConstants.API_PACKAGE + ".TAG_ACTIVITY"; //$NON-NLS-1$
public static final String EXTRA_TAG_NAME = "tag"; //$NON-NLS-1$
public static final String EXTRA_TAG_REMOTE_ID = "remoteId"; //$NON-NLS-1$
diff --git a/astrid/plugin-src/com/todoroo/astrid/gcal/CalendarStartupReceiver.java b/astrid/plugin-src/com/todoroo/astrid/gcal/CalendarStartupReceiver.java
index 56d02619c..aa1fa3250 100644
--- a/astrid/plugin-src/com/todoroo/astrid/gcal/CalendarStartupReceiver.java
+++ b/astrid/plugin-src/com/todoroo/astrid/gcal/CalendarStartupReceiver.java
@@ -11,7 +11,7 @@ import com.todoroo.astrid.api.AstridApiConstants;
public class CalendarStartupReceiver extends BroadcastReceiver {
- public static final String BROADCAST_RESCHEDULE_CAL_ALARMS = AstridApiConstants.PACKAGE + ".SCHEDULE_CAL_REMINDERS"; //$NON-NLS-1$
+ public static final String BROADCAST_RESCHEDULE_CAL_ALARMS = AstridApiConstants.API_PACKAGE + ".SCHEDULE_CAL_REMINDERS"; //$NON-NLS-1$
@Override
public void onReceive(Context context, Intent intent) {
diff --git a/astrid/src/com/todoroo/astrid/data/ABTestEvent.java b/astrid/src/com/todoroo/astrid/data/ABTestEvent.java
index cd8824105..a23ce1d70 100644
--- a/astrid/src/com/todoroo/astrid/data/ABTestEvent.java
+++ b/astrid/src/com/todoroo/astrid/data/ABTestEvent.java
@@ -33,7 +33,7 @@ public class ABTestEvent extends AbstractModel {
public static final Table TABLE = new Table("abtestevent", ABTestEvent.class);
/** content uri for this model */
- public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.PACKAGE + "/" +
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AstridApiConstants.API_PACKAGE + "/" +
TABLE.name);
diff --git a/astrid/src/com/todoroo/astrid/provider/Astrid3ContentProvider.java b/astrid/src/com/todoroo/astrid/provider/Astrid3ContentProvider.java
index fe21355f3..27f393600 100644
--- a/astrid/src/com/todoroo/astrid/provider/Astrid3ContentProvider.java
+++ b/astrid/src/com/todoroo/astrid/provider/Astrid3ContentProvider.java
@@ -123,7 +123,7 @@ public class Astrid3ContentProvider extends ContentProvider {
uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
for(Uri uri : new Uri[] { Task.CONTENT_URI, Metadata.CONTENT_URI, StoreObject.CONTENT_URI, Update.CONTENT_URI }) {
- String authority = AstridApiConstants.PACKAGE;
+ String authority = AstridApiConstants.API_PACKAGE;
String table = uri.toString();
table = table.substring(table.indexOf('/', 11) + 1);
diff --git a/astrid/src/com/todoroo/astrid/provider/SqlContentProvider.java b/astrid/src/com/todoroo/astrid/provider/SqlContentProvider.java
index 9150337ea..8cea5d916 100644
--- a/astrid/src/com/todoroo/astrid/provider/SqlContentProvider.java
+++ b/astrid/src/com/todoroo/astrid/provider/SqlContentProvider.java
@@ -59,7 +59,7 @@ public class SqlContentProvider extends ContentProvider {
static {
uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
- uriMatcher.addURI(AstridApiConstants.PACKAGE + ".private",
+ uriMatcher.addURI(AstridApiConstants.API_PACKAGE + ".private",
"sql", 0);
}