package Ġcom . blank j . util code . constant Ċ Ċ import Ġandroid . Manifest Ċ import Ġandroid . Manifest . permission Ċ import Ġandroid . annotation . Suppress Lint Ċ import Ġandroid . support . annotation . String Def ĊĊ Ċ /** Ċ Ġ* Ġ< pre > Ċ Ġ* Ġauthor : ĠBl ank j Ċ Ġ* Ġblog Ġ Ġ: Ġhttp :// blank j . com Ċ Ġ* Ġtime Ġ Ġ: Ġ 2 0 1 7 / 1 2 / 2 9 Ċ Ġ* Ġdesc Ġ Ġ: ĠThe Ġconstants Ġof Ġpermission Ċ </ pre > Ġ* Ċ Ġ*/ Ċ @ Suppress Lint (" In lined Api ") Ċ object ĠPermission Constants Ġ{ ĊĊĠĠĠ Ġconst Ġval ĠCAL END AR Ġ= ĠManifest . permission _ group . CAL END AR ĊĠĠĠ Ġconst Ġval ĠCAM ERA Ġ= ĠManifest . permission _ group . CAMERA ĊĠĠĠ Ġconst Ġval ĠCONT ACT S Ġ= ĠManifest . permission _ group . CONTACT S ĊĠĠĠ Ġconst Ġval ĠLOC ATION Ġ= ĠManifest . permission _ group . LOCATION ĊĠĠĠ Ġconst Ġval ĠMIC RO PHONE Ġ= ĠManifest . permission _ group . MICRO PHONE ĊĠĠĠ Ġconst Ġval ĠPH ONE Ġ= ĠManifest . permission _ group . PHONE ĊĠĠĠ Ġconst Ġval ĠS ENS ORS Ġ= ĠManifest . permission _ group . S ENS ORS ĊĠĠĠ Ġconst Ġval ĠSMS Ġ= ĠManifest . permission _ group . SMS ĊĠĠĠ Ġconst Ġval ĠSTORAGE Ġ= ĠManifest . permission _ group . STORAGE ĊĊĠĠĠ Ġprivate Ġval ĠGROUP _ CAL END AR Ġ= ĠarrayOf ( permission . READ _ CAL END AR , Ġpermission . WRITE _ CAL END AR ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ CAMERA Ġ= ĠarrayOf ( permission . CAMERA ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ CONTACT S Ġ= ĠarrayOf ( permission . READ _ CONTACT S , Ġpermission . WRITE _ CONTACT S , Ġpermission . GET _ ACCOUNT S ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ LOCATION Ġ= ĠarrayOf ( permission . ACCESS _ F INE _ LOCATION , Ġpermission . ACCESS _ CO AR SE _ LOCATION ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ MICRO PHONE Ġ= ĠarrayOf ( permission . RECORD _ AUDIO ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ PHONE Ġ= ĠarrayOf ( permission . READ _ PHONE _ STATE , Ġpermission . READ _ PHONE _ NUMBER S , Ġpermission . CALL _ PHONE , Ġpermission . AN SW ER _ PHONE _ CALL S , Ġpermission . READ _ CALL _ LOG , Ġpermission . WRITE _ CALL _ LOG , Ġpermission . ADD _ VOICE MAIL , Ġpermission . USE _ S IP , Ġpermission . PROCESS _ OUT GO ING _ CALL S ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ S ENS ORS Ġ= ĠarrayOf ( permission . BODY _ S ENS ORS ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ SMS Ġ= ĠarrayOf ( permission . SEND _ SMS , Ġpermission . RECEIVE _ SMS , Ġpermission . READ _ SMS , Ġpermission . RECEIVE _ W AP _ PUSH , Ġpermission . RECEIVE _ M MS ) ĊĠĠĠ Ġprivate Ġval ĠGROUP _ STORAGE Ġ= ĠarrayOf ( permission . READ _ EXTERNAL _ STORAGE , Ġpermission . WRITE _ EXTERNAL _ STORAGE ) ĊĊĠĠĠ Ġ@ String Def ( CAL END AR , ĠCAM ERA , ĠCONT ACT S , ĠLOC ATION , ĠMIC RO PHONE , ĠPH ONE , ĠS ENS ORS , ĠSMS , ĠSTORAGE ) ĊĠĠĠ Ġ@ kotlin . annotation . Retention ( Annotation Retention . SOURCE ) ĊĠĠĠ Ġannotation Ġclass ĠPermission ĊĊĠĠĠ Ġfun Ġget Permissions (@ Permission Ġpermission : ĠString ): ĠArray < String > Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( permission ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCAL END AR Ġ-> Ġreturn ĠGROUP _ CAL END AR ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCAM ERA Ġ-> Ġreturn ĠGROUP _ CAMERA ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCONT ACT S Ġ-> Ġreturn ĠGROUP _ CONTACT S ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLOC ATION Ġ-> Ġreturn ĠGROUP _ LOCATION ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMIC RO PHONE Ġ-> Ġreturn ĠGROUP _ MICRO PHONE ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPH ONE Ġ-> Ġreturn ĠGROUP _ PHONE ĊĠĠĠĠĠĠĠĠĠĠĠ ĠS ENS ORS Ġ-> Ġreturn ĠGROUP _ S ENS ORS ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSMS Ġ-> Ġreturn ĠGROUP _ SMS ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSTORAGE Ġ-> Ġreturn ĠGROUP _ STORAGE ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn ĠarrayOf ( permission ) ĊĠĠĠ Ġ} Ċ } Ċ