Skip to content

Commit 252b8d2

Browse files
Merge pull request #1 from session-foundation/release/1.20.3
Release/1.20.3
2 parents d5e3836 + be16d3b commit 252b8d2

File tree

180 files changed

+2000
-999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+2000
-999
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ body:
66
- type: checkboxes
77
attributes:
88
label: Code of conduct
9-
description: I have read and agree to adhere to the [Code of Conduct](https://github.com/oxen-io/session-android/blob/master/CODE_OF_CONDUCT.md).
9+
description: I have read and agree to adhere to the [Code of Conduct](https://github.com/session-foundation/session-android/blob/master/CODE_OF_CONDUCT.md).
1010
options:
11-
- label: I have read and agree to adhere to the [Code of Conduct](https://github.com/oxen-io/session-android/blob/master/CODE_OF_CONDUCT.md)
11+
- label: I have read and agree to adhere to the [Code of Conduct](https://github.com/session-foundation/session-android/blob/master/CODE_OF_CONDUCT.md)
1212
required: true
1313

1414
- type: checkboxes

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "libsession-util/libsession-util"]
22
path = libsession-util/libsession-util
3-
url = https://github.com/oxen-io/libsession-util.git
3+
url = https://github.com/session-foundation/libsession-util.git

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Setting up a development environment and building from Android Studio
2828

2929
1. Open Android Studio. On a new installation, the Quickstart panel will appear. If you have open projects, close them using "File > Close Project" to see the Quickstart panel.
3030
2. From the Quickstart panel, choose "Checkout from Version Control" then "git".
31-
3. Paste the URL for the session-android project when prompted (https://github.com/oxen-io/session-android.git).
31+
3. Paste the URL for the session-android project when prompted (https://github.com/session-foundation/session-android.git).
3232
4. Android Studio should detect the presence of a project file and ask you whether to open it. Click "yes".
3333
5. Default config options should be good enough.
3434
6. Project initialization and building should proceed.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Add the [F-Droid repo](https://fdroid.getsession.org/)
66

7-
[Download the APK from here](https://github.com/oxen-io/session-android/releases/latest)
7+
[Download the APK from here](https://github.com/session-foundation/session-android/releases/latest)
88

99
## Summary
1010

@@ -14,7 +14,7 @@ Session integrates directly with [Oxen Service Nodes](https://docs.oxen.io/about
1414

1515
## Want to contribute? Found a bug or have a feature request?
1616

17-
Please search for any [existing issues](https://github.com/oxen-io/session-android/issues) that describe your bugs in order to avoid duplicate submissions. Submissions can be made by making a pull request to our `dev` branch. If you don't know where to start contributing, try reading the Github issues page for ideas.
17+
Please search for any [existing issues](https://github.com/session-foundation/session-android/issues) that describe your bugs in order to avoid duplicate submissions. Submissions can be made by making a pull request to our `dev` branch. If you don't know where to start contributing, try reading the Github issues page for ideas.
1818

1919
## Build instructions
2020

@@ -29,8 +29,8 @@ Want to help us translate Session into your language? You can do so at https://c
2929
**Step 1:**
3030

3131
```
32-
wget https://raw.githubusercontent.com/oxen-io/oxen-core/master/utils/gpg_keys/KeeJef.asc
33-
gpg --import KeeJef.asc
32+
wget https://github.com/jagerman.gpg
33+
gpg --import jagerman.gpg
3434
```
3535

3636
**Step 2:**
@@ -39,7 +39,7 @@ Get the signed hash for this release. `SESSION_VERSION` needs to be updated for
3939

4040
```
4141
export SESSION_VERSION=1.10.4
42-
wget https://github.com/oxen-io/session-android/releases/download/$SESSION_VERSION/signatures.asc
42+
wget https://github.com/session-foundation/session-android/releases/download/$SESSION_VERSION/signatures.asc
4343
```
4444

4545
**Step 3:**

app/build.gradle

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ configurations.forEach {
1313
it.exclude module: "commons-logging"
1414
}
1515

16-
def canonicalVersionCode = 384
17-
def canonicalVersionName = "1.20.2"
16+
def canonicalVersionCode = 385
17+
def canonicalVersionName = "1.20.3"
1818

1919
def postFixSize = 10
2020
def abiPostFix = ['armeabi-v7a' : 1,
@@ -105,6 +105,13 @@ android {
105105
String sharedTestDir = 'src/sharedTest/java'
106106
test.java.srcDirs += sharedTestDir
107107
androidTest.java.srcDirs += sharedTestDir
108+
main {
109+
assets.srcDirs += "$buildDir/generated/binary"
110+
}
111+
test {
112+
resources.srcDirs += "$buildDir/generated/binary"
113+
resources.srcDirs += "$projectDir/src/main/assets"
114+
}
108115
}
109116

110117
buildTypes {
@@ -163,7 +170,7 @@ android {
163170

164171
website {
165172
dimension "distribution"
166-
ext.websiteUpdateUrl = "https://github.com/oxen-io/session-android/releases"
173+
ext.websiteUpdateUrl = "https://github.com/session-foundation/session-android/releases"
167174
buildConfigField "boolean", "PLAY_STORE_DISABLED", "true"
168175
buildConfigField "org.session.libsession.utilities.Device", "DEVICE", "org.session.libsession.utilities.Device.ANDROID"
169176
buildConfigField "String", "NOPLAY_UPDATE_URL", "\"$ext.websiteUpdateUrl\""
@@ -242,6 +249,12 @@ android {
242249
}
243250
}
244251

252+
apply {
253+
from("ipToCode.gradle.kts")
254+
}
255+
256+
preBuild.dependsOn ipToCode
257+
245258
dependencies {
246259
implementation project(':content-descriptions')
247260

@@ -268,9 +281,9 @@ dependencies {
268281
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion"
269282
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
270283
implementation "androidx.paging:paging-runtime-ktx:$pagingVersion"
271-
implementation 'androidx.activity:activity-ktx:1.5.1'
272-
implementation 'androidx.activity:activity-compose:1.5.1'
273-
implementation 'androidx.fragment:fragment-ktx:1.5.3'
284+
implementation 'androidx.activity:activity-ktx:1.9.2'
285+
implementation 'androidx.activity:activity-compose:1.9.2'
286+
implementation 'androidx.fragment:fragment-ktx:1.8.4'
274287
implementation "androidx.core:core-ktx:$coreVersion"
275288
implementation "androidx.work:work-runtime-ktx:2.7.1"
276289

@@ -319,7 +332,7 @@ dependencies {
319332
implementation project(":libsession")
320333
implementation project(":libsession-util")
321334
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxJsonVersion"
322-
implementation "com.github.oxen-io.session-android-curve-25519:curve25519-java:$curve25519Version"
335+
implementation "com.github.session-foundation.session-android-curve-25519:curve25519-java:$curve25519Version"
323336
implementation project(":liblazysodium")
324337
implementation "net.java.dev.jna:jna:5.12.1@aar"
325338
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
File renamed without changes.

app/ipToCode.gradle.kts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import java.io.File
2+
import java.io.DataOutputStream
3+
import java.io.FileOutputStream
4+
5+
task("ipToCode") {
6+
val inputFile = File("${projectDir}/geolite2_country_blocks_ipv4.csv")
7+
8+
val outputDir = "${buildDir}/generated/binary"
9+
val outputFile = File(outputDir, "geolite2_country_blocks_ipv4.bin").apply { parentFile.mkdirs() }
10+
11+
outputs.file(outputFile)
12+
13+
doLast {
14+
15+
// Ensure the input file exists
16+
if (!inputFile.exists()) {
17+
throw IllegalArgumentException("Input file does not exist: ${inputFile.absolutePath}")
18+
}
19+
20+
// Create a DataOutputStream to write binary data
21+
DataOutputStream(FileOutputStream(outputFile)).use { out ->
22+
inputFile.useLines { lines ->
23+
var prevCode = -1
24+
lines.drop(1).forEach { line ->
25+
runCatching {
26+
val ints = line.split(".", "/", ",")
27+
val code = ints[5].toInt().also { if (it == prevCode) return@forEach }
28+
val ip = ints.take(4).fold(0) { acc, s -> acc shl 8 or s.toInt() }
29+
30+
out.writeInt(ip)
31+
out.writeInt(code)
32+
33+
prevCode = code
34+
}
35+
}
36+
}
37+
}
38+
39+
println("Processed data written to: ${outputFile.absolutePath}")
40+
}
41+
}

app/src/huawei/agconnect-services.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"channel_id":""
5555
},
5656
"edukit":{
57-
"edu_url":"edukit.edu.cloud.huawei.com.cn",
58-
"dh_url":"edukit.edu.cloud.huawei.com.cn"
57+
"edu_url":"edukit.cloud.huawei.com.cn",
58+
"dh_url":"edukit.cloud.huawei.com.cn"
5959
},
6060
"search":{
6161
"url":"https://search-dre.cloud.huawei.com"

app/src/huawei/kotlin/org/thoughtcrime/securesms/notifications/HuaweiPushService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class HuaweiPushService: HmsMessageService() {
2020

2121
override fun onMessageReceived(message: RemoteMessage?) {
2222
Log.d(TAG, "onMessageReceived")
23-
message?.dataOfMap?.takeIf { it.isNotEmpty() }?.let(pushReceiver::onPush) ?:
24-
pushReceiver.onPush(message?.data?.let(Base64::decode))
23+
message?.dataOfMap?.takeIf { it.isNotEmpty() }?.let(pushReceiver::onPushDataReceived) ?:
24+
pushReceiver.onPushDataReceived(message?.data?.let(Base64::decode))
2525
}
2626

2727
override fun onNewToken(token: String?) {

app/src/huawei/kotlin/org/thoughtcrime/securesms/notifications/HuaweiTokenFetcher.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class HuaweiTokenFetcher @Inject constructor(
2424
override suspend fun fetch(): String? = HmsInstanceId.getInstance(context).run {
2525
// https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/push-basic-capability#h2-1576218800370
2626
// getToken may return an empty string, if so HuaweiPushService#onNewToken will be called.
27-
withContext(Dispatchers.IO) { getToken(APP_ID, TOKEN_SCOPE) }
27+
withContext(Dispatchers.IO) {
28+
getToken(APP_ID, TOKEN_SCOPE)
29+
}
2830
}
2931
}

0 commit comments

Comments
 (0)