Skip to content
Merged
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 @@ -58,6 +58,7 @@
import java.util.HashMap;

import static com.google.android.play.core.integrity.model.IntegrityDialogResponseCode.DIALOG_SUCCESSFUL;
import static org.commcare.fragments.personalId.PersonalIdPhoneFragmentDirections.*;
import static org.commcare.utils.Permissions.shouldShowPermissionRationale;

public class PersonalIdPhoneFragment extends BasePersonalIdFragment implements CommCareLocationListener {
Expand Down Expand Up @@ -99,7 +100,9 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
@Override
public void onResume() {
super.onResume();
locationController.start();
if (!isOnPermissionErrorScreen()) {
locationController.start();
}
}

@Override
Expand Down Expand Up @@ -461,10 +464,12 @@ protected void navigateToMessageDisplay(String title, String message, boolean i
Navigation.findNavController(binding.personalidPhoneContinueButton).navigate(navDirections);
}

private void navigateToPermissionErrorMessageDisplay(int errorMeesage, int buttonText) {
navigateToMessageDisplay(
requireActivity().getString(errorMeesage), null,true,
ConnectConstants.PERSONALID_LOCATION_PERMISSION_FAILURE, buttonText);
private void navigateToPermissionErrorMessageDisplay(int errorMessage, int buttonText) {
if (!isOnPermissionErrorScreen()) {
navigateToMessageDisplay(
getString(R.string.personalid_grant_location_service), requireActivity().getString(errorMessage), true,
ConnectConstants.PERSONALID_LOCATION_PERMISSION_FAILURE, buttonText);
}
}

@Override
Expand Down