package Ġde . r ki . cor on aw arn app . dat ad on ation . analytics . modules . key submission Ċ Ċ import Ġandroid . content . Context Ċ import Ġde . r ki . cor on aw arn app . util . di . AppContext Ċ import Ġde . r ki . cor on aw arn app . util . preferences . clear And Notify Ċ import Ġde . r ki . cor on aw arn app . util . preferences . create Flow Preference Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠAnalytics PC R Key Submission Storage Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġ@ AppContext Ġcontext : ĠContext Ċ ) Ġ: ĠAnalytics Key Submission Storage ( context , Ġshared Pref Key Suffix ) Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġconst Ġval Ġshared Pref Key Suffix Ġ= Ġ"" Ġ// Ġthe Ġoriginal ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠAnalytics RA Key Submission Storage Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġ@ AppContext Ġcontext : ĠContext Ċ ) Ġ: ĠAnalytics Key Submission Storage ( context , Ġshared Pref Key Suffix ) Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġconst Ġval Ġshared Pref Key Suffix Ġ= Ġ"_ RAT " ĊĠĠĠ Ġ} Ċ } Ċ Ċ open Ġclass ĠAnalytics Key Submission Storage ( ĊĠĠĠ Ġval Ġcontext : ĠContext , ĊĠĠĠ Ġval Ġshared Pref Key Suffix : ĠString Ċ ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġprefs Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ Ġcontext . get SharedPreferences ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" analytics _ key _ submission _ local data $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠĠĠĠĠ ĠContext . MODE _ PRIVATE ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġtest Result Received At Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ test Result Received At $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 L ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Registered At Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ test Registered At $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 L ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġsubmitted Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ submitted $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġsubmitted At Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ submitted At $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 L ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġsubmitted In Background Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ submitted In Background $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġsubmitted After Cancel Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ submitted After Cancel $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġsubmitted After Sy mptom Flow Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ submitted After Sy mptom Flow $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġlast Submission Flow Screen Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ last Submission Flow Screen $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= ĠScreen . UNKNOWN . code ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġadvanced Consent Given Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ advanced Consent Given $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġregistered With Tele T AN Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ registered With Tele T AN $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġew Hours Since High Risk Warning At Test Registration Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ hours Since High Risk Warning At Test Registration $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġew Days Since Most Recent Date At Risk Level At Test Registration Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ days Since Most Recent Date At Risk Level At Test Registration $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġpt Hours Since High Risk Warning At Test Registration Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ hours Since Pt High Risk Warning At Test Registration $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġpt Days Since Most Recent Date At Risk Level At Test Registration Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ days Since Most Recent Date At Pt Risk Level At Test Registration $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġ- 1 ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġsubmitted With Check Ins Ġ= Ġprefs . create Flow Preference ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" analytics _ key _ submission _ submitted With Check Ins $ shared Pref Key Suffix ", ĊĠĠĠĠĠĠĠ ĠdefaultValue Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġfun Ġclear () Ġ{ ĊĠĠĠĠĠĠĠ Ġprefs . clear And Notify () ĊĠĠĠ Ġ} Ċ } Ċ