Remove TOKEN_SOURCE

pull/253/head
Alex Baker 10 years ago
parent 2566ab738c
commit ee73187519

@ -89,10 +89,6 @@ public class ShortcutActivity extends Activity {
Intent taskListIntent = new Intent(this, TaskListActivity.class);
if(extras != null && extras.containsKey(TaskListActivity.TOKEN_SOURCE)) {
taskListIntent.putExtra(TaskListActivity.TOKEN_SOURCE, extras.getInt(TaskListActivity.TOKEN_SOURCE));
}
if(extras != null && extras.containsKey(TOKEN_CUSTOM_CLASS)) {
taskListIntent.putExtras(intent.getExtras());
}

@ -41,7 +41,6 @@ import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.gtasks.GtasksListFragment;
import com.todoroo.astrid.gtasks.GtasksPreferenceService;
import com.todoroo.astrid.tags.TagFilterExposer;
import com.todoroo.astrid.utility.Constants;
import com.todoroo.astrid.utility.Flags;
import com.todoroo.astrid.voice.VoiceInputAssistant;
@ -63,9 +62,6 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
private NavigationDrawerFragment navigationDrawer;
/** token for indicating source of TLA launch */
public static final String TOKEN_SOURCE = "source"; //$NON-NLS-1$
public static final String TOKEN_SWITCH_TO_FILTER = "newListCreated"; //$NON-NLS-1$
/** For indicating the new list screen should be launched at fragment setup time */
@ -117,10 +113,6 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
if (savedFilter != null) {
setListsTitle(savedFilter.title);
}
if (getIntent().hasExtra(TOKEN_SOURCE)) {
trackActivitySource();
}
}
public NavigationDrawerFragment getNavigationDrawerFragment() {
@ -448,25 +440,6 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
}
}
/**
* Report who launched this activity
*/
protected void trackActivitySource() {
switch (getIntent().getIntExtra(TOKEN_SOURCE, Constants.SOURCE_DEFAULT)) {
case Constants.SOURCE_NOTIFICATION:
break;
case Constants.SOURCE_OTHER:
break;
case Constants.SOURCE_PPWIDGET:
break;
case Constants.SOURCE_WIDGET:
break;
case Constants.SOURCE_C2DM:
break;
}
getIntent().putExtra(TOKEN_SOURCE, Constants.SOURCE_DEFAULT); // Only report source once
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
TaskListFragment tlf = getTaskListFragment();

@ -168,7 +168,6 @@ public class Notifications extends InjectingBroadcastReceiver {
notifyIntent.putExtra(NotificationFragment.TOKEN_ID, id);
notifyIntent.putExtra(EXTRAS_TEXT, text);
notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
notifyIntent.putExtra(TaskListActivity.TOKEN_SOURCE, Constants.SOURCE_NOTIFICATION);
broadcaster.requestNotification((int) id, notifyIntent, type, title, text, ringTimes);
return true;

@ -21,15 +21,6 @@ public final class Constants {
*/
public static final MarketStrategy MARKET_STRATEGY = new MarketStrategy.AndroidMarketStrategy();
// --- task list activity source strings
public static final int SOURCE_OTHER = -1;
public static final int SOURCE_DEFAULT = 0;
public static final int SOURCE_NOTIFICATION = 1;
public static final int SOURCE_WIDGET = 2;
public static final int SOURCE_PPWIDGET = 3;
public static final int SOURCE_C2DM = 4;
// --- notification id's
/** Notification Manager id for timing */

@ -109,7 +109,6 @@ public class WidgetHelper {
Bundle extras = AndroidUtilities.bundleFromSerializedString(serializedExtras);
listIntent.putExtras(extras);
}
listIntent.putExtra(TaskListActivity.TOKEN_SOURCE, Constants.SOURCE_WIDGET);
listIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
if (filter != null) {
listIntent.putExtra(TaskListFragment.TOKEN_FILTER, filter);

Loading…
Cancel
Save