@ -92,6 +92,8 @@ class App : UninitializedApp(), libtailscale.AppContext, ViewModelStoreOwner {
override fun onCreate ( ) {
override fun onCreate ( ) {
super . onCreate ( )
super . onCreate ( )
appInstance = this
setUnprotectedInstance ( this )
createNotificationChannel (
createNotificationChannel (
STATUS _CHANNEL _ID ,
STATUS _CHANNEL _ID ,
getString ( R . string . vpn _status ) ,
getString ( R . string . vpn _status ) ,
@ -107,8 +109,6 @@ class App : UninitializedApp(), libtailscale.AppContext, ViewModelStoreOwner {
getString ( R . string . health _channel _name ) ,
getString ( R . string . health _channel _name ) ,
getString ( R . string . health _channel _description ) ,
getString ( R . string . health _channel _description ) ,
NotificationManagerCompat . IMPORTANCE _HIGH )
NotificationManagerCompat . IMPORTANCE _HIGH )
appInstance = this
setUnprotectedInstance ( this )
}
}
override fun onTerminate ( ) {
override fun onTerminate ( ) {
@ -427,7 +427,6 @@ open class UninitializedApp : Application() {
fun restartVPN ( ) {
fun restartVPN ( ) {
// Register a receiver to listen for the completion of stopVPN
// Register a receiver to listen for the completion of stopVPN
TSLog . d ( " KARI " , " hi " )
val stopReceiver =
val stopReceiver =
object : BroadcastReceiver ( ) {
object : BroadcastReceiver ( ) {
override fun onReceive ( context : Context ? , intent : Intent ? ) {
override fun onReceive ( context : Context ? , intent : Intent ? ) {