mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-19 17:13:05 +02:00
Cleanup code to enable sync to Google Drive
This commit is contained in:
+1
-13
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user