From 8fabe29f4c29812b067d422fce848761f96d74ab Mon Sep 17 00:00:00 2001 From: rmceoin Date: Wed, 9 Sep 2009 23:53:12 +0000 Subject: [PATCH] OI Safe: check restartTimerIntent before trying to sendBroadcast() git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@2297 72b678ce-9140-0410-bee8-679b907dd61a --- src/org/openintents/safe/CategoryList.java | 8 ++++---- src/org/openintents/safe/PassList.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/org/openintents/safe/CategoryList.java b/src/org/openintents/safe/CategoryList.java index 42de1d7..ba92df8 100644 --- a/src/org/openintents/safe/CategoryList.java +++ b/src/org/openintents/safe/CategoryList.java @@ -502,7 +502,7 @@ public class CategoryList extends ListActivity { } public boolean onOptionsItemSelected(MenuItem item) { - sendBroadcast (restartTimerIntent); + if (restartTimerIntent!=null) sendBroadcast (restartTimerIntent); AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); int position=-1; @@ -657,7 +657,7 @@ public class CategoryList extends ListActivity { protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); - sendBroadcast (restartTimerIntent); + if (restartTimerIntent!=null) sendBroadcast (restartTimerIntent); launchPassList(rows.get(position).id); } @@ -688,7 +688,7 @@ public class CategoryList extends ListActivity { } public boolean exportDatabase(){ - sendBroadcast (restartTimerIntent); + if (restartTimerIntent!=null) sendBroadcast (restartTimerIntent); String filename=EXPORT_FILENAME; try { CSVWriter writer = new CSVWriter(new FileWriter(filename), ','); @@ -819,7 +819,7 @@ public class CategoryList extends ListActivity { * into the database. */ private void importDatabaseFromCSV(String filename){ - sendBroadcast (restartTimerIntent); + if (restartTimerIntent!=null) sendBroadcast (restartTimerIntent); try { importMessage=""; importedEntries=0; diff --git a/src/org/openintents/safe/PassList.java b/src/org/openintents/safe/PassList.java index 8c16590..8b513f1 100644 --- a/src/org/openintents/safe/PassList.java +++ b/src/org/openintents/safe/PassList.java @@ -293,7 +293,7 @@ public class PassList extends ListActivity { @Override public boolean onMenuOpened(int featureId, Menu menu) { - sendBroadcast (restartTimerIntent); + if (restartTimerIntent!=null) sendBroadcast (restartTimerIntent); if (menu == null) { return super.onMenuOpened(featureId, menu); @@ -424,7 +424,7 @@ public class PassList extends ListActivity { } public boolean onOptionsItemSelected(MenuItem item) { - sendBroadcast (restartTimerIntent); + if (restartTimerIntent!=null) sendBroadcast (restartTimerIntent); AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); int position=-1; if (info==null) { -- 2.50.1