Ask to disable tethering hardware acceleration on Android 8.1+

This commit is contained in:
Mygod
2018-08-26 15:22:27 +08:00
parent a76fcf8cf7
commit 1c5d7c1109
7 changed files with 79 additions and 28 deletions

View File

@@ -104,6 +104,11 @@ class TetheringFragment : Fragment(), ServiceConnection {
return binding.root
}
override fun onResume() {
super.onResume()
if (Build.VERSION.SDK_INT >= 27) ManageBar.Data.notifyChange()
}
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
if (requestCode == START_LOCAL_ONLY_HOTSPOT) @TargetApi(26) {
if (grantResults.firstOrNull() == PackageManager.PERMISSION_GRANTED) {