diff --git a/astrid/AndroidManifest.xml b/astrid/AndroidManifest.xml
index 81b84b65b..69598a175 100644
--- a/astrid/AndroidManifest.xml
+++ b/astrid/AndroidManifest.xml
@@ -199,7 +199,7 @@
-
+
diff --git a/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java b/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java
index a4bc486be..3fcc8e361 100644
--- a/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java
+++ b/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java
@@ -31,10 +31,6 @@ public final class LocaleEditAlerts extends ExpandableListActivity {
// --- locale constants
- /** value for action type for tag alert */
- @SuppressWarnings("nls")
- public static final String ACTION_LOCALE_ALERT = "com.todoroo.astrid.action.LOCALE_ALERT";
-
/** key name for filter title in bundle */
@SuppressWarnings("nls")
public static final String KEY_FILTER_TITLE = "title";
@@ -216,7 +212,7 @@ public final class LocaleEditAlerts extends ExpandableListActivity {
/*
* This is the return Intent, into which we'll put all the required extras
*/
- final Intent returnIntent = new Intent(ACTION_LOCALE_ALERT);
+ final Intent returnIntent = new Intent();
/*
* This extra is the data to ourselves: either for the Activity or the BroadcastReceiver. Note that anything
diff --git a/astrid/plugin-src/com/todoroo/astrid/locale/LocaleReceiver.java b/astrid/plugin-src/com/todoroo/astrid/locale/LocaleReceiver.java
index 40ee2c1de..8d255ed08 100644
--- a/astrid/plugin-src/com/todoroo/astrid/locale/LocaleReceiver.java
+++ b/astrid/plugin-src/com/todoroo/astrid/locale/LocaleReceiver.java
@@ -6,6 +6,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
+import android.text.TextUtils;
import android.util.Log;
import com.timsu.astrid.R;
@@ -48,11 +49,15 @@ public class LocaleReceiver extends BroadcastReceiver {
/** Called when the system is started up */
public void onReceive(Context context, Intent intent) {
try {
- if (LocaleEditAlerts.ACTION_LOCALE_ALERT.equals(intent.getAction())) {
+ if (com.twofortyfouram.Intent.ACTION_FIRE_SETTING.equals(intent.getAction())) {
final String title = intent.getStringExtra(LocaleEditAlerts.KEY_FILTER_TITLE);
final String sql = intent.getStringExtra(LocaleEditAlerts.KEY_SQL);
final int interval = intent.getIntExtra(LocaleEditAlerts.KEY_INTERVAL, 24*3600);
+ if(TextUtils.isEmpty(title) || TextUtils.isEmpty(sql) ||
+ sql.contains("--") || sql.contains(";") || interval == 0)
+ return;
+
// check if we've already made a notification recently
String preferenceKey = makePreferenceKey(title, interval);
long lastNotifyTime = Preferences.getLong(preferenceKey, 0);
@@ -82,7 +87,7 @@ public class LocaleReceiver extends BroadcastReceiver {
PendingIntent pendingIntent = PendingIntent.getActivity(context,
Constants.NOTIFICATION_TIMER, notifyIntent, 0);
Notification notification = new Notification(
- R.drawable.timers_notification, reminder, System.currentTimeMillis());
+ R.drawable.notif_astrid, reminder, System.currentTimeMillis());
notification.setLatestEventInfo(context, r.getString(R.string.locale_edit_alerts_title),
reminder, pendingIntent);
@@ -94,7 +99,8 @@ public class LocaleReceiver extends BroadcastReceiver {
}
}
} catch (Exception e) {
- Log.e("astrid-locale-rx", "Error receiving intent", e);
+ if(Constants.DEBUG)
+ Log.i("astrid-locale-rx", "Error receiving intent", e);
}
}
diff --git a/astrid/res/values/strings-locale.xml b/astrid/res/values/strings-locale.xml
index bf9eaa99f..c9258e99b 100644
--- a/astrid/res/values/strings-locale.xml
+++ b/astrid/res/values/strings-locale.xml
@@ -28,7 +28,7 @@
- You have $NUM tasks in $FILTER
+ You have $NUM in $FILTER