mirror of https://github.com/x13a/Wasted.git
ref
This commit is contained in:
parent
8691aa4d13
commit
8b76258cf7
|
@ -7,8 +7,6 @@ import androidx.appcompat.app.AlertDialog
|
||||||
import info.guardianproject.panic.PanicResponder
|
import info.guardianproject.panic.PanicResponder
|
||||||
|
|
||||||
class PanicConnectionActivity : MainActivity() {
|
class PanicConnectionActivity : MainActivity() {
|
||||||
private val pm by lazy { packageManager }
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
if (PanicResponder.checkForDisconnectIntent(this)) {
|
if (PanicResponder.checkForDisconnectIntent(this)) {
|
||||||
|
@ -27,7 +25,8 @@ class PanicConnectionActivity : MainActivity() {
|
||||||
val packageName = callingActivity?.packageName
|
val packageName = callingActivity?.packageName
|
||||||
if (packageName != null) {
|
if (packageName != null) {
|
||||||
try {
|
try {
|
||||||
app = pm.getApplicationLabel(pm.getApplicationInfo(packageName, 0))
|
app = packageManager
|
||||||
|
.getApplicationLabel(packageManager.getApplicationInfo(packageName, 0))
|
||||||
} catch (exc: PackageManager.NameNotFoundException) {}
|
} catch (exc: PackageManager.NameNotFoundException) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue