package Ġde . r ki . cor on aw arn app . dat ad on ation . analytics . modules . key submission Ċ Ċ import Ġde . r ki . cor on aw arn app . cor on atest . type . Cor ona Test . Type . PC R Ċ import Ġde . r ki . cor on aw arn app . cor on atest . type . Cor ona Test . Type . R AP ID _ ANT IG EN Ċ import Ġde . r ki . cor on aw arn app . dat ad on ation . analytics . storage . Analytics Settings Ċ import Ġde . r ki . cor on aw arn app . presence tracing . risk . Pt Risk Level Result Ċ import Ġde . r ki . cor on aw arn app . risk . Combined Ew Pt Risk Level Result Ċ import Ġde . r ki . cor on aw arn app . risk . Ew Risk Level Result Ċ import Ġde . r ki . cor on aw arn app . risk . Last Combined Risk Results Ċ import Ġde . r ki . cor on aw arn app . risk . Risk State Ċ import Ġde . r ki . cor on aw arn app . risk . storage . Risk Level Storage Ċ import Ġde . r ki . cor on aw arn app . util . Time And Date Extensions . to LocalDate Utc Ċ import Ġde . r ki . cor on aw arn app . util . TimeStamp er Ċ import Ġio . mock k . Mock K Annotations Ċ import Ġio . mock k . Runs Ċ import Ġio . mock k . co Every Ċ import Ġio . mock k . every Ċ import Ġio . mock k . impl . annotations . Mock K Ċ import Ġio . mock k . just Ċ import Ġio . mock k . verify Ċ import Ġkotlinx . coroutines . flow . flow Of Ċ import Ġkotlinx . coroutines . test . run Blocking Test Ċ import Ġorg . joda . time . Days Ċ import Ġorg . joda . time . Instant Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġtest helpers . Base Test Ċ import Ġtest helpers . preferences . mock Flow Preference Ċ Ċ class ĠAnalytics Key Submission Collector Test Ġ: ĠBaseTest () Ġ{ ĊĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġtime Stamp er : ĠTime Stamp er ĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġanalytics Settings : ĠAnalytics Settings ĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġanalytics P cr Key Submission Storage : ĠAnalytics PC R Key Submission Storage ĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġanalytics Ra Key Submission Storage : ĠAnalytics RA Key Submission Storage ĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġrisk Level Storage : ĠR isk Level Storage ĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġew Risk Level Result : ĠE w Risk Level Result ĊĠĠĠ Ġ@ Mock K Ġlateinit Ġvar Ġpt Risk Level Result : ĠPt Risk Level Result ĊĊĠĠĠ Ġprivate Ġval Ġnow Ġ= ĠInstant . now () ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ ĠMock K Annotations . init ( this ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġtime Stamp er . now UTC Ġ} Ġreturns Ġnow ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` save Ġtest Ġregistered `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcombined Ew Pt Risk Level Result Ġ= ĠCom bined Ew Pt Risk Level Result ( pt Risk Level Result , Ġew Risk Level Result ) ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġew Risk Level Result . risk State Ġ} Ġreturns ĠR isk State . INCRE ASE D _ R IS K ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġpt Risk Level Result . risk State Ġ} Ġreturns ĠR isk State . LOW _ R IS K ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġew Risk Level Result . calculated At Ġ} Ġreturns Ġnow ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġpt Risk Level Result . calculated At Ġ} Ġreturns Ġnow ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġew Risk Level Result . was Successfully Calculated Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġpt Risk Level Result . was Successfully Calculated Ġ} Ġreturns Ġtrue ĊĊĠĠĠĠĠĠĠ Ġco Every Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrisk Level Storage . latest And Last Successful Combined Ew Pt Risk Level Result ĊĠĠĠĠĠĠĠ Ġ} Ġreturns Ġflow Of ( Last Combined Risk Results ( combined Ew Pt Risk Level Result , Ġcombined Ew Pt Risk Level Result )) ĊĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġrisk Level Storage . all Ew Risk Level Results With Exposure Windows Ġ} Ġreturns Ġflow Of ( listOf ( ew Risk Level Result )) ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġrisk Level Storage . all Ew Risk Level Results Ġ} Ġreturns Ġflow Of ( listOf ( ew Risk Level Result )) ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġrisk Level Storage . all Pt Risk Level Results Ġ} Ġreturns Ġflow Of ( listOf ( pt Risk Level Result )) ĊĊĠĠĠĠĠĠĠ Ġval Ġp cr Test Registered At Ġ= Ġmock Flow Preference ( now . millis ) ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics P cr Key Submission Storage . test Registered At Ġ} Ġreturns Ġp cr Test Registered At ĊĊĠĠĠĠĠĠĠ Ġval Ġra Test Registered At Ġ= Ġmock Flow Preference ( now . millis ) ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Ra Key Submission Storage . test Registered At Ġ} Ġreturns Ġra Test Registered At ĊĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġew Risk Level Result . was Successfully Calculated Ġ} Ġreturns Ġtrue ĊĊĠĠĠĠĠĠĠ Ġval Ġhours Since High Risk Warning At Test Registration Ġ= Ġmock Flow Preference (- 1 ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . ew Hours Since High Risk Warning At Test Registration Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhours Since High Risk Warning At Test Registration ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics Ra Key Submission Storage . ew Hours Since High Risk Warning At Test Registration Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhours Since High Risk Warning At Test Registration ĊĊĠĠĠĠĠĠĠ Ġval Ġdays Since Most Recent Date At Risk Level At Test Registration Ġ= Ġmock Flow Preference ( 0 ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . ew Days Since Most Recent Date At Risk Level At Test Registration Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdays Since Most Recent Date At Risk Level At Test Registration ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics Ra Key Submission Storage . ew Days Since Most Recent Date At Risk Level At Test Registration Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdays Since Most Recent Date At Risk Level At Test Registration ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . pt Days Since Most Recent Date At Risk Level At Test Registration Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdays Since Most Recent Date At Risk Level At Test Registration ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics Ra Key Submission Storage . pt Days Since Most Recent Date At Risk Level At Test Registration Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdays Since Most Recent Date At Risk Level At Test Registration ĊĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . clear () Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics Ra Key Submission Storage . clear () Ġ} Ġjust ĠRuns ĊĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġew Risk Level Result . most Recent Date At Risk State Ġ} Ġreturns Ġnow . minus ( Days . days ( 2 ). to Standard Duration ()) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġpt Risk Level Result . most Recent Date At Risk State Ġ} Ġreturns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnow . minus ( Days . days ( 2 ). to Standard Duration ()). to LocalDate Utc () ĊĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Test Registered ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġp cr Test Registered At . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġhours Since High Risk Warning At Test Registration . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġdays Since Most Recent Date At Risk Level At Test Registration . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Test Registered ( R AP ID _ ANT IG EN ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġra Test Registered At . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġhours Since High Risk Warning At Test Registration . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġdays Since Most Recent Date At Risk Level At Test Registration . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġkeys Ġsubmitted `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġsubmitted Flow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . submitted Ġ} Ġreturns Ġsubmitted Flow ĊĠĠĠĠĠĠĠ Ġval Ġsubmitted At Flow Ġ= Ġmock Flow Preference ( now . millis ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . submitted At Ġ} Ġreturns Ġsubmitted At Flow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġsubmitted Flow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġsubmitted At Flow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġkeys Ġsubmitted Ġafter Ġcancel `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . submitted After Cancel Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted After Cancel ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġkeys Ġsubmitted Ġin Ġbackground `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . submitted In Background Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted In Background ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġkeys Ġsubmitted Ġafter Ġsy mptom Ġflow `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . submitted After Sy mptom Flow Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted After Sy mptom Flow ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġpositive Ġtest Ġresult Ġreceived `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( now . millis ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . test Result Received At Ġ} Ġreturns Ġflow ĊĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Positive TestResult Received ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġadvanced Ġconsent Ġgiven `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . advanced Consent Given Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Advanced Consent Given ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġconsent Ġwithdraw n `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . advanced Consent Given Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Consent Withdraw n ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` save Ġregistered Ġwith Ġtele Ġtan `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( false ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . registered With Tele T AN Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Registered With Tele T AN () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġsave Ġlast Ġsubmission Ġflow Ġscreen `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġflow Ġ= Ġmock Flow Preference ( 0 ) ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġanalytics P cr Key Submission Storage . last Submission Flow Screen Ġ} Ġreturns Ġflow ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Last Submission Flow Screen ( Screen . WARN _ OTHER S , ĠP CR ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġflow . update ( any ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` PC R Ġno Ġdata Ġcollection Ġif Ġdisabled `() Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġanalytics Settings . analytics Enabled . value Ġ} Ġreturns Ġfalse ĊĠĠĠĠĠĠĠ Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcollector Ġ= Ġcreate Instance () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Test Registered ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . test Registered At Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . ew Hours Since High Risk Warning At Test Registration Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . submitted Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted In Background ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . submitted In Background Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Advanced Consent Given ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . advanced Consent Given Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Consent Withdraw n ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . advanced Consent Given Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Last Submission Flow Screen ( Screen . UNKNOWN , ĠP CR ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . last Submission Flow Screen Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Positive TestResult Received ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . test Result Received At Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector . report Submitted After Cancel ( PC R ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 0 ) Ġ{ Ġanalytics P cr Key Submission Storage . submitted After Cancel Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcreate Instance () Ġ= ĠAnalytics Key Submission Collector ( ĊĠĠĠĠĠĠĠ Ġtime Stamp er , ĊĠĠĠĠĠĠĠ Ġanalytics Settings , ĊĠĠĠĠĠĠĠ Ġanalytics P cr Key Submission Storage , ĊĠĠĠĠĠĠĠ Ġanalytics Ra Key Submission Storage , ĊĠĠĠĠĠĠĠ Ġrisk Level Storage , ĊĠĠĠ Ġ) Ċ } Ċ