package Ġuk . n hs . n hs x . covid 1 9 . android . app . ex posure . share keys Ċ Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . ex posure . share keys . Can Share Keys . Can Share Keys Result . No Key Sharing Possible Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . ex posure . share keys . Can Share Keys . Can Share Keys Result . Key Sharing Possible Ċ import Ġuk . n hs . n hs x . covid 1 9 . android . app . notifications . Notification Provider Ċ import Ġjava . time . Clock Ċ import Ġjava . time . Instant Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠShow Share Keys Reminder Notification IfNeeded Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġnotification Provider : ĠNotification Provider , ĊĠĠĠ Ġprivate Ġval Ġkey Sharing Info Provider : ĠKey Sharing Info Provider , ĊĠĠĠ Ġprivate Ġval Ġcan Share Keys : ĠCan Share Keys , ĊĠĠĠ Ġprivate Ġval Ġclock : ĠClock Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġinvoke () Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( val Ġcan Share Keys Result Ġ= Ġcan Share Keys ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNo Key Sharing Possible Ġ-> Ġreturn ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis ĠKey Sharing Possible Ġ-> Ġshow Notification If Ne cessary ( can Share Keys Result . key Sharing Info ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġshow Notification If Ne cessary ( key Sharing Info : ĠKey Sharing Info ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( key Sharing Info . was Ack nowled ged More Than 2 4 Hours Ago ( clock ) Ġ&& Ġkey Sharing Info . notification Sent Date Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkey Sharing Info Provider . set Notification Sent Date ( Instant . now ( clock )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnotification Provider . show Share Keys Reminder Notification () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ