package Ġuk . n hs . n hs x . covid 1 9 . android . app . about Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . activity . view Models Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . daily Contact Testing Opt In Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . daily Contact Testing Section Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . en counter Data Section Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . ex posure Notification Data Section Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . follow Up Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . follow Up State Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . follow Up Test Date Container Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . follow Up Test Status Container Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . last Day Of Isolation Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . last Day Of Isolation Section Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . last Result Kit Type Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . last Result Value Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . last R is ky Venue Visit Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . last R is ky Venue Visit Section Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . latest Result Kit Type Container Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . latest Result Value Container Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . no Records View Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . sy mptoms Data Section Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . test Ack nowled ged Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . test Ack nowled ged Date Container Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . test EndDate Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . test EndDate Container Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . text Encounter Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . text Exposure Notification Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . textView Sy mptoms Date Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . title Daily Contact Testing Opt In Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . title Exposure Notification Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . title Last Day Of Isolation Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . title Last R is ky Venue Visit Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . title Latest Result Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . title Sy mptoms Ċ import Ġkotlinx . android . synt hetic . main . activity _ my _ data . view Content Ċ import Ġkotlinx . android . synt hetic . main . view _ toolbar _ primary . toolbar Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . R Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . about . Base My Data ViewModel . Isolation ViewState Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . about . Base My Data ViewModel . My Data State Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . app Component Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . common . Base Activity Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . common . ViewModel Factory Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . remote . data . V iro logy Test Kit Type Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . remote . data . V iro logy Test Kit Type . LAB _ RESULT Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . remote . data . V iro logy Test Kit Type . R AP ID _ RESULT Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . remote . data . V iro logy Test Kit Type . R AP ID _ SELF _ REPORT ED Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . test ordering . Ack nowled ged TestResult Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . test ordering . Re levant V iro logy TestResult . NEGATIVE Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . test ordering . Re levant V iro logy TestResult . POSITIVE Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . util . ui Format Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . util . view utils . g one Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . util . view utils . set Navigate Up Toolbar Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . util . view utils . visible Ċ import Ġjava . time . LocalDate Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠMy Data Activity Ġ: ĠBase Activity ( R . layout . activity _ my _ data ) Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġfactory : ĠViewModel Factory < Base My Data ViewModel > ĊĊĠĠĠ Ġprivate Ġval ĠviewModel : ĠBase My Data ViewModel Ġby Ġview Models Ġ{ Ġfactory Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġapp Component . inject ( this ) ĊĊĠĠĠĠĠĠĠ Ġset Navigate Up Toolbar ( toolbar , ĠR . string . settings _ my _ data , Ġup Indicator Ġ= ĠR . drawable . ic _ arrow _ back _ white ) ĊĊĠĠĠĠĠĠĠ Ġsetup ViewModel Listeners () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Resume () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Resume () ĊĠĠĠĠĠĠĠ ĠviewModel . on Resume () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġsetup ViewModel Listeners () Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel . my Data State (). observe ( this ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrender ViewState ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġrender ViewState ( view State : ĠMy Data State ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( view State . is olation State Ġ== Ġnull Ġ&& ĊĠĠĠĠĠĠĠĠĠĠĠ Ġview State . last R is ky Venue Visit Date Ġ== Ġnull Ġ&& ĊĠĠĠĠĠĠĠĠĠĠĠ Ġview State . ack nowled ged TestResult Ġ== Ġnull ĊĠĠĠĠĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġno Records View . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġview Content . g one () ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġno Records View . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġview Content . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhandle Isolation State ( view State . is olation State ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġupdate Last R is ky Venue Vis ited Segment ( view State . last R is ky Venue Visit Date ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhandle Showing Latest TestResult ( view State . ack nowled ged TestResult ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġhandle Showing Latest TestResult ( ack nowled ged TestResult : ĠAck nowled ged TestResult ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( ack nowled ged TestResult Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest EndDate . text Ġ= Ġacknowled ged TestResult . test EndDate . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast Result Value . text Ġ= Ġget TestResult Text ( ack nowled ged TestResult ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest Ack nowled ged Date . text Ġ= Ġacknowled ged TestResult . ack nowled ged Date . ui Format ( this ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( ack nowled ged TestResult . test Kit Type Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlast Result Kit Type . text Ġ= Ġget TestResult Kit Type Text ( ack nowled ged TestResult . test Kit Type ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlatest Result Kit Type Container . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlatest Result Kit Type Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( ack nowled ged TestResult . requires Conf ir mat ory Test ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( ack nowled ged TestResult . confirmed Date Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up State . text Ġ= ĠgetString ( R . string . about _ test _ follow _ up _ state _ complete ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up Date . text Ġ= Ġacknowled ged TestResult . confirmed Date . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up Test Date Container . visible () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up State . text Ġ= ĠgetString ( R . string . about _ test _ follow _ up _ state _ pending ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up Test Date Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up State . text Ġ= ĠgetString ( R . string . about _ test _ follow _ up _ state _ not _ required ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up Test Date Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Latest Result . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest EndDate Container . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlatest Result Value Container . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest Ack nowled ged Date Container . visible () ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Latest Result . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest EndDate Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlatest Result Value Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlatest Result Kit Type Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up Test Date Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfollow Up Test Status Container . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest Ack nowled ged Date Container . g one () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget TestResult Text ( ack nowled ged TestResult : ĠAck nowled ged TestResult ) Ġ= ĊĠĠĠĠĠĠĠ Ġwhen Ġ( ack nowled ged TestResult . test Result ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPOS ITIVE Ġ-> ĠgetString ( R . string . about _ positive ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNE G ATIVE Ġ-> ĠgetString ( R . string . about _ negative ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget TestResult Kit Type Text ( test Kit Type : ĠV iro logy Test Kit Type ) Ġ= ĊĠĠĠĠĠĠĠ Ġwhen Ġ( test Kit Type ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLAB _ RESULT Ġ-> ĠgetString ( R . string . about _ pc r ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR AP ID _ RESULT Ġ-> ĠgetString ( R . string . about _ lf d ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR AP ID _ SELF _ REPORT ED Ġ-> ĠgetString ( R . string . about _ lf d _ self _ reported ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġhandle Isolation State ( is olation ViewState : ĠI sol ation ViewState ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġisolation ViewState ?. let Ġ{ Ġhandle Actual Isolation State ( it ) Ġ} Ġ?: Ġhandle Empty Isolation State () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġhandle Actual Isolation State ( is olation ViewState : ĠI sol ation ViewState ) Ġ{ ĊĠĠĠĠĠĠĠ Ġno Records View . g one () ĊĠĠĠĠĠĠĠ Ġif Ġ( is olation ViewState . last Day Of Isolation Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast Day Of Isolation Date . text Ġ= Ġisolation ViewState . last Day Of Isolation . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Last Day Of Isolation . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast Day Of Isolation Section . visible () ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Last Day Of Isolation . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast Day Of Isolation Section . g one () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġif Ġ( is olation ViewState . contact Case Encounter Date Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtext Encounter Date . text Ġ= Ġisolation ViewState . contact Case Encounter Date . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Exposure Notification . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġencounter Data Section . visible () ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( is olation ViewState . contact Case Notification Date Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtext Exposure Notification Date . text Ġ= Ġisolation ViewState . contact Case Notification Date . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġexposure Notification Data Section . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġexposure Notification Data Section . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Exposure Notification . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġencounter Data Section . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġexposure Notification Data Section . g one () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġif Ġ( is olation ViewState . index Case Sy mptom On setDate Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠtextView Sy mptoms Date . text Ġ= Ġisolation ViewState . index Case Sy mptom On setDate . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Sy mptoms . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsy mptoms Data Section . visible () ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Sy mptoms . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsy mptoms Data Section . g one () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġif Ġ( is olation ViewState . daily Contact Testing Opt In Date Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdaily Contact Testing Opt In Date . text Ġ= Ġisolation ViewState . daily Contact Testing Opt In Date . ui Format ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Daily Contact Testing Opt In . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdaily Contact Testing Section . visible () ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Daily Contact Testing Opt In . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdaily Contact Testing Section . g one () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġhandle Empty Isolation State () Ġ{ ĊĠĠĠĠĠĠĠ Ġtitle Last Day Of Isolation . g one () ĊĠĠĠĠĠĠĠ Ġlast Day Of Isolation Section . g one () ĊĊĠĠĠĠĠĠĠ Ġtitle Sy mptoms . g one () ĊĠĠĠĠĠĠĠ Ġsy mptoms Data Section . g one () ĊĊĠĠĠĠĠĠĠ Ġtitle Exposure Notification . g one () ĊĠĠĠĠĠĠĠ Ġencounter Data Section . g one () ĊĠĠĠĠĠĠĠ Ġexposure Notification Data Section . g one () ĊĊĠĠĠĠĠĠĠ Ġtitle Daily Contact Testing Opt In . g one () ĊĠĠĠĠĠĠĠ Ġdaily Contact Testing Section . g one () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġupdate Last R is ky Venue Vis ited Segment ( date : ĠLocalDate ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( date Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Last R is ky Venue Visit . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast R is ky Venue Visit Section . visible () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast R is ky Venue Visit Date . text Ġ= Ġdate . ui Format ( this ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Last R is ky Venue Visit . g one () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlast R is ky Venue Visit Section . g one () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġstart ( context : ĠContext ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcontext . startActivity ( get Intent ( context )) ĊĊĠĠĠĠĠĠĠ Ġprivate Ġfun Ġget Intent ( context : ĠContext ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠIntent ( context , ĠMy Data Activity :: class . java ) ĊĠĠĠ Ġ} Ċ } Ċ