Fixed bugs with certain intents trying to use the tag view fragment as an activity

pull/14/head
Sam Bosley 13 years ago
parent 970f05dd8c
commit abc63ff77c

@ -31,6 +31,7 @@ import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
import com.todoroo.astrid.actfm.sync.ActFmSyncService; import com.todoroo.astrid.actfm.sync.ActFmSyncService;
import com.todoroo.astrid.actfm.sync.ActFmSyncV2Provider; import com.todoroo.astrid.actfm.sync.ActFmSyncV2Provider;
import com.todoroo.astrid.activity.ShortcutActivity; import com.todoroo.astrid.activity.ShortcutActivity;
import com.todoroo.astrid.activity.TaskListActivity;
import com.todoroo.astrid.activity.TaskListFragment; import com.todoroo.astrid.activity.TaskListFragment;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.Filter;
@ -356,9 +357,8 @@ public class C2DMReceiver extends BroadcastReceiver {
} }
} }
Intent launchIntent = new Intent(); Intent launchIntent = new Intent(context, TaskListActivity.class);
launchIntent.putExtra(TaskListFragment.TOKEN_FILTER, filter); launchIntent.putExtra(TaskListFragment.TOKEN_FILTER, filter);
launchIntent.setComponent(filter.customTaskList);
filter.customExtras.putBoolean(TagViewActivity.TOKEN_START_ACTIVITY, shouldLaunchActivity(intent)); filter.customExtras.putBoolean(TagViewActivity.TOKEN_START_ACTIVITY, shouldLaunchActivity(intent));
launchIntent.putExtras(filter.customExtras); launchIntent.putExtras(filter.customExtras);

@ -22,7 +22,6 @@ package com.todoroo.astrid.activity;
import java.util.Map.Entry; import java.util.Map.Entry;
import android.app.Activity; import android.app.Activity;
import android.content.ComponentName;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
@ -91,7 +90,6 @@ public class ShortcutActivity extends Activity {
taskListIntent.putExtra(TaskListFragment.TOKEN_SOURCE, extras.getInt(TaskListFragment.TOKEN_SOURCE)); taskListIntent.putExtra(TaskListFragment.TOKEN_SOURCE, extras.getInt(TaskListFragment.TOKEN_SOURCE));
if(extras != null && extras.containsKey(TOKEN_CUSTOM_CLASS)) { if(extras != null && extras.containsKey(TOKEN_CUSTOM_CLASS)) {
taskListIntent.setComponent(ComponentName.unflattenFromString(extras.getString(TOKEN_CUSTOM_CLASS)));
taskListIntent.putExtras(intent.getExtras()); taskListIntent.putExtras(intent.getExtras());
} }

Loading…
Cancel
Save