package Ġeu . kan ade . t ach iy omi . util . system Ċ Ċ import Ġandroid . os . Build Ċ import Ġandroid . view . View Ċ import Ġandroid . view . Window Insets Ċ import Ġandroidx . annotation . Requires Api Ċ import Ġandroidx . core . view . Window Insets Compat Ċ import Ġandroidx . core . view . Window Insets Compat . Type . mandatory System Gest ures Ċ import Ġandroidx . core . view . Window Insets Compat . Type . system Bars Ċ Ċ fun ĠWindow Insets Compat . get Bottom Gesture Insets (): ĠInt Ġ{ ĊĠĠĠ Ġreturn Ġget Insets Ign oring Visibility ( mandatory System Gest ures () Ġor Ġsystem Bars ()). bottom Ċ } Ċ Ċ /** Ġreturns Ġif Ġdevice Ġusing Ġgesture Ġnav Ġand Ġsupports Ġtrue Ġedge Ġto Ġedge Ġ*/ Ċ fun ĠWindow Insets Compat . is Bottom T appable () Ġ= ĊĠĠĠ ĠBuild . VERSION . SDK _ INT Ġ>= ĠBuild . VERSION _ CODES . Q Ġ&& ĊĠĠĠĠĠĠĠ Ġget Insets ( system Bars ()). bottom Ġ!= Ġget Insets ( mandatory System Gest ures ()). bottom Ċ Ċ val ĠView . root Window Insets Compat ĊĠĠĠ Ġget () Ġ= Ġroot Window Insets ?. let Ġ{ ĠWindow Insets Compat . to Window Insets Compat ( it ) Ġ} Ċ Ċ fun ĠWindow Insets Compat . has Side NavBar () Ġ= ĊĠĠĠ Ġ( get Insets ( system Bars ()). left Ġ> Ġ 0 Ġ|| Ġget Insets ( system Bars ()). right Ġ> Ġ 0 ) Ġ&& Ġ! is Bottom T appable () Ġ&& ĊĠĠĠĠĠĠĠ Ġget Insets ( system Bars ()). bottom Ġ== Ġ 0 Ċ Ċ @ Requires Api ( Build . VERSION _ CODES . R ) Ċ fun ĠWindow Insets Compat . is I me Visible () Ġ= Ġis Visible ( Window Insets Compat . Type . ime ()) Ċ Ċ fun ĠWindow Insets . top Cut out Inset () Ġ= Ġif Ġ( Build . VERSION . SDK _ INT Ġ>= ĠBuild . VERSION _ CODES . P ) Ġ{ ĊĠĠĠ Ġdisplay Cut out ?. safe Inset Top Ġ?: Ġ 0 Ċ } Ġelse Ġ 0 Ċ Ċ fun ĠWindow Insets . bottom Cut out Inset () Ġ= Ġif Ġ( Build . VERSION . SDK _ INT Ġ>= ĠBuild . VERSION _ CODES . P ) Ġ{ ĊĠĠĠ Ġdisplay Cut out ?. safe Inset Bottom Ġ?: Ġ 0 Ċ } Ġelse Ġ 0 Ċ