Add OSS licenses

This commit is contained in:
Mygod
2020-01-26 12:09:12 +08:00
parent 3cee5a4782
commit 3372d8bcbd
5 changed files with 23 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import be.mygod.vpnhotspot.util.RootSession
import be.mygod.vpnhotspot.util.launchUrl
import be.mygod.vpnhotspot.util.showAllowingStateLoss
import be.mygod.vpnhotspot.widget.SmartSnackbar
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.google.android.material.snackbar.Snackbar
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
@@ -171,6 +172,10 @@ class SettingsPreferenceFragment : PreferenceFragmentCompat() {
EBegFragment().showAllowingStateLoss(parentFragmentManager, "EBegFragment")
true
}
findPreference<Preference>("misc.licenses")!!.setOnPreferenceClickListener {
startActivity(Intent(context, OssLicensesMenuActivity::class.java))
true
}
}
override fun onDisplayPreferenceDialog(preference: Preference) {