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

@ -261,7 +261,7 @@ object BaseService {
fun stopRunner(restart: Boolean = false, msg: String? = null) {
if (data.state == State.Stopping) return
// channge the state
// change the state
data.changeState(State.Stopping)
GlobalScope.launch(Dispatchers.Main.immediate) {
data.connectingJob?.cancelAndJoin() // ensure stop connecting first

View file

@ -30,7 +30,7 @@ object Key {
const val id = "profileId"
const val name = "profileName"
const val individual = "Proxyed"
const val individual = "Proxied"
const val serviceMode = "serviceMode"
const val modeProxy = "proxy"

View file

@ -835,7 +835,7 @@ public final class Ed25519 {
}
/**
* Decodes {@code s} into an extented projective point.
* Decodes {@code s} into an extended projective point.
* See Section 5.1.3 Decoding in https://tools.ietf.org/html/rfc8032#section-5.1.3
*/
private static XYZT fromBytesNegateVarTime(byte[] s) throws GeneralSecurityException {
@ -973,7 +973,7 @@ public final class Ed25519 {
*
* <p>NOTE that this function requires that {@code icopy} be 1 or 0; other values give wrong
* results. Also, the two limb arrays must be in reduced-coefficient, reduced-degree form: the
* values in a[10..19] or b[10..19] aren't swapped, and all all values in a[0..9],b[0..9] must
* values in a[10..19] or b[10..19] aren't swapped, and all values in a[0..9],b[0..9] must
* have magnitude less than Integer.MAX_VALUE.
*/
static void copyConditional(long[] a, long[] b, int icopy) {

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
}