package Ġcom . arth ary o ung . permission Ċ Ċ import Ġandroid . Manifest Ċ Ċ @ Suppress (" unused ") Ċ enum Ġclass ĠPermission Enum ( val Ġpermission : ĠString , Ġval Ġicon : ĠInt , Ġval Ġtitle : ĠInt , Ġval Ġcontent : ĠInt , Ġval Ġtoast : ĠInt ) Ġ{ ĊĠĠĠ ĠCAM ERA ( Manifest . permission . CAMERA , ĠR . mip map . ic _ permission _ tip _ camera , ĠR . string . tip _ permission _ title _ camera , ĠR . string . tip _ permission _ content _ camera , ĠR . string . permission _ camera _ den ied _ tip ), ĊĊĠĠĠ ĠWRITE _ EXTERNAL _ STORAGE ( Manifest . permission . WRITE _ EXTERNAL _ STORAGE , ĠR . mip map . ic _ permission _ tip _ storage , ĠR . string . tip _ permission _ title _ storage , ĠR . string . tip _ permission _ content _ storage , ĠR . string . permission _ external _ sd card _ den ied _ tip ), ĊĊĠĠĠ ĠACCESS _ F INE _ LOCATION ( Manifest . permission . ACCESS _ F INE _ LOCATION , ĠR . mip map . ic _ permission _ tip _ location , ĠR . string . tip _ permission _ title _ location , ĠR . string . tip _ permission _ content _ location , ĠR . string . permission _ location _ ration ale _ den ied _ tip ), ĊĠĠĠ ĠACCESS _ CO AR SE _ LOCATION ( Manifest . permission . ACCESS _ CO AR SE _ LOCATION , ĠR . mip map . ic _ permission _ tip _ location , ĠR . string . tip _ permission _ title _ location , ĠR . string . tip _ permission _ content _ location , ĠR . string . permission _ location _ ration ale _ den ied _ tip ), ĊĊĠĠĠ ĠREC ORD _ AUDIO ( Manifest . permission . RECORD _ AUDIO , ĠR . mip map . ic _ permission _ tip _ micro phone , ĠR . string . tip _ permission _ title _ micro phone , ĠR . string . tip _ permission _ content _ micro phone , ĠR . string . permission _ record _ audio _ den ied _ tip ), ĊĊĠĠĠ ĠCALL _ PHONE ( Manifest . permission . CALL _ PHONE , ĠR . mip map . ic _ permission _ tip _ telephone , ĠR . string . tip _ permission _ title _ telephone , ĠR . string . tip _ permission _ content _ telephone , ĠR . string . permission _ call _ phone _ den ied _ tip ), ĊĠĠĠ ĠREAD _ PHONE _ STATE ( Manifest . permission . READ _ PHONE _ STATE , ĠR . mip map . ic _ permission _ tip _ telephone , ĠR . string . tip _ permission _ title _ telephone , ĠR . string . tip _ permission _ content _ telephone , ĠR . string . permission _ call _ phone _ den ied _ tip ), ĊĊĠĠĠ ĠS END _ SMS ( Manifest . permission . SEND _ SMS , ĠR . mip map . ic _ permission _ tip _ message , ĠR . string . tip _ permission _ title _ message , ĠR . string . tip _ permission _ content _ message , ĠR . string . permission _ sms _ den ied _ tip ) Ċ } Ċ Ċ fun Ġget Permission Tips ( permission : ĠString ): ĠPermission Enum Ġ{ ĊĠĠĠ Ġfor Ġ( entry Ġin ĠPermission Enum . values ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( permission Ġ== Ġentry . permission ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġentry ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġthrow ĠException (" add Ġpermission Ġtips Ġin ĠPermission Enum Ġclass ") Ċ } Ċ Ċ fun Ġget Permission Toast ( permission : ĠString ): ĠInt Ġ{ ĊĠĠĠ Ġfor Ġ( entry Ġin ĠPermission Enum . values ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( permission Ġ== Ġentry . permission ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġentry . toast ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġthrow ĠException (" add Ġpermission Ġtips Ġin ĠPermission Enum Ġclass ") Ċ } Ċ