Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
GPS-SMS Microfix
Browse files Browse the repository at this point in the history
  • Loading branch information
FiryDragon1 committed Jun 15, 2020
1 parent 0712ee5 commit 689b218
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/src/main/java/at/tacticaldevc/oat/listeners/SMSListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ private void dispatchToFeature(Context context, String phoneNumber, String featu
case "gps":
case "location":
case "position":
if (Prefs.isPermissionGranted(context, context.getString(R.string.oat_permissions_key_access_coarse_location)) || Prefs.isPermissionGranted(context, context.getString(R.string.oat_permissions_key_access_fine_location)))
Tracking.sendCurrentCoordinatesViaSMS(context, phoneNumber, null);
else
SMSCom.replyErrorSMS_DisabledPermission(context, phoneNumber, "gps");
if (Prefs.isPermissionGranted(context, context.getString(R.string.oat_permissions_key_access_coarse_location)) || Prefs.isPermissionGranted(context, context.getString(R.string.oat_permissions_key_access_fine_location))) {
if (Prefs.fetchFeatureEnabledStatus(context, context.getString(R.string.oat_features_key_fetch_gps_position))) {
Tracking.sendCurrentCoordinatesViaSMS(context, phoneNumber, null);
} else {
SMSCom.replyErrorSMS_FeatureDisabled(context, phoneNumber, context.getString(R.string.oat_features_name_fetch_gps_position));
}
} else
SMSCom.replyErrorSMS_DisabledPermission(context, phoneNumber, context.getString(R.string.oat_features_name_fetch_gps_position));
break;
case "instant-photo":
case "take-photo":
Expand Down

0 comments on commit 689b218

Please sign in to comment.