package Ġpermissions . dispatcher . test Ċ Ċ import Ġandroid . Manifest Ċ import Ġandroid . content . Intent Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġpermissions . dispatcher .* Ċ Ċ @ Runtime Permissions Ċ open Ġclass ĠActivity With Write Setting Kt All Annotations Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġ@ Needs Permission ( Manifest . permission . WRITE _ SETTINGS ) ĊĠĠĠ Ġinternal Ġfun Ġwrite Setting () Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Show R ationale ( Manifest . permission . WRITE _ SETTINGS ) ĊĠĠĠ Ġinternal Ġfun Ġshow R ationale For Write Settings ( request : ĠPermission Request ?) Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Permission Denied ( Manifest . permission . WRITE _ SETTINGS ) ĊĠĠĠ Ġinternal Ġfun Ġshow Denied For Write Settings () Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Activity Result ( request Code : ĠInt , ĠresultCode : ĠInt , Ġdata : ĠIntent ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Activity Result ( request Code , ĠresultCode , Ġdata ) ĊĠĠĠĠĠĠĠ Ġon Activity Result ( request Code ) ĊĠĠĠ Ġ} Ċ }