Init commit
This commit is contained in:
6
app/src/main/java/io/nekohasekai/sfa/constant/Action.kt
Normal file
6
app/src/main/java/io/nekohasekai/sfa/constant/Action.kt
Normal file
@@ -0,0 +1,6 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
object Action {
|
||||
const val SERVICE = "io.nekohasekai.sfa.SERVICE"
|
||||
const val SERVICE_CLOSE = "io.nekohasekai.sfa.SERVICE_CLOSE"
|
||||
}
|
||||
10
app/src/main/java/io/nekohasekai/sfa/constant/Alert.kt
Normal file
10
app/src/main/java/io/nekohasekai/sfa/constant/Alert.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
enum class Alert {
|
||||
RequestVPNPermission,
|
||||
RequestNotificationPermission,
|
||||
EmptyConfiguration,
|
||||
StartCommandServer,
|
||||
CreateService,
|
||||
StartService
|
||||
}
|
||||
11
app/src/main/java/io/nekohasekai/sfa/constant/EnabledType.kt
Normal file
11
app/src/main/java/io/nekohasekai/sfa/constant/EnabledType.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
enum class EnabledType(val boolValue: Boolean) {
|
||||
Enabled(true), Disabled(false);
|
||||
|
||||
companion object {
|
||||
fun from(value: Boolean): EnabledType {
|
||||
return if (value) Enabled else Disabled
|
||||
}
|
||||
}
|
||||
}
|
||||
6
app/src/main/java/io/nekohasekai/sfa/constant/Path.kt
Normal file
6
app/src/main/java/io/nekohasekai/sfa/constant/Path.kt
Normal file
@@ -0,0 +1,6 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
object Path {
|
||||
const val SETTINGS_DATABASE_PATH = "settings.db"
|
||||
const val PROFILES_DATABASE_PATH = "profiles.db"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
object ServiceMode {
|
||||
const val NORMAL = "normal"
|
||||
const val VPN = "vpn"
|
||||
}
|
||||
14
app/src/main/java/io/nekohasekai/sfa/constant/SettingsKey.kt
Normal file
14
app/src/main/java/io/nekohasekai/sfa/constant/SettingsKey.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
object SettingsKey {
|
||||
|
||||
const val SELECTED_PROFILE = "selected_profile"
|
||||
const val SERVICE_MODE = "service_mode"
|
||||
const val ANALYTICS_ALLOWED = "analytics_allowed"
|
||||
const val CHECK_UPDATE_ENABLED = "check_update_enabled"
|
||||
|
||||
// cache
|
||||
|
||||
const val STARTED_BY_USER = "started_by_user"
|
||||
|
||||
}
|
||||
8
app/src/main/java/io/nekohasekai/sfa/constant/Status.kt
Normal file
8
app/src/main/java/io/nekohasekai/sfa/constant/Status.kt
Normal file
@@ -0,0 +1,8 @@
|
||||
package io.nekohasekai.sfa.constant
|
||||
|
||||
enum class Status {
|
||||
Stopped,
|
||||
Starting,
|
||||
Started,
|
||||
Stopping,
|
||||
}
|
||||
Reference in New Issue
Block a user