Fixed Modify System settings button not working
This commit is contained in:
parent
3219ba0a5d
commit
1cfa5aaac5
2 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ class PermissionActivity : AbsMusicServiceActivity() {
|
|||
if (VersionUtils.hasMarshmallow()) {
|
||||
binding.audioPermission.show()
|
||||
binding.audioPermission.setButtonClick {
|
||||
if (hasAudioPermission()) {
|
||||
if (!hasAudioPermission()) {
|
||||
val intent = Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS)
|
||||
intent.data = ("package:" + applicationContext.packageName).toUri()
|
||||
startActivity(intent)
|
||||
|
|
|
@ -46,7 +46,7 @@ class AudioSettings : AbsSettingsFragment() {
|
|||
}
|
||||
val bluetoothPreference: Preference? = findPreference(BLUETOOTH_PLAYBACK)
|
||||
if (VersionUtils.hasS()) {
|
||||
bluetoothPreference?.setOnPreferenceChangeListener { preference, newValue ->
|
||||
bluetoothPreference?.setOnPreferenceChangeListener { _, newValue ->
|
||||
if (newValue as Boolean) {
|
||||
if (ActivityCompat.checkSelfPermission(requireContext(),
|
||||
BLUETOOTH_CONNECT) != PERMISSION_GRANTED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue