forked from upstream-mirrors/OpenTracks
Rename refresh to sync now
This commit is contained in:
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -31,9 +31,9 @@ limitations under the License.
|
|||||||
android:id="@+id/track_list_play_mutliple"
|
android:id="@+id/track_list_play_mutliple"
|
||||||
android:title="@string/menu_play_multiple"/>
|
android:title="@string/menu_play_multiple"/>
|
||||||
<item
|
<item
|
||||||
android:icon="@drawable/ic_menu_refresh"
|
android:icon="@drawable/ic_menu_sync_now"
|
||||||
android:id="@+id/track_list_refresh"
|
android:id="@+id/track_list_sync_now"
|
||||||
android:title="@string/menu_refresh"/>
|
android:title="@string/menu_sync_now"/>
|
||||||
<item
|
<item
|
||||||
android:icon="@drawable/ic_menu_aggregated_statistics"
|
android:icon="@drawable/ic_menu_aggregated_statistics"
|
||||||
android:id="@+id/track_list_aggregated_statistics"
|
android:id="@+id/track_list_aggregated_statistics"
|
||||||
|
|||||||
@@ -1200,12 +1200,6 @@ limitations under the License.
|
|||||||
Character limit: ~20 (1 line)">
|
Character limit: ~20 (1 line)">
|
||||||
Play multiple
|
Play multiple
|
||||||
</string>
|
</string>
|
||||||
<string name="menu_refresh"
|
|
||||||
translation_description="In the menu, to refresh with Google Drive.
|
|
||||||
|
|
||||||
Character limit: ~20 (1 line)">
|
|
||||||
Refresh
|
|
||||||
</string>
|
|
||||||
<string name="menu_satellite"
|
<string name="menu_satellite"
|
||||||
translation_description="In the menu, under the map layer option, the submenu to display
|
translation_description="In the menu, under the map layer option, the submenu to display
|
||||||
satellite.
|
satellite.
|
||||||
@@ -1256,6 +1250,12 @@ limitations under the License.
|
|||||||
Character limit: ~20 (1 line)">
|
Character limit: ~20 (1 line)">
|
||||||
Sync to Google Drive
|
Sync to Google Drive
|
||||||
</string>
|
</string>
|
||||||
|
<string name="menu_sync_now"
|
||||||
|
translation_description="In the menu, to sync now with Google Drive.
|
||||||
|
|
||||||
|
Character limit: ~20 (1 line)">
|
||||||
|
Sync now
|
||||||
|
</string>
|
||||||
<string name="menu_show_on_map"
|
<string name="menu_show_on_map"
|
||||||
translation_description="In the menu, to show a track or a marker on the map.
|
translation_description="In the menu, to show a track or a marker on the map.
|
||||||
|
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
// Menu items
|
// Menu items
|
||||||
private MenuItem searchMenuItem;
|
private MenuItem searchMenuItem;
|
||||||
private MenuItem startGpsMenuItem;
|
private MenuItem startGpsMenuItem;
|
||||||
private MenuItem refreshMenuItem;
|
private MenuItem syncNowMenuItem;
|
||||||
private MenuItem exportAllMenuItem;
|
private MenuItem exportAllMenuItem;
|
||||||
private MenuItem importAllMenuItem;
|
private MenuItem importAllMenuItem;
|
||||||
private MenuItem deleteAllMenuItem;
|
private MenuItem deleteAllMenuItem;
|
||||||
@@ -469,7 +469,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
ApiAdapterFactory.getApiAdapter().configureSearchWidget(this, searchMenuItem, trackController);
|
ApiAdapterFactory.getApiAdapter().configureSearchWidget(this, searchMenuItem, trackController);
|
||||||
|
|
||||||
startGpsMenuItem = menu.findItem(R.id.track_list_start_gps);
|
startGpsMenuItem = menu.findItem(R.id.track_list_start_gps);
|
||||||
refreshMenuItem = menu.findItem(R.id.track_list_refresh);
|
syncNowMenuItem = menu.findItem(R.id.track_list_sync_now);
|
||||||
exportAllMenuItem = menu.findItem(R.id.track_list_export_all);
|
exportAllMenuItem = menu.findItem(R.id.track_list_export_all);
|
||||||
importAllMenuItem = menu.findItem(R.id.track_list_import_all);
|
importAllMenuItem = menu.findItem(R.id.track_list_import_all);
|
||||||
deleteAllMenuItem = menu.findItem(R.id.track_list_delete_all);
|
deleteAllMenuItem = menu.findItem(R.id.track_list_delete_all);
|
||||||
@@ -533,7 +533,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
PlayMultipleDialogFragment.newInstance(-1L)
|
PlayMultipleDialogFragment.newInstance(-1L)
|
||||||
.show(getSupportFragmentManager(), PlayMultipleDialogFragment.PLAY_MULTIPLE_DIALOG_TAG);
|
.show(getSupportFragmentManager(), PlayMultipleDialogFragment.PLAY_MULTIPLE_DIALOG_TAG);
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_list_refresh:
|
case R.id.track_list_sync_now:
|
||||||
if (driveSync) {
|
if (driveSync) {
|
||||||
SyncUtils.syncNow(this);
|
SyncUtils.syncNow(this);
|
||||||
} else {
|
} else {
|
||||||
@@ -739,8 +739,8 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
TrackIconUtils.setMenuIconColor(startGpsMenuItem);
|
TrackIconUtils.setMenuIconColor(startGpsMenuItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (refreshMenuItem != null) {
|
if (syncNowMenuItem != null) {
|
||||||
refreshMenuItem.setTitle(driveSync ? R.string.menu_refresh : R.string.menu_sync_drive);
|
syncNowMenuItem.setTitle(driveSync ? R.string.menu_sync_now : R.string.menu_sync_drive);
|
||||||
}
|
}
|
||||||
if (exportAllMenuItem != null) {
|
if (exportAllMenuItem != null) {
|
||||||
exportAllMenuItem.setVisible(!isRecording);
|
exportAllMenuItem.setVisible(!isRecording);
|
||||||
|
|||||||
+1
-1
@@ -470,7 +470,7 @@ public class SettingTest extends ActivityInstrumentationTestCase2<TrackListActiv
|
|||||||
EndToEndTestUtils.SOLO.goBack();
|
EndToEndTestUtils.SOLO.goBack();
|
||||||
EndToEndTestUtils.SOLO.goBack();
|
EndToEndTestUtils.SOLO.goBack();
|
||||||
assertEquals(isSyncChecked,
|
assertEquals(isSyncChecked,
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_refresh), false));
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_sync_now), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -113,7 +113,7 @@ public class ShareTest extends ActivityInstrumentationTestCase2<TrackListActivit
|
|||||||
EndToEndTestUtils.SOLO.goBack();
|
EndToEndTestUtils.SOLO.goBack();
|
||||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_2);
|
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_2);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
|
|
||||||
assertTrue(EndToEndTestUtils.SOLO.waitForText(
|
assertTrue(EndToEndTestUtils.SOLO.waitForText(
|
||||||
activityMyTracks.getString(R.string.track_list_shared_with_me), 1,
|
activityMyTracks.getString(R.string.track_list_shared_with_me), 1,
|
||||||
|
|||||||
+4
-4
@@ -81,14 +81,14 @@ public class MultiAccountsSyncTest extends ActivityInstrumentationTestCase2<Trac
|
|||||||
|
|
||||||
// Sync with Google Drive and then check it of the second account.
|
// Sync with Google Drive and then check it of the second account.
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
|
|
||||||
// Check Google Drive of the first account.
|
// Check Google Drive of the first account.
|
||||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_1);
|
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_1);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
|
|
||||||
@@ -139,14 +139,14 @@ public class MultiAccountsSyncTest extends ActivityInstrumentationTestCase2<Trac
|
|||||||
// Check Google Drive of the first account.
|
// Check Google Drive of the first account.
|
||||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_1);
|
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_1);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
|
|
||||||
// Check Google Drive of the second account.
|
// Check Google Drive of the second account.
|
||||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_2);
|
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_2);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -65,7 +65,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
|||||||
EndToEndTestUtils.SOLO.clickOnText(EndToEndTestUtils.activityMytracks
|
EndToEndTestUtils.SOLO.clickOnText(EndToEndTestUtils.activityMytracks
|
||||||
.getString(R.string.generic_yes));
|
.getString(R.string.generic_yes));
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFile(EndToEndTestUtils.trackName, false, drive);
|
SyncTestUtils.checkFile(EndToEndTestUtils.trackName, false, drive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
|||||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||||
EndToEndTestUtils.createSimpleTrack(3, true);
|
EndToEndTestUtils.createSimpleTrack(3, true);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
|||||||
|
|
||||||
// Sync this track.
|
// Sync this track.
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFile(EndToEndTestUtils.trackName, true, drive);
|
SyncTestUtils.checkFile(EndToEndTestUtils.trackName, true, drive);
|
||||||
String oldTrack = SyncTestUtils.getContentOfFile(
|
String oldTrack = SyncTestUtils.getContentOfFile(
|
||||||
SyncTestUtils.getFile(EndToEndTestUtils.trackName, drive), drive);
|
SyncTestUtils.getFile(EndToEndTestUtils.trackName, drive), drive);
|
||||||
@@ -144,7 +144,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
|||||||
|
|
||||||
// Sync again.
|
// Sync again.
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
|
|
||||||
// Check.
|
// Check.
|
||||||
SyncTestUtils.checkFile(oldTrackName, false, drive);
|
SyncTestUtils.checkFile(oldTrackName, false, drive);
|
||||||
|
|||||||
+6
-6
@@ -66,12 +66,12 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
|||||||
}
|
}
|
||||||
EndToEndTestUtils.createTrackIfEmpty(0, true);
|
EndToEndTestUtils.createTrackIfEmpty(0, true);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
|
|
||||||
SyncTestUtils.removeKMLFiles(drive);
|
SyncTestUtils.removeKMLFiles(drive);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkTracksNumber(0);
|
SyncTestUtils.checkTracksNumber(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,14 +88,14 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
|||||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
|
|
||||||
// Remove one track from Google Drive
|
// Remove one track from Google Drive
|
||||||
File file = SyncTestUtils.getFile(EndToEndTestUtils.trackName, drive);
|
File file = SyncTestUtils.getFile(EndToEndTestUtils.trackName, drive);
|
||||||
SyncTestUtils.removeFile(file, drive);
|
SyncTestUtils.removeFile(file, drive);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
SyncTestUtils.checkTracksNumber(1);
|
SyncTestUtils.checkTracksNumber(1);
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
|||||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
File folder = SyncUtils.getMyTracksFolder(trackListActivity.getApplicationContext(), drive);
|
File folder = SyncUtils.getMyTracksFolder(trackListActivity.getApplicationContext(), drive);
|
||||||
@@ -121,7 +121,7 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
|||||||
|
|
||||||
SyncTestUtils.removeFile(folder, drive);
|
SyncTestUtils.removeFile(folder, drive);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
SyncTestUtils.checkFilesNumber(drive);
|
SyncTestUtils.checkFilesNumber(drive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -241,7 +241,7 @@ public class SyncTestUtils {
|
|||||||
files = getDriveFiles(EndToEndTestUtils.activityMytracks.getApplicationContext(), drive);
|
files = getDriveFiles(EndToEndTestUtils.activityMytracks.getApplicationContext(), drive);
|
||||||
EndToEndTestUtils.sleep(EndToEndTestUtils.SHORT_WAIT_TIME);
|
EndToEndTestUtils.sleep(EndToEndTestUtils.SHORT_WAIT_TIME);
|
||||||
EndToEndTestUtils.findMenuItem(
|
EndToEndTestUtils.findMenuItem(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||||
} catch (GoogleJsonResponseException e) {
|
} catch (GoogleJsonResponseException e) {
|
||||||
Log.i(EndToEndTestUtils.LOG_TAG, e.getMessage());
|
Log.i(EndToEndTestUtils.LOG_TAG, e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user