package Ġio . re bble . co bble . util Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . os . Build Ċ import Ġandroid . os . Power Manager Ċ import Ġandroidx . core . app . Notification Manager Compat Ċ import Ġandroidx . core . content . getSystem Service Ċ Ċ fun ĠContext . has Notification Access Permission (): ĠBoolean Ġ{ ĊĠĠĠ Ġreturn ĠNotification Manager Compat . get Enabled Listener Packages ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. contains ( this . packageName ) Ċ } Ċ Ċ fun ĠContext . has Battery Ex clusion Permission (): ĠBoolean Ġ{ ĊĠĠĠ Ġif Ġ( Build . VERSION . SDK _ INT Ġ< ĠBuild . VERSION _ CODES . M ) Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġpower Manager : ĠPower Manager Ġ= Ġget System Service () !! ĊĠĠĠ Ġreturn Ġpower Manager . is Ign oring Battery Optim izations ( packageName ) Ċ }