package Ġcom . developer g unda . analytics architecture Ċ Ċ import Ġandroid . content . Broadcast Receiver Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġcom . developer g unda . analytics architecture . analytics . App Events Ċ import Ġcom . developer g unda . lib . analytics . Analytics Manager Ċ import Ġcom . developer g unda . lib . analytics . Analytics Service Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ import Ġdagger . h ilt . android . internal . managers . Broadcast Receiver Component Manager Ċ import Ġdagger . h ilt . internal . Unsafe Cast s Ċ import Ġtim ber . log . Tim ber Ċ import Ġjavax . inject . Inject Ċ Ċ @ Android EntryPoint Ċ class ĠApp Updates Receiver Ġ: ĠBroadcast Receiver () Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġanalytics Service : ĠAnalytics Service ĊĊĠĠĠ Ġoverride Ġfun Ġon Receive ( context : ĠContext ?, Ġintent : ĠIntent ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Work around Ġfor Ġh ilt Ġbroadcast Ġreceiver Ġinjection Ġ-- ĠAlpha Ġmode Ġ: Ġ( Ġ-- ĠStill ĠH ilt Ġro cks ĊĠĠĠĠĠĠĠ Ġval Ġinjector Ġ= ĠBroadcast Receiver Component Manager . generated Component ( context ) Ġas ĠApp Updates Receiver _ Generated Injector ĊĠĠĠĠĠĠĠ Ġinjector . inject App Updates Receiver ( Unsafe Cast s . unsafe Cast ( this )) ĊĊĠĠĠĠĠĠĠ Ġintent ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( it . action Ġ== ĠIntent . ACTION _ MY _ PACKAGE _ REPL AC ED ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġanalytics Service . log ( App Events . App Updated ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }