Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Improve Explanation for usage of location services (EXPOSUREAPP-2384) #1137

Merged
merged 6 commits into from
Sep 15, 2020

Conversation

harambasicluka
Copy link
Contributor

@harambasicluka harambasicluka commented Sep 10, 2020

Updated german location text and also enabled links for this text.

image

Steps to reproduce

  1. Go to exposure tracing
  2. Deactivate location
  3. See new german text

@harambasicluka harambasicluka added maintainers Tag pull requests created by maintainers 1.4.0 labels Sep 10, 2020
@harambasicluka harambasicluka requested review from janetback and a team September 10, 2020 06:07
Copy link
Contributor

@janetback janetback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, just minor request from UA: The '.' at the end of the sentence looks like it is part of the link (blue). Is there any chance you could change this? Thanks.

@chris-cwa
Copy link
Contributor

Screenshot_20200913-121327_Corona-Warn

janetback
janetback previously approved these changes Sep 14, 2020
Copy link
Contributor

@janetback janetback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UA reviewed

@d4rken d4rken requested a review from chris-cwa September 14, 2020 15:03
@d4rken d4rken self-assigned this Sep 14, 2020
@d4rken d4rken removed the request for review from chris-cwa September 14, 2020 15:21
}

private fun setUrl() {
setUrl(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crashes when the language is not set to german (i.e. English), because the default translations in strings.xml are missing the replacement marker "FAQ", and the URL.

@harambasicluka ping

    Process: de.rki.coronawarnapp.dev, PID: 8741
    android.view.InflateException: Binary XML file line #88 in de.rki.coronawarnapp.dev:layout/fragment_settings_tracing: Binary XML file line #74 in de.rki.coronawarnapp.dev:layout/include_tracing_status_card_location: Error inflating class de.rki.coronawarnapp.ui.view.LocationTracingStatusCardBodyTextView
    Caused by: android.view.InflateException: Binary XML file line #74 in de.rki.coronawarnapp.dev:layout/include_tracing_status_card_location: Error inflating class de.rki.coronawarnapp.ui.view.LocationTracingStatusCardBodyTextView
    Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
        at android.view.LayoutInflater.createView(LayoutInflater.java:854)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
        at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1263)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1119)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
        at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:126)
        at androidx.databinding.ViewDataBinding.inflateInternal(ViewDataBinding.java:1368)
        at de.rki.coronawarnapp.databinding.FragmentSettingsTracingBinding.inflate(FragmentSettingsTracingBinding.java:149)
        at de.rki.coronawarnapp.databinding.FragmentSettingsTracingBinding.inflate(FragmentSettingsTracingBinding.java:135)
        at de.rki.coronawarnapp.ui.settings.SettingsTracingFragment.onCreateView(SettingsTracingFragment.kt:56)
        at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2698)
        at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:320)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1187)
        at androidx.fragment.app.FragmentManager.addAddedFragments(FragmentManager.java:2224)
        at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1997)
        at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1953)
        at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)
        at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7397)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
     Caused by: java.lang.IndexOutOfBoundsException: setSpan (-1 ... 2) starts before 0
        at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:496)
        at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:196)
        at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:183)
        at android.text.SpannableString.setSpan(SpannableString.java:60)
        at de.rki.coronawarnapp.util.ViewsKt.setUrl(Views.kt:41)
E/AndroidRuntime:     at de.rki.coronawarnapp.ui.view.LocationTracingStatusCardBodyTextView.setUrl(LocationTracingStatusCardBodyTextView.kt:28)
        at de.rki.coronawarnapp.ui.view.LocationTracingStatusCardBodyTextView.<init>(LocationTracingStatusCardBodyTextView.kt:16)
        	... 38 more
I/Process: Sending signal. PID: 8741 SIG: 9

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend to return the string without the link if the replacement marker isn't part of the string. after the translation it should be part of it.

@sonarcloud
Copy link

sonarcloud bot commented Sep 15, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@harambasicluka harambasicluka merged commit c3addf3 into dev Sep 15, 2020
@harambasicluka harambasicluka deleted the feature/2384-update-location-text branch September 15, 2020 17:13
@d4rken d4rken added this to the 1.4.0 milestone Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants