Commit 5a49aecc authored by Mygod's avatar Mygod

Give up on broken systems

parent 373222d3
......@@ -21,6 +21,7 @@
package com.github.shadowsocks
import android.app.Activity
import android.content.ActivityNotFoundException
import android.content.Intent
import android.content.pm.ShortcutManager
import android.hardware.camera2.CameraAccessException
......@@ -61,7 +62,9 @@ class ScannerActivity : AppCompatActivity(), BarcodeRetriever {
private lateinit var detector: BarcodeDetector
private fun fallback() {
try {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=tw.com.quickmark")))
} catch (_: ActivityNotFoundException) { }
finish()
}
......
......@@ -60,7 +60,7 @@ class ProfilesDialogFragment : LeanbackListPreferenceDialogFragment() {
if (index == RecyclerView.NO_POSITION) return
Core.switchProfile(profiles[index].id)
(targetFragment as MainPreferenceFragment).startService()
fragmentManager.popBackStack()
fragmentManager?.popBackStack()
notifyDataSetChanged()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment