]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: check restartTimerIntent before trying to sendBroadcast()
authorrmceoin <rmceoin@72b678ce-9140-0410-bee8-679b907dd61a>
Wed, 9 Sep 2009 23:53:12 +0000 (23:53 +0000)
committerrmceoin <rmceoin@72b678ce-9140-0410-bee8-679b907dd61a>
Wed, 9 Sep 2009 23:53:12 +0000 (23:53 +0000)
git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@2297 72b678ce-9140-0410-bee8-679b907dd61a

src/org/openintents/safe/CategoryList.java
src/org/openintents/safe/PassList.java

index 42de1d79a62a20e5eb2c3ce1ef50859fbcc41b6b..ba92df8292499e482ffd9b98ee461471a34c1d3f 100644 (file)
@@ -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;
index 8c165903dec7c9e3634d5233fe9b3349f40e54d4..8b513f1f46e28d0a73c7dbf723e1fa5bf4d28d08 100644 (file)
@@ -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) {