mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
Compare commits
12 commits
Author | SHA1 | Date | |
---|---|---|---|
bdb6e7d12b | |||
377460a60f | |||
a57b7ef121 | |||
b96a5c561e | |||
9a83daa53f | |||
7fe40ea9f1 | |||
9d02eb33c7 | |||
b6bb586509 | |||
82cbf830ae | |||
c1102a2a50 | |||
862a47e7e3 | |||
6f22eb659b |
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue