Cleanup code to enable sync to Google Drive

This commit is contained in:
Jimmy Shih
2014-01-08 13:15:58 -08:00
parent 68685828ca
commit 071e33719e
9 changed files with 78 additions and 103 deletions
@@ -24,7 +24,6 @@ import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
/**
@@ -62,17 +61,6 @@ public class ConfirmSyncDialogFragment extends AbstractMyTracksDialogFragment {
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (PreferencesUtils.getBoolean(
getActivity(), R.string.drive_sync_key, PreferencesUtils.DRIVE_SYNC_DEFAULT)) {
dismiss();
caller.onConfirmSyncDone(false);
return;
}
}
@Override
protected Dialog createDialog() {
FragmentActivity fragmentActivity = getActivity();
@@ -91,7 +79,7 @@ public class ConfirmSyncDialogFragment extends AbstractMyTracksDialogFragment {
public void onClick(DialogInterface dialog, int which) {
caller.onConfirmSyncDone(true);
}
}).setTitle(R.string.sync_drive_title).create();
}).setTitle(R.string.sync_drive_confirm_title).create();
}
@Override
@@ -25,7 +25,7 @@ import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
/**
* A DialogFrament to enable sync to Google Drive.
* A DialogFrament to prompt user to sync to Google Drive after saving first track.
*
* @author Jimmy Shih
*/
@@ -72,7 +72,7 @@ public class EnableSyncDialogFragment extends AbstractMyTracksDialogFragment {
public void onClick(DialogInterface dialog, int which) {
caller.onEnableSyncDone(true);
}
}).setTitle(R.string.sync_drive_title).create();
}).setTitle(R.string.sync_drive_enable_title).create();
}
@Override