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