mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07:30 +00:00
Merge branch 'dev' into utilise-dialog-dsl
This commit is contained in:
commit
adfa94614b
@ -1580,7 +1580,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
showVoiceMessageUI()
|
showVoiceMessageUI()
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||||
audioRecorder.startRecording()
|
audioRecorder.startRecording()
|
||||||
stopAudioHandler.postDelayed(stopVoiceMessageRecordingTask, 60000) // Limit voice messages to 1 minute each
|
stopAudioHandler.postDelayed(stopVoiceMessageRecordingTask, 300000) // Limit voice messages to 5 minute each
|
||||||
} else {
|
} else {
|
||||||
Permissions.with(this)
|
Permissions.with(this)
|
||||||
.request(Manifest.permission.RECORD_AUDIO)
|
.request(Manifest.permission.RECORD_AUDIO)
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package org.thoughtcrime.securesms.preferences
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.widget.FrameLayout
|
|
||||||
|
|
||||||
class BlockedContactsLayout @JvmOverloads constructor(
|
|
||||||
context: Context, attrs: AttributeSet? = null
|
|
||||||
) : FrameLayout(context, attrs)
|
|
@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.preferences
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.View
|
|
||||||
import androidx.preference.PreferenceCategory
|
import androidx.preference.PreferenceCategory
|
||||||
import androidx.preference.PreferenceViewHolder
|
import androidx.preference.PreferenceViewHolder
|
||||||
|
|
||||||
@ -16,8 +15,7 @@ class BlockedContactsPreference @JvmOverloads constructor(
|
|||||||
super.onBindViewHolder(holder)
|
super.onBindViewHolder(holder)
|
||||||
|
|
||||||
holder.itemView.setOnClickListener {
|
holder.itemView.setOnClickListener {
|
||||||
val intent = Intent(context, BlockedContactsActivity::class.java)
|
Intent(context, BlockedContactsActivity::class.java).let(context::startActivity)
|
||||||
context.startActivity(intent)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<org.thoughtcrime.securesms.preferences.BlockedContactsLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<Button
|
||||||
android:layout_width="match_parent"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:contentDescription="@string/AccessibilityId_blocked_contacts"
|
||||||
|
style="@style/Widget.Session.Button.Common.Borderless"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="@dimen/medium_spacing"
|
||||||
android:layout_marginHorizontal="@dimen/large_spacing"
|
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||||
android:layout_marginVertical="@dimen/medium_spacing"
|
android:layout_marginVertical="@dimen/medium_spacing"
|
||||||
android:layout_height="wrap_content">
|
android:text="@string/blocked_contacts_title"
|
||||||
<Button
|
android:textColor="@color/destructive"
|
||||||
android:contentDescription="@string/AccessibilityId_blocked_contacts"
|
android:textSize="16sp"
|
||||||
style="@style/Widget.Session.Button.Common.Borderless"
|
android:textStyle="bold"
|
||||||
android:layout_width="wrap_content"
|
/>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingHorizontal="@dimen/medium_spacing"
|
|
||||||
android:text="@string/blocked_contacts_title"
|
|
||||||
android:textColor="@color/destructive"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
/>
|
|
||||||
</org.thoughtcrime.securesms.preferences.BlockedContactsLayout>
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<!-- TODO: check figure out what is needed for this -->
|
<!-- TODO: check figure out what is needed for this -->
|
||||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||||
android:defaultValue="true"
|
android:defaultValue="@bool/screen_security_default"
|
||||||
android:key="pref_screen_security"
|
android:key="pref_screen_security"
|
||||||
android:title="@string/preferences__screen_security"
|
android:title="@string/preferences__screen_security"
|
||||||
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
|
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
|
||||||
|
4
libsession/src/debug/res/values/values.xml
Normal file
4
libsession/src/debug/res/values/values.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<bool name="screen_security_default">false</bool>
|
||||||
|
</resources>
|
@ -649,7 +649,7 @@ interface TextSecurePreferences {
|
|||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun isScreenSecurityEnabled(context: Context): Boolean {
|
fun isScreenSecurityEnabled(context: Context): Boolean {
|
||||||
return getBooleanPreference(context, SCREEN_SECURITY_PREF, !BuildConfig.DEBUG)
|
return getBooleanPreference(context, SCREEN_SECURITY_PREF, context.resources.getBoolean(R.bool.screen_security_default))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getLastVersionCode(context: Context): Int {
|
fun getLastVersionCode(context: Context): Int {
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<bool name="enable_alarm_manager">true</bool>
|
<bool name="enable_alarm_manager">true</bool>
|
||||||
<bool name="enable_job_service">false</bool>
|
<bool name="enable_job_service">false</bool>
|
||||||
|
<bool name="screen_security_default">true</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user