Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS off: warning #914 #915

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ private void displayLocationDialog() {
@Override
public void onLocationRetrieved(Location location) {
if (location == null) {
mainActivity.showMessage(R.string.location_not_found, ONStyle.ALERT);
mainActivity.showMessage(R.string.device_position_warning, ONStyle.ALERT);
}
if (location != null) {
noteTmp.setLatitude(location.getLatitude());
Expand All @@ -937,14 +937,14 @@ public void onLocationRetrieved(Location location) {

@Override
public void onLocationUnavailable() {
mainActivity.showMessage(R.string.location_not_found, ONStyle.ALERT);
mainActivity.showMessage(R.string.device_position_warning, ONStyle.ALERT);
}

@Override
public void onAddressResolved(String address) {
if (TextUtils.isEmpty(address)) {
if (!isNoteLocationValid()) {
mainActivity.showMessage(R.string.location_not_found, ONStyle.ALERT);
mainActivity.showMessage(R.string.device_position_warning, ONStyle.ALERT);
return;
}
address = noteTmp.getLatitude() + ", " + noteTmp.getLongitude();
Expand All @@ -967,7 +967,7 @@ public void onCoordinatesResolved(Location location, String address) {
binding.fragmentDetailContent.location.setText(address);
fade(binding.fragmentDetailContent.location, true);
} else {
mainActivity.showMessage(R.string.location_not_found, ONStyle.ALERT);
mainActivity.showMessage(R.string.device_position_warning, ONStyle.ALERT);
}
}

Expand Down Expand Up @@ -2203,7 +2203,7 @@ public void onCoordinatesResolved(Location location, String address) {

@Override
public void onLocationUnavailable() {
mainActivityWeakReference.get().showMessage(R.string.location_not_found, ONStyle.ALERT);
mainActivityWeakReference.get().showMessage(R.string.device_position_warning, ONStyle.ALERT);
}

@Override
Expand Down
1 change: 1 addition & 0 deletions omniNotes/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<string name="remove_reminder">Remove reminder?</string>
<string name="add_reminder">Add reminder</string>
<string name="location_not_found">Location not found</string>
<string name="device_position_warning">Device position is turned off</string>
<string name="record">Record</string>
<string name="stop">Stop</string>
<string name="no_app_to_handle_intent">No applications to handle file</string>
Expand Down