Spelling fixed
This commit is contained in:
Josh Soref 2023-04-11 09:50:44 -04:00 committed by GitHub
parent a5e5c3d941
commit 7351fe9633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 141 additions and 141 deletions

View file

@ -27,7 +27,7 @@ object NotificationUtil {
* Parcel - Gets called from AndroidController.cpp
*/
fun update(data: Parcel) {
// [data] is here a json containing the noification content
// [data] is here a json containing the notification content
val buffer = data.createByteArray()
val json = buffer?.let { String(it) }
val content = JSONObject(json)

View file

@ -35,10 +35,10 @@ class OpenVPNThreadv3(var service: VPNService): ClientAPI_OpenVPNClient(), Runna
private var bytesOutIndex = -1
init {
findConfigIndicies()
findConfigIndices()
}
private fun findConfigIndicies() {
private fun findConfigIndices() {
val n: Int = stats_n()
for (i in 0 until n) {

View file

@ -29,7 +29,7 @@ object Prefs {
return sharedPreferences
} catch (e: Exception) {
Log.e("Android-Prefs", "Getting Encryption Storage failed, plaintext fallback")
return context.getSharedPreferences("com.amnezia.vpn.prefrences", Context.MODE_PRIVATE)
return context.getSharedPreferences("com.amnezia.vpn.preferences", Context.MODE_PRIVATE)
}
}
}

View file

@ -11,14 +11,14 @@ import android.util.Log as nativeLog
/*
* Drop in replacement for android.util.Log
* Also stores a copy of all logs in tmp/mozilla_deamon_logs.txt
* Also stores a copy of all logs in tmp/mozilla_daemon_logs.txt
*/
class Log {
val LOG_MAX_FILE_SIZE = 204800
private var file: File
private constructor(context: Context) {
val tempDIR = context.cacheDir
file = File(tempDIR, "mozilla_deamon_logs.txt")
file = File(tempDIR, "mozilla_daemon_logs.txt")
if (file.length() > LOG_MAX_FILE_SIZE) {
file.writeText("")
}
@ -46,7 +46,7 @@ class Log {
if (!BuildConfig.DEBUG) { return; }
nativeLog.e(tag, message)
}
// Only Prints && Loggs when in debug, noop in release.
// Only Prints && Logs when in debug, noop in release.
fun sensitive(tag: String, message: String?) {
if (!BuildConfig.DEBUG) { return; }
if (message == null) { return; }

View file

@ -548,7 +548,7 @@ class VPNService : BaseVpnService(), LocalDnsService.Interface {
* Create a Wireguard [Config] from a [json] string -
* The [json] will be created in AndroidVpnProtocol.cpp
*/
private fun buildWireugardConfig(obj: JSONObject): Config {
private fun buildWireguardConfig(obj: JSONObject): Config {
val confBuilder = Config.Builder()
val wireguardConfigData = obj.getJSONObject("wireguard_config_data")
val config = parseConfigData(wireguardConfigData.getString("config"))
@ -697,7 +697,7 @@ class VPNService : BaseVpnService(), LocalDnsService.Interface {
}
private fun startWireGuard() {
val wireguard_conf = buildWireugardConfig(mConfig!!)
val wireguard_conf = buildWireguardConfig(mConfig!!)
Log.i(tag, "startWireGuard: wireguard_conf : $wireguard_conf")
if (currentTunnelHandle != -1) {
Log.e(tag, "Tunnel already up")

View file

@ -50,7 +50,7 @@ class VPNServiceBinder(service: VPNService) : Binder() {
when (code) {
ACTIONS.activate -> {
try {
Log.i(tag, "Activiation Requested, parsing Config")
Log.i(tag, "Activation Requested, parsing Config")
// [data] is here a json containing the wireguard/openvpn conf
val buffer = data.createByteArray()
val json = buffer?.let { String(it) }

View file

@ -114,7 +114,7 @@ class VPNActivity : org.qtproject.qt.android.bindings.QtActivity() {
// QT will always attempt to read the clipboard if content is there.
// since we have no use of the clipboard in android 10+
// we _can_ return null
// And we defnitly should since android 12 displays clipboard access.
// And we definitely should since android 12 displays clipboard access.
null
} else {
super.getSystemService(name)
@ -259,13 +259,13 @@ class VPNActivity : org.qtproject.qt.android.bindings.QtActivity() {
private val ACTION_REGISTER_LISTENER = 3
private val ACTION_RESUME_ACTIVATE = 7
private val ACTION_IMPORT_CONFIG = 11
private val EVENT_PERMISSION_REQURED = 6
private val EVENT_PERMISSION_REQUIRED = 6
private val EVENT_DISCONNECTED = 2
private val UI_EVENT_QR_CODE_RECEIVED = 0
fun onPermissionRequest(code: Int, data: Parcel?) {
if (code != EVENT_PERMISSION_REQURED) {
if (code != EVENT_PERMISSION_REQUIRED) {
return
}