Removing singleton usage: moving all send and save logic out of the MyTracks class.

This is a non-trivial step: I decentralized dialog creation (since it made no sense to have a single place creating a lot of completely unrelated dialogs), made invisible activities just for sending/saving, and changed menu handling a bit, all to decentralize those functions from MyTracks.

There's still a TODO to handle GET_LOGIN more nicely instead of returning from the depths of auth management into the current activity.
This commit is contained in:
Rodrigo Damazio
2011-05-25 04:50:21 -03:00
parent 16b0d4eb24
commit eeaa50ddcb
16 changed files with 978 additions and 863 deletions
@@ -50,7 +50,7 @@ public abstract class Constants {
public static final int AUTHENTICATE_TO_DOCLIST = 10;
public static final int AUTHENTICATE_TO_TRIX = 11;
public static final int DELETE_TRACK = 13;
public static final int SEND_TO_GOOGLE_DIALOG = 14;
public static final int SEND_TO_GOOGLE = 14;
public static final int SHARE_LINK = 15;
public static final int SHARE_GPX_FILE = 16;
public static final int SHARE_KML_FILE = 17;
@@ -190,7 +190,7 @@ public abstract class Constants {
public static int getActionFromMenuId(int menuId) {
switch (menuId) {
case Constants.MENU_SEND_TO_GOOGLE:
return Constants.SEND_TO_GOOGLE_DIALOG;
return Constants.SEND_TO_GOOGLE;
case Constants.MENU_EDIT:
return Constants.EDIT_DETAILS;
case Constants.MENU_DELETE: