Add file editor Fix android service issues Optimize desktop background performance Optimize android main process performance Optimize delay test Optimize vpn protect
25 lines
619 B
Kotlin
25 lines
619 B
Kotlin
package com.follow.clash
|
|
|
|
import android.app.Activity
|
|
import android.os.Bundle
|
|
import com.follow.clash.extensions.wrapAction
|
|
|
|
class TempActivity : Activity() {
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
when (intent.action) {
|
|
wrapAction("START") -> {
|
|
GlobalState.handleStart()
|
|
}
|
|
|
|
wrapAction("STOP") -> {
|
|
GlobalState.handleStop()
|
|
}
|
|
|
|
wrapAction("CHANGE") -> {
|
|
GlobalState.handleToggle()
|
|
}
|
|
}
|
|
finishAndRemoveTask()
|
|
}
|
|
} |