Compare commits

...

12 Commits

Author SHA1 Message Date
Andrew bdb6e7d12b
Merge dev into master for 1.17.5 2023-12-11 17:22:31 +10:30
Andrew 377460a60f
build: update version code 2023-12-11 16:57:13 +10:30
andrew a57b7ef121 build: update version code 2023-12-11 15:22:13 +10:30
Andrew b96a5c561e
Merge pull request #1371 from 0x330a/remove-call-server
Remove unsupported call servers
2023-12-11 15:16:22 +10:30
0x330a 9a83daa53f fix: remove the two unsupported servers 2023-12-08 11:44:28 +11:00
wafflesvsfrankie 7fe40ea9f1
Content descriptions (#1358)
* Adding in Content Description for automated testing including: Community input (URL) box, changes `Configuration message` to `Control message` and also `Message Body` to `Message body`Created checkout page along with checkoutItems and checkout cart functionality

* Forgot the button at the end
2023-11-20 15:32:57 +11:00
0x330a 9d02eb33c7 build: update version code 2023-10-13 16:48:47 +11:00
0x330a b6bb586509 feat: add foreground types to key caching service and call service 2023-10-13 14:32:04 +11:00
0x330a 82cbf830ae
fix: need quotes on job type key 2023-10-11 17:52:04 +11:00
0x330a c1102a2a50
build: update build number 2023-10-11 17:37:55 +11:00
0x330a 862a47e7e3
feat: add drop attachment download migration in case there are a lot of pending failed attachment downloads 2023-10-11 17:37:39 +11:00
0x330a 6f22eb659b
fix: use the context compat register receiver to fix Android 14 crash (#1338) 2023-10-11 17:12:28 +11:00
10 changed files with 45 additions and 11 deletions

View File

@ -31,8 +31,8 @@ configurations.all {
exclude module: "commons-logging"
}
def canonicalVersionCode = 356
def canonicalVersionName = "1.17.2"
def canonicalVersionCode = 360
def canonicalVersionName = "1.17.5"
def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1,

View File

@ -34,6 +34,8 @@
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/>
<uses-permission android:name="network.loki.messenger.ACCESS_SESSION_SECRETS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
@ -307,11 +309,15 @@
android:value="org.thoughtcrime.securesms.home.HomeActivity" />
</activity>
<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"
android:foregroundServiceType="microphone"
android:exported="false" />
<service
android:name="org.thoughtcrime.securesms.service.KeyCachingService"
android:enabled="true"
android:exported="false" />
android:exported="false" android:foregroundServiceType="specialUse">
<!-- <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"-->
<!-- android:value="@string/preferences_app_protection__lock_signal_access_with_android_screen_lock_or_fingerprint"/>-->
</service>
<service
android:name="org.thoughtcrime.securesms.service.DirectShareService"
android:exported="true"

View File

@ -9,13 +9,14 @@ import android.os.Bundle;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import org.session.libsession.utilities.TextSecurePreferences;
import org.session.libsignal.utilities.Log;
import org.thoughtcrime.securesms.home.HomeActivity;
import org.thoughtcrime.securesms.onboarding.LandingActivity;
import org.thoughtcrime.securesms.service.KeyCachingService;
import org.session.libsession.utilities.TextSecurePreferences;
import java.util.Locale;
@ -168,7 +169,13 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
};
IntentFilter filter = new IntentFilter(KeyCachingService.CLEAR_KEY_EVENT);
registerReceiver(clearKeyReceiver, filter, KeyCachingService.KEY_PERMISSION, null);
ContextCompat.registerReceiver(
this,
clearKeyReceiver, filter,
KeyCachingService.KEY_PERMISSION,
null,
ContextCompat.RECEIVER_NOT_EXPORTED
);
}
private void removeClearKeyReceiver(Context context) {

View File

@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.database
import android.content.ContentValues
import android.content.Context
import android.database.Cursor
import org.session.libsession.messaging.jobs.AttachmentDownloadJob
import org.session.libsession.messaging.jobs.AttachmentUploadJob
import org.session.libsession.messaging.jobs.BackgroundGroupAddJob
import org.session.libsession.messaging.jobs.GroupAvatarDownloadJob
@ -26,6 +27,9 @@ class SessionJobDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
const val serializedData = "serialized_data"
@JvmStatic val createSessionJobTableCommand
= "CREATE TABLE $sessionJobTable ($jobID INTEGER PRIMARY KEY, $jobType STRING, $failureCount INTEGER DEFAULT 0, $serializedData TEXT);"
const val dropAttachmentDownloadJobs =
"DELETE FROM $sessionJobTable WHERE $jobType = '${AttachmentDownloadJob.KEY}';"
}
fun persistJob(job: Job) {

View File

@ -90,8 +90,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
private static final int lokiV42 = 63;
private static final int lokiV43 = 64;
private static final int lokiV44 = 65;
// Loki - onUpgrade(...) must be updated to use Loki version numbers if Signal makes any database changes
private static final int DATABASE_VERSION = lokiV43;
private static final int DATABASE_VERSION = lokiV44;
private static final int MIN_DATABASE_VERSION = lokiV7;
private static final String CIPHER3_DATABASE_NAME = "signal.db";
public static final String DATABASE_NAME = "signal_v4.db";
@ -604,6 +606,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
db.execSQL(RecipientDatabase.getAddBlocksCommunityMessageRequests());
}
if (oldVersion < lokiV44) {
db.execSQL(SessionJobDatabase.dropAttachmentDownloadJobs);
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();

View File

@ -25,8 +25,10 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.ServiceInfo;
import android.os.AsyncTask;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
import android.os.SystemClock;
@ -250,7 +252,11 @@ public class KeyCachingService extends Service {
builder.setContentIntent(buildLaunchIntent());
stopForeground(true);
startForeground(SERVICE_RUNNING_ID, builder.build());
if (Build.VERSION.SDK_INT >= 34) {
startForeground(SERVICE_RUNNING_ID, builder.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE);
} else {
startForeground(SERVICE_RUNNING_ID, builder.build());
}
}
private PendingIntent buildLockIntent() {

View File

@ -50,7 +50,7 @@ class PeerConnectionWrapper(private val context: Context,
private fun initPeerConnection() {
val random = SecureRandom().asKotlinRandom()
val iceServers = listOf("freyr","fenrir","frigg","angus","hereford","holstein", "brahman").shuffled(random).take(2).map { sub ->
val iceServers = listOf("freyr","angus","hereford","holstein", "brahman").shuffled(random).take(2).map { sub ->
PeerConnection.IceServer.builder("turn:$sub.getsession.org")
.setUsername("session202111")
.setPassword("053c268164bc7bd7")

View File

@ -25,6 +25,7 @@
android:layout_marginTop="@dimen/large_spacing"
android:gravity="center_vertical"
android:hint="@string/fragment_enter_community_url_edit_text_hint"
android:contentDescription="@string/AccessibilityId_community_input_box"
android:inputType="textUri"
android:maxLines="3"
android:paddingTop="0dp"
@ -91,6 +92,7 @@
<Button
android:id="@+id/joinCommunityButton"
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:contentDescription="@string/AccessibilityId_join_community_button"
android:layout_width="196dp"
android:layout_height="@dimen/medium_button_height"
android:layout_marginVertical="@dimen/large_spacing"

View File

@ -57,6 +57,9 @@
<string name="AccessibilityId_new_direct_message">New direct message</string>
<string name="AccessibilityId_create_group">Create group</string>
<string name="AccessibilityId_join_community">Join community</string>
<!-- Join community pop up -->
<string name="AccessibilityId_community_input_box">Community input</string>
<string name="AccessibilityId_join_community_button">Join community button</string>
<!-- Conversation options (three dots menu)-->
<string name="AccessibilityId_all_media">All media</string>
<string name="AccessibilityId_search">Search</string>
@ -89,7 +92,7 @@
<string name="AccessibilityId_block_message_request_button">Block message request</string>
<string name="AccessibilityId_timer_icon">Timer icon</string>
<!-- Configuration messages -->
<string name="AccessibilityId_control_message">Configuration message</string>
<string name="AccessibilityId_control_message">Control message</string>
<string name="AccessibilityId_blocked_banner">Blocked banner</string>
<string name="AccessibilityId_blocked_banner_text">Blocked banner text</string>
<!--New Session -->
@ -118,7 +121,7 @@
<string name="AccessibilityId_message_sent_status_pending">Message sent status pending</string>
<string name="AccessibilityId_message_sent_status_syncing">Message sent status syncing</string>
<string name="AccessibilityId_message_request_config_message">Message request has been accepted</string>
<string name="AccessibilityId_message_body">Message Body</string>
<string name="AccessibilityId_message_body">Message body</string>
<string name="AccessibilityId_voice_message">Voice message</string>
<string name="AccessibilityId_document">Document</string>
<string name="AccessibilityId_deleted_message">Deleted message</string>

View File

@ -35,7 +35,7 @@ class AttachmentDownloadJob(val attachmentID: Long, val databaseMessageID: Long)
override val maxFailureCount: Int = 2
companion object {
val KEY: String = "AttachmentDownloadJob"
const val KEY: String = "AttachmentDownloadJob"
// Keys used for database storage
private val ATTACHMENT_ID_KEY = "attachment_id"