diff --git a/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentTest.kt b/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentTest.kt index 76acc846dab..873fd9bf581 100644 --- a/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentTest.kt +++ b/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentTest.kt @@ -27,6 +27,7 @@ import de.rki.coronawarnapp.tracing.GeneralTracingStatus import de.rki.coronawarnapp.tracing.states.TracingStateProvider import de.rki.coronawarnapp.tracing.ui.homecards.TracingStateItem import de.rki.coronawarnapp.tracing.ui.statusbar.TracingHeaderState +import de.rki.coronawarnapp.ui.eventregistration.organizer.TraceLocationOrganizerSettings import de.rki.coronawarnapp.ui.main.home.items.FAQCard import de.rki.coronawarnapp.ui.main.home.items.HomeItem import de.rki.coronawarnapp.ui.statistics.Statistics @@ -71,6 +72,7 @@ class HomeFragmentTest : BaseUITest() { @MockK lateinit var deadmanNotificationScheduler: DeadmanNotificationScheduler @MockK lateinit var appShortcutsHelper: AppShortcutsHelper @MockK lateinit var tracingSettings: TracingSettings + @MockK lateinit var traceLocationOrganizerSettings: TraceLocationOrganizerSettings private lateinit var homeFragmentViewModel: HomeFragmentViewModel @@ -273,7 +275,8 @@ class HomeFragmentTest : BaseUITest() { statisticsProvider = statisticsProvider, deadmanNotificationScheduler = deadmanNotificationScheduler, appShortcutsHelper = appShortcutsHelper, - tracingSettings = tracingSettings + tracingSettings = tracingSettings, + traceLocationOrganizerSettings = traceLocationOrganizerSettings ) ) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/EventRegistrationUIModule.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/EventRegistrationUIModule.kt index f18c3eb967a..09f3e8853f1 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/EventRegistrationUIModule.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/EventRegistrationUIModule.kt @@ -12,6 +12,8 @@ import de.rki.coronawarnapp.ui.eventregistration.attendee.scan.ScanCheckInQrCode import de.rki.coronawarnapp.ui.eventregistration.organizer.category.TraceLocationCategoryFragment import de.rki.coronawarnapp.ui.eventregistration.organizer.category.TraceLocationCategoryFragmentModule import de.rki.coronawarnapp.ui.eventregistration.organizer.create.TraceLocationCreateFragmentModule +import de.rki.coronawarnapp.ui.eventregistration.organizer.qrinfo.TraceLocationQRInfoFragment +import de.rki.coronawarnapp.ui.eventregistration.organizer.qrinfo.TraceLocationQRInfoFragmentModule import de.rki.coronawarnapp.ui.eventregistration.organizer.list.TraceLocationsFragment import de.rki.coronawarnapp.ui.eventregistration.organizer.list.TraceLocationsFragmentModule @@ -33,6 +35,9 @@ internal abstract class EventRegistrationUIModule { @ContributesAndroidInjector(modules = [TraceLocationCreateFragmentModule::class]) abstract fun traceLocationCreateFragment(): TraceLocationCreateFragment + @ContributesAndroidInjector(modules = [TraceLocationQRInfoFragmentModule::class]) + abstract fun traceLocationQRInfoFragment(): TraceLocationQRInfoFragment + @ContributesAndroidInjector(modules = [TraceLocationsFragmentModule::class]) abstract fun traceLocationsFragment(): TraceLocationsFragment } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/TraceLocationPreferences.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/TraceLocationPreferences.kt new file mode 100644 index 00000000000..1f0b4fca0e5 --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/TraceLocationPreferences.kt @@ -0,0 +1,26 @@ +package de.rki.coronawarnapp.ui.eventregistration + +import android.content.Context +import de.rki.coronawarnapp.util.di.AppContext +import de.rki.coronawarnapp.util.preferences.clearAndNotify +import de.rki.coronawarnapp.util.preferences.createFlowPreference +import javax.inject.Inject +import javax.inject.Singleton + +@Singleton +class TraceLocationPreferences @Inject constructor( + @AppContext val context: Context +) { + private val prefs by lazy { + context.getSharedPreferences("trace_location_localdata", Context.MODE_PRIVATE) + } + + val qrInfoAcknowledged = prefs.createFlowPreference( + key = "trace_location_qr_info_acknowledged", + defaultValue = false + ) + + fun clear() { + prefs.clearAndNotify() + } +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/TraceLocationOrganizerSettings.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/TraceLocationOrganizerSettings.kt new file mode 100644 index 00000000000..8752beda3bb --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/TraceLocationOrganizerSettings.kt @@ -0,0 +1,15 @@ +package de.rki.coronawarnapp.ui.eventregistration.organizer + +import de.rki.coronawarnapp.ui.eventregistration.TraceLocationPreferences +import javax.inject.Inject +import javax.inject.Singleton + +@Singleton +class TraceLocationOrganizerSettings @Inject constructor(val preferences: TraceLocationPreferences) { + + var qrInfoAcknowledged: Boolean + get() { + return preferences.qrInfoAcknowledged.value + } + set(value) = preferences.qrInfoAcknowledged.update { value } +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt new file mode 100644 index 00000000000..a89c82c787a --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt @@ -0,0 +1,51 @@ +package de.rki.coronawarnapp.ui.eventregistration.organizer.qrinfo + +import android.os.Bundle +import android.view.View +import androidx.core.net.toUri +import androidx.fragment.app.Fragment +import androidx.navigation.fragment.findNavController +import de.rki.coronawarnapp.R +import de.rki.coronawarnapp.databinding.TraceLocationOrganizerQrCodeInfoFragmentBinding +import de.rki.coronawarnapp.ui.eventregistration.organizer.TraceLocationOrganizerSettings +import de.rki.coronawarnapp.util.di.AutoInject +import de.rki.coronawarnapp.util.ui.doNavigate +import de.rki.coronawarnapp.util.ui.observe2 +import de.rki.coronawarnapp.util.ui.popBackStack +import de.rki.coronawarnapp.util.ui.viewBindingLazy +import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactoryProvider +import de.rki.coronawarnapp.util.viewmodel.cwaViewModels +import javax.inject.Inject + +class TraceLocationQRInfoFragment : Fragment(R.layout.trace_location_organizer_qr_code_info_fragment), AutoInject { + + private val binding: TraceLocationOrganizerQrCodeInfoFragmentBinding by viewBindingLazy() + + @Inject lateinit var settings: TraceLocationOrganizerSettings + + @Inject lateinit var viewModelFactory: CWAViewModelFactoryProvider.Factory + private val vm: TraceLocationQRInfoViewModel by cwaViewModels { viewModelFactory } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + binding.apply { + toolbar.setNavigationOnClickListener { popBackStack() } + privacyInformation.setOnClickListener { vm.openPrivacyCard() } + traceLocationQrInfoUnderstandButton.setOnClickListener { vm.navigateToMyQRCodes() } + } + + vm.routeToScreen.observe2(this) { + when (it) { + is TraceLocationQRInfoNavigationEvents.NavigateToDataPrivacy -> + findNavController().navigate("coronawarnapp://contactdiary/dataPrivacy".toUri()) + is TraceLocationQRInfoNavigationEvents.NavigateToMyQrCodes -> { + settings.qrInfoAcknowledged = true + doNavigate( + TraceLocationQRInfoFragmentDirections + .actionTraceLocationOrganizerQRInfoFragmentToTraceLocationOrganizerListFragment() + ) + } + } + } + } +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragmentModule.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragmentModule.kt new file mode 100644 index 00000000000..830c5f14db0 --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragmentModule.kt @@ -0,0 +1,18 @@ +package de.rki.coronawarnapp.ui.eventregistration.organizer.qrinfo + +import dagger.Binds +import dagger.Module +import dagger.multibindings.IntoMap +import de.rki.coronawarnapp.util.viewmodel.CWAViewModel +import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactory +import de.rki.coronawarnapp.util.viewmodel.CWAViewModelKey + +@Module +abstract class TraceLocationQRInfoFragmentModule { + + @Binds + @IntoMap + @CWAViewModelKey(TraceLocationQRInfoViewModel::class) + abstract fun traceLocationCreateViewModel(factory: TraceLocationQRInfoViewModel.Factory): + CWAViewModelFactory +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoNavigationEvents.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoNavigationEvents.kt new file mode 100644 index 00000000000..cb197c47303 --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoNavigationEvents.kt @@ -0,0 +1,6 @@ +package de.rki.coronawarnapp.ui.eventregistration.organizer.qrinfo + +sealed class TraceLocationQRInfoNavigationEvents { + object NavigateToDataPrivacy : TraceLocationQRInfoNavigationEvents() + object NavigateToMyQrCodes : TraceLocationQRInfoNavigationEvents() +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoViewModel.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoViewModel.kt new file mode 100644 index 00000000000..5f9da66ec59 --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoViewModel.kt @@ -0,0 +1,22 @@ +package de.rki.coronawarnapp.ui.eventregistration.organizer.qrinfo + +import dagger.assisted.AssistedFactory +import dagger.assisted.AssistedInject +import de.rki.coronawarnapp.util.ui.SingleLiveEvent +import de.rki.coronawarnapp.util.viewmodel.CWAViewModel +import de.rki.coronawarnapp.util.viewmodel.SimpleCWAViewModelFactory + +class TraceLocationQRInfoViewModel @AssistedInject constructor() : CWAViewModel() { + val routeToScreen: SingleLiveEvent = SingleLiveEvent() + + fun openPrivacyCard() { + routeToScreen.postValue(TraceLocationQRInfoNavigationEvents.NavigateToDataPrivacy) + } + + fun navigateToMyQRCodes() { + routeToScreen.postValue(TraceLocationQRInfoNavigationEvents.NavigateToMyQrCodes) + } + + @AssistedFactory + interface Factory : SimpleCWAViewModelFactory +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt index 3c6852ad003..a51ff449508 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt @@ -5,6 +5,8 @@ import android.os.Bundle import android.view.View import android.view.accessibility.AccessibilityEvent import androidx.fragment.app.Fragment +import androidx.navigation.NavGraph +import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.LinearLayoutManager import de.rki.coronawarnapp.R @@ -78,6 +80,18 @@ class HomeFragment : Fragment(R.layout.home_fragment_layout), AutoInject { ExternalActionHelper.openUrl(this@HomeFragment, getString(R.string.main_about_link)) } + vm.openTraceLocationOrganizerFlow.observe2(this) { + vm.wasQRInfoWasAcknowledged() + val nestedGraph = findNavController().graph.findNode(R.id.trace_location_organizer_nav_graph) as NavGraph + + if (vm.wasQRInfoWasAcknowledged()) { + nestedGraph.startDestination = R.id.traceLocationOrganizerListFragment + } else { + nestedGraph.startDestination = R.id.traceLocationOrganizerQRInfoFragment + } + doNavigate(HomeFragmentDirections.actionMainFragmentToTraceLocationOrganizerNavGraph()) + } + vm.popupEvents.observe2(this) { event -> when (event) { HomeFragmentEvents.ShowErrorResetDialog -> { diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentViewModel.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentViewModel.kt index 382a12eca79..c795ab4d5dd 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentViewModel.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragmentViewModel.kt @@ -47,9 +47,10 @@ import de.rki.coronawarnapp.tracing.ui.homecards.TracingFailedCard import de.rki.coronawarnapp.tracing.ui.homecards.TracingProgressCard import de.rki.coronawarnapp.tracing.ui.statusbar.TracingHeaderState import de.rki.coronawarnapp.tracing.ui.statusbar.toHeaderState +import de.rki.coronawarnapp.ui.eventregistration.organizer.TraceLocationOrganizerSettings import de.rki.coronawarnapp.ui.main.home.HomeFragmentEvents.ShowErrorResetDialog -import de.rki.coronawarnapp.ui.main.home.items.CreateTraceLocationCard import de.rki.coronawarnapp.ui.main.home.HomeFragmentEvents.ShowTracingExplanation +import de.rki.coronawarnapp.ui.main.home.items.CreateTraceLocationCard import de.rki.coronawarnapp.ui.main.home.items.FAQCard import de.rki.coronawarnapp.ui.main.home.items.HomeItem import de.rki.coronawarnapp.ui.main.home.items.ReenableRiskCard @@ -83,12 +84,14 @@ class HomeFragmentViewModel @AssistedInject constructor( private val deadmanNotificationScheduler: DeadmanNotificationScheduler, private val appShortcutsHelper: AppShortcutsHelper, private val tracingSettings: TracingSettings, + private val traceLocationOrganizerSettings: TraceLocationOrganizerSettings ) : CWAViewModel(dispatcherProvider = dispatcherProvider) { private val tracingStateProvider by lazy { tracingStateProviderFactory.create(isDetailsMode = false) } val routeToScreen = SingleLiveEvent() val openFAQUrlEvent = SingleLiveEvent() + val openTraceLocationOrganizerFlow = SingleLiveEvent() val tracingHeaderState: LiveData = tracingStatus.generalStatus .map { it.toHeaderState() } @@ -240,7 +243,7 @@ class HomeFragmentViewModel @AssistedInject constructor( ) } - add(CreateTraceLocationCard.Item(onClickAction = { /** Todo: Add navigation on click */ })) + add(CreateTraceLocationCard.Item(onClickAction = { openTraceLocationOrganizerFlow.postValue(Unit) })) add(FAQCard.Item(onClickAction = { openFAQUrlEvent.postValue(Unit) })) } @@ -322,6 +325,8 @@ class HomeFragmentViewModel @AssistedInject constructor( cwaSettings.wasTracingExplanationDialogShown = true } + fun wasQRInfoWasAcknowledged() = traceLocationOrganizerSettings.qrInfoAcknowledged + @AssistedFactory interface Factory : SimpleCWAViewModelFactory } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/items/CreateTraceLocationCard.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/items/CreateTraceLocationCard.kt index 63895380eac..0ccc118307e 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/items/CreateTraceLocationCard.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/items/CreateTraceLocationCard.kt @@ -20,10 +20,9 @@ class CreateTraceLocationCard(parent: ViewGroup) : payloads: List ) -> Unit = { item, payloads -> - itemView.setOnClickListener { - val curItem = payloads.filterIsInstance().singleOrNull() ?: item - curItem.onClickAction(item) - } + val curItem = payloads.filterIsInstance().singleOrNull() ?: item + itemView.setOnClickListener { curItem.onClickAction(item) } + createTraceLocationCardButton.setOnClickListener { curItem.onClickAction(item) } } data class Item(val onClickAction: (Item) -> Unit) : HomeItem, HasPayloadDiffer { diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/DataReset.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/DataReset.kt index e8c47684c90..6550161fbd7 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/DataReset.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/DataReset.kt @@ -21,6 +21,7 @@ import de.rki.coronawarnapp.storage.OnboardingSettings import de.rki.coronawarnapp.storage.TracingSettings import de.rki.coronawarnapp.submission.SubmissionRepository import de.rki.coronawarnapp.submission.SubmissionSettings +import de.rki.coronawarnapp.ui.eventregistration.TraceLocationPreferences import de.rki.coronawarnapp.util.di.AppContext import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock @@ -43,6 +44,7 @@ class DataReset @Inject constructor( private val riskLevelStorage: RiskLevelStorage, private val contactDiaryRepository: ContactDiaryRepository, private var contactDiaryPreferences: ContactDiaryPreferences, + private var traceLocationPreferences: TraceLocationPreferences, private val cwaSettings: CWASettings, private val statisticsProvider: StatisticsProvider, private val surveySettings: SurveySettings, @@ -76,6 +78,7 @@ class DataReset @Inject constructor( downloadDiagnosisKeysSettings.clear() riskLevelStorage.clear() contactDiaryPreferences.clear() + traceLocationPreferences.clear() cwaSettings.clear() surveySettings.clear() analyticsSettings.clear() diff --git a/Corona-Warn-App/src/main/res/drawable-night/ic_qr_code_illustration.xml b/Corona-Warn-App/src/main/res/drawable-night/ic_qr_code_illustration.xml new file mode 100644 index 00000000000..c51ba93aa4e --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable-night/ic_qr_code_illustration.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable-night/ic_qr_time.xml b/Corona-Warn-App/src/main/res/drawable-night/ic_qr_time.xml new file mode 100644 index 00000000000..86d535a2b30 --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable-night/ic_qr_time.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable-night/ic_qr_tracing_static.xml b/Corona-Warn-App/src/main/res/drawable-night/ic_qr_tracing_static.xml new file mode 100644 index 00000000000..34d509682be --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable-night/ic_qr_tracing_static.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_qr_code_illustration.xml b/Corona-Warn-App/src/main/res/drawable/ic_qr_code_illustration.xml new file mode 100644 index 00000000000..f6de18a8855 --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable/ic_qr_code_illustration.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_qr_info.xml b/Corona-Warn-App/src/main/res/drawable/ic_qr_info.xml new file mode 100644 index 00000000000..850e248c98f --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable/ic_qr_info.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_qr_time.xml b/Corona-Warn-App/src/main/res/drawable/ic_qr_time.xml new file mode 100644 index 00000000000..2dda5a112cf --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable/ic_qr_time.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_qr_tracing_static.xml b/Corona-Warn-App/src/main/res/drawable/ic_qr_tracing_static.xml new file mode 100644 index 00000000000..cbf5f9accf8 --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable/ic_qr_tracing_static.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/Corona-Warn-App/src/main/res/layout/trace_location_organizer_qr_code_info_fragment.xml b/Corona-Warn-App/src/main/res/layout/trace_location_organizer_qr_code_info_fragment.xml new file mode 100644 index 00000000000..8cafcb270f8 --- /dev/null +++ b/Corona-Warn-App/src/main/res/layout/trace_location_organizer_qr_code_info_fragment.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/trace_location_privacy_card.xml b/Corona-Warn-App/src/main/res/layout/trace_location_privacy_card.xml new file mode 100644 index 00000000000..3d36130cbf9 --- /dev/null +++ b/Corona-Warn-App/src/main/res/layout/trace_location_privacy_card.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/navigation/contact_diary_nav_graph.xml b/Corona-Warn-App/src/main/res/navigation/contact_diary_nav_graph.xml index 48be50fd3f6..82c07fce5b5 100644 --- a/Corona-Warn-App/src/main/res/navigation/contact_diary_nav_graph.xml +++ b/Corona-Warn-App/src/main/res/navigation/contact_diary_nav_graph.xml @@ -100,7 +100,10 @@ android:id="@+id/contactDiaryInformationPrivacyFragment" android:name="de.rki.coronawarnapp.ui.information.InformationPrivacyFragment" android:label="InformationPrivacyFragment" - tools:layout="@layout/fragment_information_privacy" /> + tools:layout="@layout/fragment_information_privacy"> + + + + app:destination="@id/trace_location_organizer_nav_graph" /> @@ -264,7 +267,7 @@ tools:layout="@layout/fragment_submission_no_consent_positive_other_warning"> @@ -411,7 +414,7 @@ app:destination="@id/submissionResultPositiveOtherWarningNoConsentFragment" /> @@ -434,7 +437,7 @@ android:label="SubmissionTestResultConsentFragment"> + android:id="@+id/trace_location_organizer_nav_graph" + app:startDestination="@id/traceLocationOrganizerQRInfoFragment"> + + + + + + "Sie planen ein Event oder haben ein Geschäft? Erstellen Sie einen QR-Code, mit dem sich Ihre Gäste bei Ankunft einchecken können." "QR-Code erstellen" + + "Eine Person zeigt auf ein Flipchart." + + + + "Eine Person zeigt auf ein Flipchart, zwei Personen sitzen daneben und schauen auf das Flipchart." + + "Mehr Sicherheit für Sie und Ihre Gäste" + + "Erstellen Sie einen QR-Code, den Ihre Gäste bei ihrer Ankunft scannen können. So können sie bei Bedarf andere Gäste warnen oder von ihnen gewarnt werden." + + "Jeder Check-in wird bei der Ermittlung des Risikostatus zusätzlich berücksichtigt. Wird eine eingecheckte Person später positiv getestet, können die Gäste gewarnt werden, wenn sie sich zur gleichen Zeit oder bis zu 30 Minuten nach der positiv getesteten Person im gleichen Raum aufgehalten haben." + + "Stellen Sie den QR-Code Ihren Gästen entweder über Ihr Smartphone oder in ausgedruckter Form zur Verfügung." + + "Wenn Sie dauerhaft einen QR-Code verwenden, sollten Sie diesen einmal täglich neu erstellen außerhalb der Öffnungszeiten." + + "Enverstanden" "Sollten Sie dem technischen Support nach der Übersendung Ihre Fehlerbericht-ID mitgeteilt haben, können Sie auch jederzeit die Löschung der weiteren mitgeteilten Informationen, der Fehlerbericht-ID und des Fehlerberichtes verlangen. Andernfalls wird der Fehlerbericht automatisch nach 14 Tagen gelöscht." + + + "Datenschutz und Datensicherheit" + + "Wenn Sie auf „Weiter“ tippen, können Sie einen QR-Code für Ihre Gäste erstellen." + + "Ihre Angaben zum Event oder Ort werden in codierter Form in einem ausdruckbaren QR-Code gespeichert." + + "Ihre Gäste können den QR-Code dann mit der App scannen." + + "Bitte achten Sie darauf, dass Sie möglichst präzise Angaben zur Bezeichnung, Kategorie und Uhrzeit Ihres Events oder Orts und zur typischen Aufenthaltsdauer machen." + + "Je genauer Ihre Angaben sind, desto zuverlässiger können Ihre Gäste gewarnt werden." + + "Bitte stellen Sie den QR-Code so zur Verfügung, dass alle Ihre Gäste ihn unter Einhaltung der Abstands- und Hygieneregeln (mindestens 1,5 Meter) scannen können." + + "Wir empfehlen die QR-Codes für Orte in einmal täglich außerhalb der Öffnungszeiten neu zu erstellen, um dauerhaft zuverlässige Warnungen zu ermöglichen und Missbrauch der QR-Codes zu verhindern." + diff --git a/Corona-Warn-App/src/main/res/values-tr/legal_strings.xml b/Corona-Warn-App/src/main/res/values-tr/legal_strings.xml index 84df908b2e0..359d5125fe1 100644 --- a/Corona-Warn-App/src/main/res/values-tr/legal_strings.xml +++ b/Corona-Warn-App/src/main/res/values-tr/legal_strings.xml @@ -109,4 +109,22 @@ "Rapor RKI’ye gönderilmeden önce, Uygulamanızın orijinal olduğu bir kez kontrol edilir. Bunun için, akıllı telefonunuz tarafından benzersiz bir kimlik kodu oluşturulur ve Apple’ın Uygulamanızın orijinal ürün olduğunu RKI’ye doğrulaması için ABD veya diğer bir üçüncü ülkedeki Apple’a aktarılır. Bu kimlik kodu, akıllı telefonunuzun sürümü ve Uygulama hakkında veriler içerir. Apple, böylece kim olduğunuzu ortaya çıkarabilir ve akıllı telefonunuzun orijinallik kontrolünün yapıldığını anlayabilir. Apple, Uygulamadan daha fazla bilgi almaz." "Gönderimden sonra hata raporu kimlik numarasını teknik desteğe bildirirseniz, sağlanan diğer bilgilerin, hata raporu kimliğinin ve hata raporunun silinmesini istediğiniz zaman talep edebilirsiniz. Aksi halde bu hata raporu 14 gün sonra otomatik olarak silinecektir." + + + + "Veri gizliliği ve veri güvenliği" + + "“Devam”a tıklarsanız, konuklarınız için bir QR kodu oluşturabilirsiniz." + + "Olay veya konumla ilgili verileriniz, yazdırılabilir biçimde bir QR kodunda kaydedilecektir." + + "Daha sonra konuklarınız, Uygulama ile QR kodu tarayabilir." + + "Lütfen olayınızın veya konumunuzun adı, kategorisi ve saati ve kalış süresi ile ilgili olarak mümkün olduğunca kesin bilgi sağlayın." + + "Verdiğinizi bilgiler ne kadar kesin olursa, konuklarınız da o kadar güvenilir bir biçimde uyarılabilir." + + "Lütfen tüm konuklarınızın QR kodu, mesafe ve hijyen kuralları çerçevesinde (en az 1,5 metre) tarayabilmesi için gerekli ortamı sağlayın." + + "Kalıcı ve güvenilir uyarılar tetiklemek ve QR kodların suistimal edilmesinin önüne geçmek adına, konumlar için olan QR kodları düzenli aralıklarla yeniden oluşturmanızı öneririz." diff --git a/Corona-Warn-App/src/main/res/values/event_registration_strings.xml b/Corona-Warn-App/src/main/res/values/event_registration_strings.xml index f76e28a05a1..e2115b054f0 100644 --- a/Corona-Warn-App/src/main/res/values/event_registration_strings.xml +++ b/Corona-Warn-App/src/main/res/values/event_registration_strings.xml @@ -139,6 +139,25 @@ "Are you planning an event or do you run a business? Create a QR code so your guests can check in when they arrive." "Create QR Code" + + "Eine Person zeigt auf ein Flipchart." + + + + "Eine Person zeigt auf ein Flipchart, zwei Personen sitzen daneben und schauen auf das Flipchart." + + "Mehr Sicherheit für Sie und Ihre Gäste" + + "Erstellen Sie einen QR-Code, den Ihre Gäste bei ihrer Ankunft scannen können. So können sie bei Bedarf andere Gäste warnen oder von ihnen gewarnt werden." + + "Jeder Check-in wird bei der Ermittlung des Risikostatus zusätzlich berücksichtigt. Wird eine eingecheckte Person später positiv getestet, können die Gäste gewarnt werden, wenn sie sich zur gleichen Zeit oder bis zu 30 Minuten nach der positiv getesteten Person im gleichen Raum aufgehalten haben." + + "Stellen Sie den QR-Code Ihren Gästen entweder über Ihr Smartphone oder in ausgedruckter Form zur Verfügung." + + "Wenn Sie dauerhaft einen QR-Code verwenden, sollten Sie diesen einmal täglich neu erstellen außerhalb der Öffnungszeiten." + + "Enverstanden" + "If, after sending the report, you have provided your error report ID to the technical support team, then you may also request at any time that the other information you provided, the error report ID, and the error report itself be erased. Otherwise, the error report will be automatically erased after 14 days." + + + "Data protection and data security" + + "If you tap on “Next”, you can create a QR code for your guests." + + "Your event or place details will be stored in encoded form in a printable QR code." + + "Your guests can then scan the QR code with the app." + + "Please ensure that you are as specific as possible about the name, category and time of your event or place, and the typical length of stay." + + "The more accurate your information, the more reliably your guests can be warned." + + "Please display the QR code in such a way that all your guests can scan it while observing the social distancing and hygiene rules (at least 1.5 meters)." + + "We recommend creating new QR codes for places at regular intervals, so that warnings are as reliable as possible over time and in order to prevent the QR codes from being misused." + diff --git a/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/main/home/HomeFragmentViewModelTest.kt b/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/main/home/HomeFragmentViewModelTest.kt index 2dfc0688e88..962b580018c 100644 --- a/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/main/home/HomeFragmentViewModelTest.kt +++ b/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/main/home/HomeFragmentViewModelTest.kt @@ -17,6 +17,7 @@ import de.rki.coronawarnapp.tracing.GeneralTracingStatus.Status import de.rki.coronawarnapp.tracing.states.LowRisk import de.rki.coronawarnapp.tracing.states.TracingStateProvider import de.rki.coronawarnapp.tracing.ui.statusbar.TracingHeaderState +import de.rki.coronawarnapp.ui.eventregistration.organizer.TraceLocationOrganizerSettings import de.rki.coronawarnapp.ui.main.home.HomeFragmentEvents import de.rki.coronawarnapp.ui.main.home.HomeFragmentViewModel import de.rki.coronawarnapp.util.DeviceUIState.PAIRED_POSITIVE @@ -65,6 +66,7 @@ class HomeFragmentViewModelTest : BaseTest() { @MockK lateinit var deadmanNotificationScheduler: DeadmanNotificationScheduler @MockK lateinit var appShortcutsHelper: AppShortcutsHelper @MockK lateinit var tracingSettings: TracingSettings + @MockK lateinit var traceLocationOrganizerSettings: TraceLocationOrganizerSettings @BeforeEach fun setup() { @@ -97,7 +99,8 @@ class HomeFragmentViewModelTest : BaseTest() { statisticsProvider = statisticsProvider, deadmanNotificationScheduler = deadmanNotificationScheduler, appShortcutsHelper = appShortcutsHelper, - tracingSettings = tracingSettings + tracingSettings = tracingSettings, + traceLocationOrganizerSettings = traceLocationOrganizerSettings ) @Test diff --git a/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/util/DataResetTest.kt b/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/util/DataResetTest.kt index 457f7d156b0..9eec1401fb2 100644 --- a/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/util/DataResetTest.kt +++ b/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/util/DataResetTest.kt @@ -20,6 +20,7 @@ import de.rki.coronawarnapp.storage.OnboardingSettings import de.rki.coronawarnapp.storage.TracingSettings import de.rki.coronawarnapp.submission.SubmissionRepository import de.rki.coronawarnapp.submission.SubmissionSettings +import de.rki.coronawarnapp.ui.eventregistration.TraceLocationPreferences import io.mockk.MockKAnnotations import io.mockk.coVerify import io.mockk.impl.annotations.MockK @@ -39,6 +40,7 @@ internal class DataResetTest : BaseTest() { @MockK lateinit var riskLevelStorage: RiskLevelStorage @MockK lateinit var contactDiaryRepository: ContactDiaryRepository @MockK lateinit var contactDiaryPreferences: ContactDiaryPreferences + @MockK lateinit var traceLocationPreferences: TraceLocationPreferences @MockK lateinit var cwaSettings: CWASettings @MockK lateinit var statisticsProvider: StatisticsProvider @MockK lateinit var surveySettings: SurveySettings @@ -65,6 +67,7 @@ internal class DataResetTest : BaseTest() { downloadDiagnosisKeysSettings = downloadDiagnosisKeysSettings, riskLevelStorage = riskLevelStorage, contactDiaryRepository = contactDiaryRepository, + traceLocationPreferences = traceLocationPreferences, contactDiaryPreferences = contactDiaryPreferences, cwaSettings = cwaSettings, statisticsProvider = statisticsProvider, @@ -92,6 +95,7 @@ internal class DataResetTest : BaseTest() { coVerify(exactly = 1) { downloadDiagnosisKeysSettings.clear() } coVerify(exactly = 1) { riskLevelStorage.clear() } coVerify(exactly = 1) { contactDiaryPreferences.clear() } + coVerify(exactly = 1) { traceLocationPreferences.clear() } coVerify(exactly = 1) { cwaSettings.clear() } coVerify(exactly = 1) { surveySettings.clear() } coVerify(exactly = 1) { analyticsSettings.clear() }