Hopefully fixed a few rare crashes

pull/14/head
Sam Bosley 12 years ago
parent 35ab43fda2
commit e9af00a827

@ -213,6 +213,9 @@ public class GCMIntentService extends GCMBaseIntentService {
return;
}
if (notifyIntent == null)
return;
notifyIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
notifyIntent.putExtra(TaskListActivity.TOKEN_SOURCE, Constants.SOURCE_C2DM);
PendingIntent pendingIntent = PendingIntent.getActivity(context,
@ -340,12 +343,16 @@ public class GCMIntentService extends GCMBaseIntentService {
userActivityDao.createNew(update);
}
Intent launchIntent = new Intent(context, TaskListActivity.class);
launchIntent.putExtra(TaskListFragment.TOKEN_FILTER, filter);
filter.customExtras.putBoolean(TagViewFragment.TOKEN_START_ACTIVITY, shouldLaunchActivity(intent));
launchIntent.putExtras(filter.customExtras);
if (filter != null) {
Intent launchIntent = new Intent(context, TaskListActivity.class);
launchIntent.putExtra(TaskListFragment.TOKEN_FILTER, filter);
filter.customExtras.putBoolean(TagViewFragment.TOKEN_START_ACTIVITY, shouldLaunchActivity(intent));
launchIntent.putExtras(filter.customExtras);
return launchIntent;
return launchIntent;
} else {
return null;
}
} finally {
cursor.close();
}

@ -158,6 +158,7 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
public EditNoteActivity(Fragment fragment, View parent, long t) {
super(fragment.getActivity());
DependencyInjectionService.getInstance().inject(this);
imageCache = AsyncImageView.getImageCache();
this.fragment = fragment;
@ -177,7 +178,6 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
cameraButton = getDefaultCameraButton();
DependencyInjectionService.getInstance().inject(this);
setOrientation(VERTICAL);
commentsBar = parent.findViewById(R.id.updatesFooter);

@ -26,6 +26,7 @@ import android.content.res.Resources;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
@ -511,7 +512,7 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
// title / size
int countInt = -1;
if(filterCounts.containsKey(filter) || filter.listingTitle.matches(".* \\(\\d+\\)$")) { //$NON-NLS-1$
if(filterCounts.containsKey(filter) || (!TextUtils.isEmpty(filter.listingTitle) && filter.listingTitle.matches(".* \\(\\d+\\)$"))) { //$NON-NLS-1$
viewHolder.size.setVisibility(View.VISIBLE);
String count;
if (filterCounts.containsKey(filter)) {

Loading…
Cancel
Save