forked from upstream-mirrors/OpenTracks
Use a different name for new strings.
This commit is contained in:
@@ -672,7 +672,7 @@ limitations under the License.
|
|||||||
for all applications. See Settings -> Location access.">
|
for all applications. See Settings -> Location access.">
|
||||||
\'Location access\'
|
\'Location access\'
|
||||||
</string>
|
</string>
|
||||||
<string name="gps_need_to_enable"
|
<string name="gps_disabled"
|
||||||
translation_description="In the main view, the message on the top asking the user to enable
|
translation_description="In the main view, the message on the top asking the user to enable
|
||||||
GPS.
|
GPS.
|
||||||
|
|
||||||
@@ -1176,7 +1176,7 @@ limitations under the License.
|
|||||||
indicating that GPS is not available and an approximate location is used instead.">
|
indicating that GPS is not available and an approximate location is used instead.">
|
||||||
GPS is not available. An approximate location based on cell towers and WiFi networks is shown.
|
GPS is not available. An approximate location based on cell towers and WiFi networks is shown.
|
||||||
</string>
|
</string>
|
||||||
<string name="my_location_no_location"
|
<string name="my_location_no_gps"
|
||||||
translation_description="When displaying the user's current location, a status message
|
translation_description="When displaying the user's current location, a status message
|
||||||
indicating that the current location cannot be determined.
|
indicating that the current location cannot be determined.
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ class DataSourcesWrapperImpl implements DataSourcesWrapper {
|
|||||||
String setting = context.getString(
|
String setting = context.getString(
|
||||||
GoogleLocationUtils.isAvailable(context) ? R.string.gps_google_location_settings
|
GoogleLocationUtils.isAvailable(context) ? R.string.gps_google_location_settings
|
||||||
: R.string.gps_location_access);
|
: R.string.gps_location_access);
|
||||||
toast = context.getString(R.string.my_location_no_location, setting);
|
toast = context.getString(R.string.my_location_no_gps, setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let the user know we have only an approximate location:
|
// Let the user know we have only an approximate location:
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ public class MapFragment extends Fragment
|
|||||||
String setting = getString(
|
String setting = getString(
|
||||||
GoogleLocationUtils.isAvailable(getActivity()) ? R.string.gps_google_location_settings
|
GoogleLocationUtils.isAvailable(getActivity()) ? R.string.gps_google_location_settings
|
||||||
: R.string.gps_location_access);
|
: R.string.gps_location_access);
|
||||||
message = getString(R.string.gps_need_to_enable, setting);
|
message = getString(R.string.gps_disabled, setting);
|
||||||
isGpsDisabled = true;
|
isGpsDisabled = true;
|
||||||
break;
|
break;
|
||||||
case NO_FIX:
|
case NO_FIX:
|
||||||
|
|||||||
+5
-1
@@ -16,6 +16,7 @@
|
|||||||
package com.google.android.apps.mytracks.endtoendtest;
|
package com.google.android.apps.mytracks.endtoendtest;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.TrackListActivity;
|
import com.google.android.apps.mytracks.TrackListActivity;
|
||||||
|
import com.google.android.apps.mytracks.util.GoogleLocationUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
@@ -57,8 +58,11 @@ public class GoToMyLocationTest extends ActivityInstrumentationTestCase2<TrackLi
|
|||||||
.findViewById(R.id.map_my_location);
|
.findViewById(R.id.map_my_location);
|
||||||
EndToEndTestUtils.SOLO.clickOnView(myLocation);
|
EndToEndTestUtils.SOLO.clickOnView(myLocation);
|
||||||
if (EndToEndTestUtils.isEmulator) {
|
if (EndToEndTestUtils.isEmulator) {
|
||||||
|
String setting = activityMyTracks.getString(
|
||||||
|
GoogleLocationUtils.isAvailable(activityMyTracks) ? R.string.gps_google_location_settings
|
||||||
|
: R.string.gps_location_access);
|
||||||
EndToEndTestUtils.SOLO.waitForText(
|
EndToEndTestUtils.SOLO.waitForText(
|
||||||
activityMyTracks.getString(R.string.my_location_no_location), 1, 1000);
|
activityMyTracks.getString(R.string.my_location_no_gps, setting), 1, 1000);
|
||||||
} else {
|
} else {
|
||||||
// TODO How to verify the location is shown on the map.
|
// TODO How to verify the location is shown on the map.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user