@@ -8,6 +8,7 @@ import android.os.Bundle
8
8
import android.os.Environment
9
9
import android.provider.Settings
10
10
import android.util.Log
11
+ import android.view.View
11
12
import androidx.appcompat.app.AppCompatActivity
12
13
import androidx.preference.PreferenceFragmentCompat
13
14
import java.io.File
@@ -29,9 +30,9 @@ class SettingsActivity : AppCompatActivity() {
29
30
supportActionBar?.setDisplayHomeAsUpEnabled(true )
30
31
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .R ) {
31
32
if (! Environment .isExternalStorageManager()) {
32
- AlertDialog .Builder (this )
33
+ val alert = AlertDialog .Builder (this )
33
34
.setTitle(" Grant external storage management permission" )
34
- .setMessage(" Customfetch needs permissions to manage external storage for writing config files.\n " +
35
+ .setMessage(" Customfetch needs permissions to manage external storage to able to access config files.\n " +
35
36
" By default we going to read/write the following directories:\n " +
36
37
" /storage/emulated/0/.config/\n " +
37
38
" /storage/emulated/0/.config/customfetch/" )
@@ -41,7 +42,10 @@ class SettingsActivity : AppCompatActivity() {
41
42
startActivity(intent)
42
43
}
43
44
.setIcon(android.R .drawable.ic_dialog_alert)
44
- .show()
45
+
46
+ val view: View = layoutInflater.inflate(R .layout.grant_perm, null , false );
47
+ alert.setView(view)
48
+ alert.show()
45
49
}
46
50
}
47
51
}
0 commit comments