Merge branch 'master' into feature/edit_messages

Signed-off-by: Sowjanya Kota <sowjanya.kch@gmail.com>
This commit is contained in:
Sowjanya Kota 2024-02-02 17:09:42 +01:00 committed by GitHub
commit 0e13c1f3ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
45 changed files with 9581 additions and 194 deletions

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
ENV ANDROID_HOME=/usr/lib/android-sdk

View File

@ -30,7 +30,7 @@ jobs:
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" >> gradle.properties
./gradlew assemble${{ matrix.flavor }}
- name: Archive apk
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: ${{ always() }}
with:
name: Nextcloud-${{ matrix.flavor }}-APK

View File

@ -32,7 +32,7 @@ jobs:
with:
swap-size-gb: 10
- name: Initialize CodeQL
uses: github/codeql-action/init@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
with:
languages: ${{ matrix.language }}
- name: Set up JDK 17
@ -46,4 +46,4 @@ jobs:
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
./gradlew assembleDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2

View File

@ -23,7 +23,7 @@ jobs:
steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
@ -42,7 +42,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}

View File

@ -19,4 +19,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0
- uses: gradle/wrapper-validation-action@27152f6fa06a6b8062ef7195c795692e51fc2c81 # v2.0.0

View File

@ -37,6 +37,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0
uses: github/codeql-action/upload-sarif@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
with:
sarif_file: results.sarif

View File

@ -25,12 +25,12 @@ jobs:
distribution: "temurin"
java-version: 17
- name: Run unit tests with coverage
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
with:
arguments: testGplayDebugUnit
- name: Upload test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: test-results
path: app/build/reports/tests/testGplayDebugUnitTest/

1
.gitignore vendored
View File

@ -85,3 +85,4 @@ freeline_project_description.json
# python
**/__pycache__/
/gradle/verification-keyring.gpg

View File

@ -43,13 +43,13 @@ android {
defaultConfig {
minSdkVersion 24
targetSdkVersion 33
targetSdkVersion 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// mayor.minor.hotfix.increment (for increment: 01-50=Alpha / 51-89=RC / 90-99=stable)
// xx .xxx .xx .xx
versionCode 180010008
versionName "18.1.0 Alpha 08"
versionCode 180010010
versionName "18.1.0 Alpha 10"
flavorDimensions "default"
renderscriptTargetApi 19
@ -156,7 +156,7 @@ ext {
roomVersion = "2.6.1"
workVersion = "2.9.0"
espressoVersion = "3.5.1"
media3_version = "1.2.0"
media3_version = "1.2.1"
}
configurations.configureEach {
@ -170,7 +170,7 @@ dependencies {
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.datastore:datastore-core:1.0.0'
implementation 'androidx.datastore:datastore-preferences:1.0.0'
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.4")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.5")
implementation fileTree(include: ['*'], dir: 'libs')
@ -190,7 +190,7 @@ dependencies {
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
androidTestImplementation "androidx.work:work-testing:${workVersion}"
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation ('com.gitlab.bitfireAT:dav4jvm:2.1.3', {
implementation ('com.github.bitfireAT:dav4jvm:2.1.3', {
exclude group: 'org.ogce', module: 'xpp3' // Android comes with its own XmlPullParser
})
implementation 'org.conscrypt:conscrypt-android:2.5.2'
@ -289,8 +289,8 @@ dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.8.0'
androidTestImplementation 'org.mockito:mockito-android:5.8.0'
testImplementation 'org.mockito:mockito-core:5.10.0'
androidTestImplementation 'org.mockito:mockito-android:5.10.0'
testImplementation 'androidx.arch.core:core-testing:2.2.0'
androidTestImplementation "androidx.test:core:1.5.0"
@ -307,12 +307,12 @@ dependencies {
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0'
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.6.4'
gplayImplementation 'com.google.android.gms:play-services-base:18.2.0'
gplayImplementation 'com.google.android.gms:play-services-base:18.3.0'
gplayImplementation "com.google.firebase:firebase-messaging:23.4.0"
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'com.github.nextcloud.android-common:ui:0.13.0'
implementation 'com.github.nextcloud.android-common:ui:0.14.0'
implementation 'com.github.nextcloud-deps:android-talk-webrtc:110.5481.0'
}

View File

@ -13,6 +13,12 @@
<issue id="UnusedResources">
<ignore path="**/values-**/strings.xml" />
</issue>
<issue id="MissingQuantity">
<ignore path="**/values-ka-rGE/strings.xml"/>
<ignore path="**/values-ar/strings.xml" />
<ignore path="**/values-ca/strings.xml" />
</issue>
<issue id="TypographyEllipsis">
<ignore path="**/values-**/strings.xml" />

View File

@ -23,6 +23,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
<application
android:name=".application.NextcloudTalkApplication"
android:allowBackup="true"
@ -40,8 +42,7 @@
<service
android:name=".services.firebase.NCFirebaseMessagingService"
android:exported="false"
android:foregroundServiceType="phoneCall">
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>

View File

@ -113,6 +113,7 @@ import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.DisplayUtils
import com.nextcloud.talk.utils.NotificationUtils.cancelExistingNotificationsForRoom
import com.nextcloud.talk.utils.NotificationUtils.getCallRingtoneUri
import com.nextcloud.talk.utils.ReceiverFlag
import com.nextcloud.talk.utils.VibrationUtils.vibrateShort
import com.nextcloud.talk.utils.animations.PulseAnimation
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_CALL_VOICE_ONLY
@ -136,6 +137,7 @@ import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew.isCallRecordin
import com.nextcloud.talk.utils.database.user.CurrentUserProviderNew
import com.nextcloud.talk.utils.permissions.PlatformPermissionUtil
import com.nextcloud.talk.utils.power.PowerManagerUtils
import com.nextcloud.talk.utils.registerPermissionHandlerBroadcastReceiver
import com.nextcloud.talk.utils.singletons.ApplicationWideCurrentRoomHolder
import com.nextcloud.talk.viewmodels.CallRecordingViewModel
import com.nextcloud.talk.viewmodels.CallRecordingViewModel.RecordingConfirmStopState
@ -3015,11 +3017,12 @@ class CallActivity : CallBaseActivity() {
}
}
}
registerReceiver(
registerPermissionHandlerBroadcastReceiver(
mReceiver,
IntentFilter(MICROPHONE_PIP_INTENT_NAME),
permissionUtil!!.privateBroadcastPermission,
null
null,
ReceiverFlag.NotExported
)
updateUiForPipMode()
} else {

View File

@ -2768,8 +2768,9 @@ class ChatActivity :
}
}
private fun uploadFile(fileUri: String, isVoiceMessage: Boolean, caption: String = "") {
private fun uploadFile(fileUri: String, isVoiceMessage: Boolean, caption: String = "", token: String = "") {
var metaData = ""
var room = ""
if (!participantPermissions.hasChatPermission()) {
Log.w(TAG, "uploading file(s) is forbidden because of missing attendee permissions")
@ -2784,11 +2785,13 @@ class ChatActivity :
metaData = "{\"caption\":\"$caption\"}"
}
if (token == "") room = roomToken else room = token
try {
require(fileUri.isNotEmpty())
UploadAndShareFilesWorker.upload(
fileUri,
roomToken,
room,
currentConversation?.displayName!!,
metaData
)
@ -4264,6 +4267,82 @@ class ChatActivity :
}
}
fun shareToNotes(message: ChatMessage, roomToken: String) {
val apiVersion = ApiUtils.getChatApiVersion(conversationUser, intArrayOf(1))
val type = message.getCalculateMessageType()
var shareUri: Uri? = null
var data: HashMap<String?, String?>?
var metaData: String = ""
var objectId: String = ""
if (message.hasFileAttachment()) {
val filename = message.selectedIndividualHashMap!!["name"]
path = applicationContext.cacheDir.absolutePath + "/" + filename
shareUri = FileProvider.getUriForFile(
this,
BuildConfig.APPLICATION_ID,
File(path)
)
this.grantUriPermission(
applicationContext.packageName,
shareUri,
Intent.FLAG_GRANT_WRITE_URI_PERMISSION or Intent.FLAG_GRANT_READ_URI_PERMISSION
)
} else if (message.hasGeoLocation()) {
data = message.messageParameters?.get("object")
objectId = data?.get("id")!!
val name = data.get("name")!!
val lat = data.get("latitude")!!
val lon = data.get("longitude")!!
metaData =
"{\"type\":\"geo-location\",\"id\":\"geo:$lat,$lon\",\"latitude\":\"$lat\"," +
"\"longitude\":\"$lon\",\"name\":\"$name\"}"
}
when (type) {
ChatMessage.MessageType.VOICE_MESSAGE -> {
uploadFile(shareUri.toString(), true, token = roomToken)
Snackbar.make(binding.root, R.string.nc_message_sent, Snackbar.LENGTH_SHORT).show()
}
ChatMessage.MessageType.SINGLE_NC_ATTACHMENT_MESSAGE -> {
val caption = if (message.message != "{file}") message.message else ""
if (null != shareUri) {
try {
context.contentResolver.openInputStream(shareUri)?.close()
uploadFile(shareUri.toString(), false, caption!!, roomToken)
Snackbar.make(binding.root, R.string.nc_message_sent, Snackbar.LENGTH_SHORT).show()
} catch (e: java.lang.Exception) {
Log.w(TAG, "File corresponding to the uri does not exist " + shareUri.toString())
downloadFileToCache(message, false) {
uploadFile(shareUri.toString(), false, caption!!, roomToken)
Snackbar.make(binding.root, R.string.nc_message_sent, Snackbar.LENGTH_SHORT).show()
}
}
}
}
ChatMessage.MessageType.SINGLE_NC_GEOLOCATION_MESSAGE -> {
chatViewModel.shareLocationToNotes(
credentials!!,
ApiUtils.getUrlToSendLocation(apiVersion, conversationUser!!.baseUrl, roomToken),
"geo-location",
objectId,
metaData
)
Snackbar.make(binding.root, R.string.nc_message_sent, Snackbar.LENGTH_SHORT).show()
}
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE -> {
chatViewModel.shareToNotes(
credentials!!,
ApiUtils.getUrlForChat(apiVersion, conversationUser!!.baseUrl, roomToken),
message.message!!,
conversationUser!!.displayName!!
)
Snackbar.make(binding.root, R.string.nc_message_sent, Snackbar.LENGTH_SHORT).show()
}
else -> {}
}
}
fun openInFilesApp(message: ChatMessage) {
val keyID = message.selectedIndividualHashMap!![PreviewMessageViewHolder.KEY_ID]
val link = message.selectedIndividualHashMap!!["link"]

View File

@ -22,6 +22,7 @@ package com.nextcloud.talk.chat.data
import com.nextcloud.talk.data.user.model.User
import com.nextcloud.talk.models.domain.ConversationModel
import com.nextcloud.talk.models.json.conversations.RoomsOverall
import com.nextcloud.talk.models.json.generic.GenericOverall
import com.nextcloud.talk.models.json.reminder.Reminder
import io.reactivex.Observable
@ -32,4 +33,18 @@ interface ChatRepository {
fun setReminder(user: User, roomToken: String, messageId: String, timeStamp: Int): Observable<Reminder>
fun getReminder(user: User, roomToken: String, messageId: String): Observable<Reminder>
fun deleteReminder(user: User, roomToken: String, messageId: String): Observable<GenericOverall>
fun shareToNotes(
credentials: String,
url: String,
message: String,
displayName: String
): Observable<GenericOverall> // last two fields are false
fun checkForNoteToSelf(credentials: String, url: String, includeStatus: Boolean): Observable<RoomsOverall>
fun shareLocationToNotes(
credentials: String,
url: String,
objectType: String,
objectId: String,
metadata: String
): Observable<GenericOverall>
}

View File

@ -23,6 +23,7 @@ package com.nextcloud.talk.chat.data
import com.nextcloud.talk.api.NcApi
import com.nextcloud.talk.data.user.model.User
import com.nextcloud.talk.models.domain.ConversationModel
import com.nextcloud.talk.models.json.conversations.RoomsOverall
import com.nextcloud.talk.models.json.generic.GenericOverall
import com.nextcloud.talk.models.json.reminder.Reminder
import com.nextcloud.talk.utils.ApiUtils
@ -83,4 +84,40 @@ class ChatRepositoryImpl(private val ncApi: NcApi) : ChatRepository {
it
}
}
override fun shareToNotes(
credentials: String,
url: String,
message: String,
displayName: String
): Observable<GenericOverall> {
return ncApi.sendChatMessage(
credentials,
url,
message,
displayName,
null,
false
).map {
it
}
}
override fun checkForNoteToSelf(
credentials: String,
url: String,
includeStatus: Boolean
): Observable<RoomsOverall> {
return ncApi.getRooms(credentials, url, includeStatus).map { it }
}
override fun shareLocationToNotes(
credentials: String,
url: String,
objectType: String,
objectId: String,
metadata: String
): Observable<GenericOverall> {
return ncApi.sendLocation(credentials, url, objectType, objectId, metadata).map { it }
}
}

View File

@ -27,8 +27,10 @@ import androidx.lifecycle.ViewModel
import com.nextcloud.talk.chat.data.ChatRepository
import com.nextcloud.talk.data.user.model.User
import com.nextcloud.talk.models.domain.ConversationModel
import com.nextcloud.talk.models.json.conversations.RoomsOverall
import com.nextcloud.talk.models.json.generic.GenericOverall
import com.nextcloud.talk.models.json.reminder.Reminder
import com.nextcloud.talk.utils.ConversationUtils
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@ -49,6 +51,13 @@ class ChatViewModel @Inject constructor(private val repository: ChatRepository)
val getReminderExistState: LiveData<ViewState>
get() = _getReminderExistState
object NoteToSelfNotAvaliableState : ViewState
open class NoteToSelfAvaliableState(val roomToken: String) : ViewState
private val _getNoteToSelfAvaliability: MutableLiveData<ViewState> = MutableLiveData(NoteToSelfNotAvaliableState)
val getNoteToSelfAvaliability: LiveData<ViewState>
get() = _getNoteToSelfAvaliability
open class GetRoomSuccessState(val conversationModel: ConversationModel) : ViewState
private val _getRoomViewState: MutableLiveData<ViewState> = MutableLiveData(GetRoomStartState)
@ -117,6 +126,58 @@ class ChatViewModel @Inject constructor(private val repository: ChatRepository)
})
}
fun shareToNotes(credentials: String, url: String, message: String, displayName: String) {
repository.shareToNotes(credentials, url, message, displayName)
.subscribeOn(Schedulers.io())
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<GenericOverall> {
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(genericOverall: GenericOverall) {
// unused atm
}
override fun onError(e: Throwable) {
Log.d(TAG, "Error when sharing to notes $e")
}
override fun onComplete() {
// unused atm
}
})
}
fun checkForNoteToSelf(credentials: String, baseUrl: String, includeStatus: Boolean) {
repository.checkForNoteToSelf(credentials, baseUrl, includeStatus).subscribeOn(Schedulers.io())
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(CheckForNoteToSelfObserver())
}
fun shareLocationToNotes(credentials: String, url: String, objectType: String, objectId: String, metadata: String) {
repository.shareLocationToNotes(credentials, url, objectType, objectId, metadata)
.subscribeOn(Schedulers.io())
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<GenericOverall> {
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(genericOverall: GenericOverall) {
// unused atm
}
override fun onError(e: Throwable) {
Log.e(TAG, "Error when sharing location to notes $e")
}
override fun onComplete() {
// unused atm
}
})
}
inner class GetRoomObserver : Observer<ConversationModel> {
override fun onSubscribe(d: Disposable) {
// unused atm
@ -192,6 +253,36 @@ class ChatViewModel @Inject constructor(private val repository: ChatRepository)
}
}
inner class CheckForNoteToSelfObserver : Observer<RoomsOverall> {
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(roomsOverall: RoomsOverall) {
val rooms = roomsOverall.ocs?.data
rooms?.let {
try {
val noteToSelf = rooms.first {
val model = ConversationModel.mapToConversationModel(it)
ConversationUtils.isNoteToSelfConversation(model)
}
_getNoteToSelfAvaliability.value = NoteToSelfAvaliableState(noteToSelf.token!!)
} catch (e: NoSuchElementException) {
_getNoteToSelfAvaliability.value = NoteToSelfNotAvaliableState
Log.e(TAG, "Note to self not found $e")
}
}
}
override fun onError(e: Throwable) {
Log.d(TAG, "Error when getting rooms for Note to Self Observer $e")
}
override fun onComplete() {
// unused atm
}
}
companion object {
private val TAG = ChatViewModel::class.simpleName
const val JOIN_ROOM_RETRY_COUNT: Long = 3

View File

@ -152,7 +152,7 @@ class UploadAndShareFilesWorker(val context: Context, workerParameters: WorkerPa
remotePath
)
} else {
Log.d(TAG, "starting normal upload (not chunked)")
Log.d(TAG, "starting normal upload (not chunked) of $fileName")
uploadSuccess = FileUploader(
context,

View File

@ -38,6 +38,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialog
import com.nextcloud.talk.R
import com.nextcloud.talk.application.NextcloudTalkApplication
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.chat.viewmodels.ChatViewModel
import com.nextcloud.talk.data.user.model.User
import com.nextcloud.talk.databinding.DialogMessageActionsBinding
import com.nextcloud.talk.models.domain.ConversationModel
@ -48,6 +49,8 @@ import com.nextcloud.talk.models.domain.ReactionDeletedModel
import com.nextcloud.talk.models.json.chat.ChatMessage
import com.nextcloud.talk.repositories.reactions.ReactionsRepository
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.ConversationUtils
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew
import com.vanniktech.emoji.EmojiPopup
import com.vanniktech.emoji.EmojiTextView
@ -96,6 +99,31 @@ class MessageActionsDialog(
viewThemeUtils.platform.themeDialog(dialogMessageActionsBinding.root)
initEmojiBar(hasChatPermission)
initMenuItemCopy(!message.isDeleted)
val apiVersion = ApiUtils.getConversationApiVersion(user, intArrayOf(ApiUtils.APIv4, ApiUtils.APIv3, 1))
chatActivity.chatViewModel.checkForNoteToSelf(
ApiUtils.getCredentials(user!!.username, user.token),
ApiUtils.getUrlForRooms(
apiVersion,
user.baseUrl
),
false
)
chatActivity.chatViewModel.getNoteToSelfAvaliability.observe(this) { state ->
when (state) {
is ChatViewModel.NoteToSelfAvaliableState -> {
initMenuAddToNote(
!message.isDeleted && !ConversationUtils.isNoteToSelfConversation(currentConversation),
state.roomToken
)
}
else -> {
initMenuAddToNote(
false
)
}
}
}
initMenuItemTranslate(
!message.isDeleted &&
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE == message.getCalculateMessageType() &&
@ -384,6 +412,16 @@ class MessageActionsDialog(
dialogMessageActionsBinding.menuSaveMessage.visibility = getVisibility(visible)
}
private fun initMenuAddToNote(visible: Boolean, roomToken: String = "") {
if (visible) {
dialogMessageActionsBinding.menuShareToNote.setOnClickListener {
chatActivity.shareToNotes(message, roomToken)
dismiss()
}
}
dialogMessageActionsBinding.menuShareToNote.visibility = getVisibility(visible)
}
private fun getVisibility(visible: Boolean): Int {
return if (visible) {
View.VISIBLE

View File

@ -0,0 +1,54 @@
/*
* Nextcloud Android client application
*
* @author Alper Ozturk
* Copyright (C) 2023 Alper Ozturk
* Copyright (C) 2023 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.utils
import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import android.os.Handler
@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun Context.registerBroadcastReceiver(receiver: BroadcastReceiver?, filter: IntentFilter, flag: ReceiverFlag): Intent? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(receiver, filter, flag.getId())
} else {
registerReceiver(receiver, filter)
}
}
@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun Context.registerPermissionHandlerBroadcastReceiver(
receiver: BroadcastReceiver?,
filter: IntentFilter,
broadcastPermission: String?,
scheduler: Handler?,
flag: ReceiverFlag
): Intent? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(receiver, filter, broadcastPermission, scheduler, flag.getId())
} else {
registerReceiver(receiver, filter, broadcastPermission, scheduler)
}
}

View File

@ -0,0 +1,35 @@
/*
* Nextcloud Android client application
*
* @author Alper Ozturk
* Copyright (C) 2023 Alper Ozturk
* Copyright (C) 2023 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.utils
import android.content.Context
import android.os.Build
import androidx.annotation.RequiresApi
enum class ReceiverFlag {
NotExported;
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
fun getId(): Int {
return Context.RECEIVER_NOT_EXPORTED
}
}

View File

@ -44,6 +44,8 @@ import android.media.AudioManager;
import android.util.Log;
import com.nextcloud.talk.events.ProximitySensorEvent;
import com.nextcloud.talk.utils.ContextExtensionsKt;
import com.nextcloud.talk.utils.ReceiverFlag;
import com.nextcloud.talk.utils.power.PowerManagerUtils;
import org.greenrobot.eventbus.EventBus;
@ -55,7 +57,7 @@ import java.util.Set;
public class WebRtcAudioManager {
private static final String TAG = WebRtcAudioManager.class.getSimpleName();
private final Context magicContext;
private final Context context;
private final WebRtcBluetoothManager bluetoothManager;
private final boolean useProximitySensor;
private final AudioManager audioManager;
@ -81,7 +83,7 @@ public class WebRtcAudioManager {
private WebRtcAudioManager(Context context, boolean useProximitySensor) {
Log.d(TAG, "ctor");
ThreadUtils.checkIsOnMainThread();
magicContext = context;
this.context = context;
audioManager = ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE));
bluetoothManager = WebRtcBluetoothManager.create(context, this);
wiredHeadsetReceiver = new WiredHeadsetReceiver();
@ -339,14 +341,14 @@ public class WebRtcAudioManager {
* Helper method for receiver registration.
*/
private void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
magicContext.registerReceiver(receiver, filter);
ContextExtensionsKt.registerBroadcastReceiver(context, receiver, filter, ReceiverFlag.NotExported);
}
/**
* Helper method for unregistration of an existing receiver.
*/
private void unregisterReceiver(BroadcastReceiver receiver) {
magicContext.unregisterReceiver(receiver);
context.unregisterReceiver(receiver);
}
/**
@ -375,7 +377,7 @@ public class WebRtcAudioManager {
* Gets the current earpiece state.
*/
private boolean hasEarpiece() {
return magicContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
}
/**

View File

@ -51,6 +51,9 @@ import android.os.Looper;
import android.os.Process;
import android.util.Log;
import com.nextcloud.talk.utils.ContextExtensionsKt;
import com.nextcloud.talk.utils.ReceiverFlag;
import org.webrtc.ThreadUtils;
import java.util.List;
@ -300,7 +303,11 @@ public class WebRtcBluetoothManager {
}
protected void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
apprtcContext.registerReceiver(receiver, filter);
ContextExtensionsKt.registerBroadcastReceiver(
apprtcContext,
receiver,
filter,
ReceiverFlag.NotExported);
}
protected void unregisterReceiver(BroadcastReceiver receiver) {

View File

@ -0,0 +1,21 @@
<!--
@author Google LLC
Copyright (C) 2021 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
<path android:fillColor="@android:color/white" android:pathData="M3,10h11v2H3V10zM3,8h11V6H3V8zM3,16h7v-2H3V16zM18.01,12.87l0.71,-0.71c0.39,-0.39 1.02,-0.39 1.41,0l0.71,0.71c0.39,0.39 0.39,1.02 0,1.41l-0.71,0.71L18.01,12.87zM17.3,13.58l-5.3,5.3V21h2.12l5.3,-5.3L17.3,13.58z"/>
</vector>

View File

@ -392,6 +392,39 @@
</LinearLayout>
<LinearLayout
android:id="@+id/menu_share_to_note"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/menu_icon_share_to_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:paddingStart="@dimen/standard_padding"
android:paddingEnd="@dimen/zero"
android:src="@drawable/ic_edit_note_24"
app:tint="@color/high_emphasis_menu_icon" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/menu_text_share_to_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:paddingStart="@dimen/standard_double_padding"
android:paddingEnd="@dimen/standard_padding"
android:text="@string/add_to_notes"
android:textAlignment="viewStart"
android:textColor="@color/high_emphasis_text"
android:textSize="@dimen/bottom_sheet_text_size" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu_share"
android:layout_width="match_parent"

View File

@ -23,6 +23,7 @@
<string name="continuous_voice_message_recording">Zamknout nahrávku pro nepřetržité nahrávání hlasové zprávy</string>
<string name="conversations">Konverzace</string>
<string name="create_conversation">Vytvořit konverzaci</string>
<string name="create_issue">Nahlásit problém</string>
<string name="custom">Uživatelsky určený</string>
<string name="danger_zone">Nebezpečná zóna</string>
<string name="delete_avatar">Vymazat profilový obrázek</string>
@ -154,16 +155,24 @@
<string name="nc_description_send_message_button">Poslat zprávu</string>
<string name="nc_diagnose_account_category_title">Stávající účet</string>
<string name="nc_diagnose_account_server">Server</string>
<string name="nc_diagnose_account_server_notification_app">Je nainstalovaná aplikace upozorňování na serveru?</string>
<string name="nc_diagnose_account_user_name">Uživatel</string>
<string name="nc_diagnose_android_version_title">Verze systému Android</string>
<string name="nc_diagnose_app_category_title">Aplikace</string>
<string name="nc_diagnose_app_name_title">Název aplikace</string>
<string name="nc_diagnose_app_users_amount">Registrovaní uživatelé</string>
<string name="nc_diagnose_app_version_title">Verze aplikace</string>
<string name="nc_diagnose_battery_optimization_title">Nastavení správy napájení</string>
<string name="nc_diagnose_device_name_title">Zařízení</string>
<string name="nc_diagnose_dialog_open_diagnose">Otevřít diagnostickou obrazovku</string>
<string name="nc_diagnose_dialog_open_dontkillmyapp_website">Otevřít dontkillmyapp.com</string>
<string name="nc_diagnose_meta_system_report_date">Vytváření výkazu o systému</string>
<string name="nc_diagnose_phone_category_title">Telefon</string>
<string name="nc_diagnose_server_talk_version">Verze Talk na serveru</string>
<string name="nc_diagnose_server_version">Verze serveru</string>
<string name="nc_diagnose_signaling_mode_extern">Externí</string>
<string name="nc_diagnose_signaling_mode_intern">Vnitřní</string>
<string name="nc_diagnose_signaling_mode_title">Režim signalizování</string>
<string name="nc_dialog_invalid_password">Neplatné heslo</string>
<string name="nc_dialog_maintenance_mode">Režim údržby</string>
<string name="nc_dialog_maintenance_mode_description">Server se nachází v režimu údržby.</string>
@ -356,6 +365,7 @@
<string name="nc_settings_advanced_title">Pokročilé</string>
<string name="nc_settings_appearance">Vzhled</string>
<string name="nc_settings_call_ringtone">Volání</string>
<string name="nc_settings_diagnose_title">Diagnostika</string>
<string name="nc_settings_incognito_keyboard_desc">Dát klávesnici pokyn, že má vypnout přizpůsobené učení se (bez záruky)</string>
<string name="nc_settings_incognito_keyboard_title">Inkognito klávesnice</string>
<string name="nc_settings_no_ringtone">Žádný zvuk</string>

View File

@ -168,7 +168,7 @@
<string name="nc_diagnose_battery_optimization_title">Batterie-Einstellungen</string>
<string name="nc_diagnose_device_name_title">Gerät</string>
<string name="nc_diagnose_dialog_open_checklist">Checkliste zur Fehlerbehebung öffnen</string>
<string name="nc_diagnose_dialog_open_diagnose">Diagnosebildschirm öffnen</string>
<string name="nc_diagnose_dialog_open_diagnose">Diagnoseseite öffnen</string>
<string name="nc_diagnose_dialog_open_dontkillmyapp_website">dontkillmyapp.com öffnen</string>
<string name="nc_diagnose_firebase_push_token_latest_fetch">Neuester Firebase-Push-Token-Abruf</string>
<string name="nc_diagnose_firebase_push_token_latest_generated">Neueste Firebase-Push-Token-Generation</string>
@ -300,7 +300,7 @@
<string name="nc_notification_channel_uploads">Uploads</string>
<string name="nc_notification_channel_uploads_description">Über den Hochlade-Fortschritt benachrichtigen</string>
<string name="nc_notification_settings">Benachrichtigungseinstellungen</string>
<string name="nc_notifications_troubleshooting_dialog_text">Benachrichtigungsberechtigung und Akkueinstellungen sind korrekt eingerichtet, um Benachrichtigungen zu erhalten. Sollten Sie trotzdem Probleme mit den Benachrichtigungen haben, prüfen Sie bitte, ob die Benachrichtigungskanäle für Anrufe und Nachrichten aktiviert sind. Weitere Hilfe finden Sie unter DontKillMyApp.com oder in der Checkliste zur Fehlerbehebung. Wenn dies nicht hilft, gehen Sie bitte zum Diagnoseseite und senden Sie einen Fehlerbericht.</string>
<string name="nc_notifications_troubleshooting_dialog_text">Benachrichtigungsberechtigung und Akkueinstellungen sind korrekt eingerichtet, um Benachrichtigungen zu erhalten. Sollten Sie trotzdem Probleme mit den Benachrichtigungen haben, prüfen Sie bitte, ob die Benachrichtigungskanäle für Anrufe und Nachrichten aktiviert sind. Weitere Hilfe finden Sie unter DontKillMyApp.com oder in der Checkliste zur Fehlerbehebung. Wenn dies nicht hilft, gehen Sie bitte zur Diagnoseseite und senden Sie einen Fehlerbericht.</string>
<string name="nc_notifications_troubleshooting_dialog_title">Fehlerbehebung bei Benachrichtigungen</string>
<string name="nc_notify_me_always">Immer benachrichtigen</string>
<string name="nc_notify_me_mention">Bei Erwähnung benachrichtigen</string>
@ -388,7 +388,7 @@
<string name="nc_settings_advanced_title">Erweitert</string>
<string name="nc_settings_appearance">Aussehen</string>
<string name="nc_settings_call_ringtone">Anrufe</string>
<string name="nc_settings_diagnose_subtitle">Den Diagnosebildschirm öffnen, um die Einstellungen zu überprüfen oder einen Fehlerbericht zu erstellen</string>
<string name="nc_settings_diagnose_subtitle">Die Diagnoseseite öffnen, um die Einstellungen zu überprüfen oder einen Fehlerbericht zu erstellen</string>
<string name="nc_settings_diagnose_title">Diagnose</string>
<string name="nc_settings_incognito_keyboard_desc">Weist die Tastatur an, das personalisierte Lernen zu deaktivieren (ohne Garantien)</string>
<string name="nc_settings_incognito_keyboard_title">Inkognito-Tastatur</string>

View File

@ -154,6 +154,7 @@
<string name="nc_description_send_message_button">Bidali mezua</string>
<string name="nc_diagnose_account_category_title">Uneko kontua</string>
<string name="nc_diagnose_account_server">Zerbitzaria</string>
<string name="nc_diagnose_account_user_name">Erabiltzailea</string>
<string name="nc_diagnose_android_version_title">Android bertsioa</string>
<string name="nc_diagnose_app_category_title">Aplikazioa</string>
<string name="nc_diagnose_app_name_title">Aplikazioaren izena</string>
@ -161,6 +162,7 @@
<string name="nc_diagnose_battery_optimization_title">Bateria ezarpenak</string>
<string name="nc_diagnose_device_name_title">Gailua</string>
<string name="nc_diagnose_phone_category_title">Telefonoa</string>
<string name="nc_diagnose_server_version">Zerbitzariaren bertsioa</string>
<string name="nc_diagnose_signaling_mode_extern">Kanpokoa</string>
<string name="nc_diagnose_signaling_mode_intern">Barnekoa</string>
<string name="nc_dialog_invalid_password">Pasahitz baliogabea</string>

View File

@ -162,6 +162,7 @@
<string name="nc_diagnose_battery_optimization_title">Paramètres pour la batterie</string>
<string name="nc_diagnose_device_name_title">Appareil</string>
<string name="nc_diagnose_phone_category_title">Téléphone</string>
<string name="nc_diagnose_server_talk_version">Version du serveur Talk</string>
<string name="nc_diagnose_server_version">Version du serveur</string>
<string name="nc_diagnose_signaling_mode_extern">Externe</string>
<string name="nc_diagnose_signaling_mode_intern">Interne</string>
@ -502,7 +503,7 @@
<string name="secondsAgo">secondes avant</string>
<string name="see_similar_system_messages">Voir les %1$s messages similaires</string>
<string name="selected_list_item">Sélectionné</string>
<string name="send_email">Envoyer un e-mail</string>
<string name="send_email">Envoyer un courriel</string>
<string name="send_to">Envoyer a</string>
<string name="send_to_forbidden">Vous n\'êtes pas autorisé à partager du contenu dans cette conversation</string>
<string name="send_to_three_dots">Envoyer à…</string>

View File

@ -134,6 +134,7 @@
<string name="nc_diagnose_battery_optimization_title">Impostazioni batteria</string>
<string name="nc_diagnose_device_name_title">Dispositivo</string>
<string name="nc_diagnose_phone_category_title">Telefono</string>
<string name="nc_diagnose_server_talk_version">Versione del server Talk</string>
<string name="nc_diagnose_signaling_mode_extern">Esterno</string>
<string name="nc_diagnose_signaling_mode_intern">Interni</string>
<string name="nc_dialog_invalid_password">Password non valida</string>
@ -141,7 +142,7 @@
<string name="nc_dialog_outdated_client_option_update">Aggiorna</string>
<string name="nc_dialog_reauth_or_delete">Vuoi autorizzare nuovamente o eliminare questo account?</string>
<string name="nc_dialog_save_to_storage_no">No</string>
<string name="nc_dialog_save_to_storage_yes">Si</string>
<string name="nc_dialog_save_to_storage_yes">Sì</string>
<string name="nc_display_name_not_fetched">Il nome visualizzato non può essere recuperato, interruzione in corso</string>
<string name="nc_display_name_not_stored">Nome visualizzato non memorizzato, interruzione in corso</string>
<string name="nc_email">Email</string>
@ -150,6 +151,8 @@
<string name="nc_expire_message_one_day">1 giorno</string>
<string name="nc_expire_message_one_hour">1 ora</string>
<string name="nc_expire_message_one_week">1 settimana</string>
<string name="nc_expire_messages">Scadenza dei messaggi di chat</string>
<string name="nc_expire_messages_explanation">I messaggi di chat possono scadere dopo un certo periodo di tempo. Nota: I file condivisi in chat non saranno eliminati per il proprietario, ma non saranno più condivisi nella conversazione.</string>
<string name="nc_external_server_failed">Recupero delle impostazioni di segnalazione non riuscito</string>
<string name="nc_failed_signaling_settings">Il server di destinazione non supporta la partecipazione a stanze pubbliche tramite cellulare. Puoi provare a unirti alla conversazioni tramite un browser web.</string>
<string name="nc_failed_to_perform_operation">Spiacenti, qualcosa non ha funzionato!</string>
@ -205,7 +208,7 @@
<string name="nc_new_mention">Menzioni non lette</string>
<string name="nc_new_messages">Messaggi non letti</string>
<string name="nc_new_password">Nuova password</string>
<string name="nc_nextcloud_talk_app_not_installed">%1$snon disponibile (non installato o limitato dall\'amministratore)</string>
<string name="nc_nextcloud_talk_app_not_installed">%1$s non disponibile (non installato o limitato dall\'amministratore)</string>
<string name="nc_nick_guest">Ospite</string>
<string name="nc_no">No</string>
<string name="nc_no_proxy">Nessun proxy</string>
@ -214,7 +217,7 @@
<string name="nc_notification_channel_calls_description">Notifica sulle chiamate in arrivo</string>
<string name="nc_notification_channel_messages">Messaggi</string>
<string name="nc_notification_channel_messages_description">Notifica sui messaggi in arrivo</string>
<string name="nc_notification_channel_uploads">Upload</string>
<string name="nc_notification_channel_uploads">Caricamenti</string>
<string name="nc_notification_settings">Impostazioni di notifica</string>
<string name="nc_notify_me_always">Notifica sempre</string>
<string name="nc_notify_me_mention">Notifica su menzione</string>
@ -349,6 +352,7 @@
<string name="nc_share_to_choose_account">Scegli account</string>
<string name="nc_shared_items">Oggetti condivisi</string>
<string name="nc_shared_items_deck_card">Scheda di Deck</string>
<string name="nc_shared_items_empty">Nessun elemento condiviso</string>
<string name="nc_shared_items_location">Posizione</string>
<string name="nc_shared_location">Posizione condivisa</string>
<string name="nc_sort_by">Ordina per</string>
@ -358,8 +362,9 @@
<string name="nc_upload_confirm_send_multiple">Inviare questi file a %1$s?</string>
<string name="nc_upload_confirm_send_single">Inviare questo file a %1$s?</string>
<string name="nc_upload_failed">Spiacenti, caricamento non riuscito</string>
<string name="nc_upload_failed_notification_title">Fallimento</string>
<string name="nc_upload_failed_notification_title">Problema</string>
<string name="nc_upload_from_cloud">Condividi da %1$s</string>
<string name="nc_upload_from_device">Carica dal dispositivo</string>
<string name="nc_upload_in_progess">Caricamento</string>
<string name="nc_upload_picture_from_cam">Scatta foto</string>
<string name="nc_user">Utente</string>

View File

@ -388,6 +388,7 @@
<string name="record_cancel_start">録画開始をキャンセル</string>
<string name="record_start_description">録画を開始</string>
<string name="record_stop_description">録画を停止</string>
<string name="recording_consent_for_conversation_title">レコーディングの同意</string>
<string name="recording_settings_title">記録中</string>
<string name="save">保存</string>
<string name="scope_federated_description">信頼できるサーバーのみと同期</string>

View File

@ -422,7 +422,10 @@
<string name="record_failed_info">녹음/녹화가 실패했습니다. 관리자에게 연락해 주세요.</string>
<string name="record_start_description">녹음/녹화 시작</string>
<string name="record_stop_description">녹음/녹화 중단</string>
<string name="recording_consent_all">모든 통화에서 녹음/녹화 동의 필요</string>
<string name="recording_consent_for_conversation_description">이 대화에 참여하기 전 녹음/녹화 동의 필요</string>
<string name="recording_consent_for_conversation_title">녹음/녹화 동의</string>
<string name="recording_consent_title">통화가 녹음/녹화됩니다.</string>
<string name="recording_settings_title">녹음/녹화 중</string>
<string name="restrict_join_other_room_while_call">통화 중 다른 대화방에 접속할 수 없습니다</string>
<string name="save">저장</string>

View File

@ -32,6 +32,7 @@
<string name="menu_item_sort_by_size_biggest_first">Didžiausi pirma</string>
<string name="menu_item_sort_by_size_smallest_first">Mažiausi pirma</string>
<string name="message_search_begin_empty">Nėra paieškos rezultatų</string>
<string name="message_search_begin_typing">Rašykite norėdami atlikti paiešką…</string>
<string name="messages">Žinutės</string>
<string name="nc_Server_account_imported">Dabar, pasirinkta paskyra yra importuota ir prieinama</string>
<string name="nc_about">Apie</string>
@ -322,6 +323,7 @@
<string name="tomorrow">Rytoj</string>
<string name="translate">Verskite</string>
<string name="translation_device_settings">Įrenginio nustatymai</string>
<string name="translation_error_message">Nepavyko aptikti kalbos</string>
<string name="translation_from">Nuo</string>
<string name="translation_to">Kam</string>
<string name="user_info_address">Adresas</string>

View File

@ -1,41 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="account_icon">Kontoikon</string>
<string name="added_to_favorites">La til samtale %1$s i favoritter</string>
<string name="appbar_search_in">Søk i %s</string>
<string name="audio_call">Lydanrop</string>
<string name="audio_output_bluetooth">Bluetooth</string>
<string name="audio_output_dialog_headline">Lydutgang</string>
<string name="audio_output_phone">Telefon</string>
<string name="audio_output_speaker">Høytaler</string>
<string name="audio_output_wired_headset">Kablede hodetelefoner</string>
<string name="avatar">Avatar</string>
<string name="away">Borte</string>
<string name="calendar">Kalender</string>
<string name="call_more_actions_dialog_headline">Avanserte samtalealternativer</string>
<string name="call_running_since_one_hour">Samtalen har pågått i én time.</string>
<string name="call_without_notification">Ring uten varsel</string>
<string name="camera_permission_granted">Kameratillatelse er gitt. Vennligst velg kamera på nytt.</string>
<string name="choose_avatar_from_cloud">Velg avatar fra skyen</string>
<string name="clear_status_message">Fjern statusmelding</string>
<string name="clear_status_message_after">Fjern statusmelding etter</string>
<string name="close">Lukk</string>
<string name="continuous_voice_message_recording">Lås opptak for kontinuerlig opptak av talemeldingen</string>
<string name="conversations">Samtaler</string>
<string name="create_conversation">Opprett samtale</string>
<string name="create_issue">Opprett problem</string>
<string name="custom">Egendefinert</string>
<string name="danger_zone">Faresone</string>
<string name="delete_avatar">Slett data</string>
<string name="deleted_conversation">Slettet samtale %1$s</string>
<string name="dnd">Ikke forstyrr</string>
<string name="dontClear">Ikke fjern</string>
<string name="edit">Rediger</string>
<string name="emoji_backspace">Tilbake</string>
<string name="emoji_category_recent">Nylig</string>
<string name="encrypted">Kryptert</string>
<string name="error_loading_chats">Det oppstod et problem med å laste inn chattene dine</string>
<string name="failed_to_save">Kunne ikke lagre %1$s</string>
<string name="file_list_folder">mappe</string>
<string name="file_list_loading">Laster ...</string>
<string name="filename_progress">%1$s (%2$d)</string>
<string name="fourHours">4 timer</string>
<string name="invisible">Usynlig</string>
<string name="languages_error_message">Språk kunne ikke hentes</string>
<string name="languages_error_title">Henting feilet</string>
<string name="later_today">Senere i dag</string>
<string name="left_conversation">Du forlot samtalen %1$s</string>
<string name="load_more_results">Hent flere resultat</string>
<string name="lock_symbol">Lås symbol</string>
<string name="lower_hand">Senk hånden</string>
<string name="marked_as_read">Merket samtale %1$s som lest</string>
<string name="marked_as_unread">Merket samtale %1$s som ulest</string>
<string name="mentioned">Nevnt</string>
<string name="menu_item_sort_by_date_newest_first">Nyeste først</string>
<string name="menu_item_sort_by_date_oldest_first">Eldste først</string>
<string name="menu_item_sort_by_name_a_z">A - Å</string>
<string name="menu_item_sort_by_name_z_a">Å - A</string>
<string name="menu_item_sort_by_size_biggest_first">Største først</string>
<string name="menu_item_sort_by_size_smallest_first">Minste først</string>
<string name="message_expiration_title">Utløp av melding</string>
<string name="message_poll_tap_to_open">Trykk for å åpne avstemningen</string>
<string name="message_search_begin_empty">Ingen søkeresultater</string>
<string name="message_search_begin_typing">Begynn å skrive for å søke...</string>
<string name="message_search_hint">Søk...</string>
<string name="messages">Meldinger</string>
<string name="nc_Server_account_imported">Valgt konto er nå importert og tilgjengelig</string>
@ -43,12 +68,19 @@
<string name="nc_account_chooser_active_user">Aktiv bruker</string>
<string name="nc_account_chooser_add_account">Legg til en konto</string>
<string name="nc_account_scheduled_for_deletion">Kontoen er planlagt slettet, og kan ikke endres.</string>
<string name="nc_action_open_main_menu">Åpne hovedmenyen</string>
<string name="nc_add_attachment">Legg til vedlegg</string>
<string name="nc_add_emojis">Legg til emojier</string>
<string name="nc_add_file">Legg til i samtale</string>
<string name="nc_add_participants">Legg til deltager</string>
<string name="nc_add_to_favorites">Legg til favoritter</string>
<string name="nc_all_ok_operation">OK, ferdig!</string>
<string name="nc_allow_guests">Tillat gjester</string>
<string name="nc_attendee_pin">PIN: %1$s</string>
<string name="nc_biometric_unlock">Lås opp %1$s</string>
<string name="nc_bluetooth_permission_hint">For å aktivere Bluetooth-høyttalere, vennligst gi \"Enheter i nærheten\" tillatelse.</string>
<string name="nc_call_button_content_description_advanced">Avanserte samtalealternativer</string>
<string name="nc_call_button_content_description_answer_video_call">Svar som videosamtale</string>
<string name="nc_call_button_content_description_camera">Kamera av/på</string>
<string name="nc_call_button_content_description_hangup">Legg på</string>
<string name="nc_call_button_content_description_microphone">Mikrofon av/på</string>
@ -77,6 +109,7 @@
<string name="nc_common_skip">Hopp over</string>
<string name="nc_common_unknown">Ukjent</string>
<string name="nc_configure_cert_auth">Velg sertifikat for autentisering</string>
<string name="nc_connecting_call">Kobler til...</string>
<string name="nc_contacts_done">Ferdig</string>
<string name="nc_conversation_link">Samtale lenke</string>
<string name="nc_conversation_menu_conversation_info">Samtale informasjon</string>
@ -84,6 +117,7 @@
<string name="nc_conversation_menu_voice_call">Samtale</string>
<string name="nc_conversation_settings">Samtale innstillinger</string>
<string name="nc_conversations_empty">Ta del i en samtale eller start en ny</string>
<string name="nc_conversations_empty_details">Si hei til venner og kolleger!</string>
<string name="nc_copy_message">Kopier</string>
<string name="nc_create_poll">Opprett avstemning</string>
<string name="nc_date_header_today">I dag</string>
@ -93,6 +127,7 @@
<string name="nc_delete_call">Slett samtale</string>
<string name="nc_delete_message">Slett</string>
<string name="nc_demote">Fjern moderatorstatus</string>
<string name="nc_description_record_voice">Ta opp talemelding</string>
<string name="nc_description_send_message_button">Send melding</string>
<string name="nc_diagnose_account_category_title">Nåværende konto</string>
<string name="nc_diagnose_account_server">Server</string>
@ -100,6 +135,7 @@
<string name="nc_diagnose_android_version_title">Android-versjon</string>
<string name="nc_diagnose_app_category_title">App</string>
<string name="nc_diagnose_app_name_title">App-navn</string>
<string name="nc_diagnose_app_users_amount">Registrerte brukere</string>
<string name="nc_diagnose_battery_optimization_title">Batteri innstillinger</string>
<string name="nc_diagnose_device_name_title">Enhet</string>
<string name="nc_diagnose_signaling_mode_extern">Ekstern</string>
@ -107,6 +143,8 @@
<string name="nc_dialog_invalid_password">Ugyldig passord</string>
<string name="nc_dialog_maintenance_mode">Modus for vedlikehold</string>
<string name="nc_dialog_outdated_client_option_update">Oppdater</string>
<string name="nc_dialog_save_to_storage_no">Nei</string>
<string name="nc_dialog_save_to_storage_yes">Ja</string>
<string name="nc_display_name_not_fetched">Kunne ikke hente visningsnavn, avbryter</string>
<string name="nc_display_name_not_stored">Kunne ikke lagre visningsnavn, avbryter</string>
<string name="nc_email">E-post</string>
@ -116,6 +154,7 @@
<string name="nc_expire_message_one_day">1 dag</string>
<string name="nc_expire_message_one_hour">1 time</string>
<string name="nc_expire_message_one_week">1 uke</string>
<string name="nc_expire_messages_explanation">Chatmeldinger kan utløpe etter en viss tid. Merk: filer som deles i chat, slettes ikke for eieren, men deles ikke lenger i samtalen.</string>
<string name="nc_external_server_failed">Feilet ved henting av settinger for signalering</string>
<string name="nc_failed_signaling_settings">Målserveren støtter ikke å delta i offentlige samtaler via mobiltelefoner. Du kan prøve å bli med i samtalen via nettleseren.</string>
<string name="nc_failed_to_perform_operation">Noe gikk galt.</string>
@ -135,6 +174,7 @@
<string name="nc_guest_access_password_dialog_title">Gjestetilgang-passord</string>
<string name="nc_guest_access_password_title">Passordbeskyttelse</string>
<string name="nc_guest_access_password_weak_alert_title">Svakt passord</string>
<string name="nc_guest_access_resend_invitations">Send invitasjoner på nytt</string>
<string name="nc_hint_enter_a_message">Enter a message …</string>
<string name="nc_important_conversation">Viktig samtale</string>
<string name="nc_join_via_link">Bli med via en lenke</string>
@ -147,6 +187,7 @@
<string name="nc_license_title">Lisens</string>
<string name="nc_limit_hit">%s grensen for maks antall tegn er nådd</string>
<string name="nc_lobby">Lobby</string>
<string name="nc_lobby_start_soon">Møtet starter snart</string>
<string name="nc_lobby_waiting">Du venter for øyeblikket i lobbyen.</string>
<string name="nc_location_current_position_description">Dine nåværende posisjon</string>
<string name="nc_locked_tap_to_unlock">Trykk for å låse opp</string>
@ -193,10 +234,12 @@
<string name="nc_push_to_talk_desc">Med mikrofonen avslått, klikk &amp; hold for å bruke klikk-for-å-snakke</string>
<string name="nc_remind">Påminnn meg senere</string>
<string name="nc_remove_from_favorites">Fjern fra favoritter</string>
<string name="nc_remove_group_and_members">Fjern gruppe og medlemmer</string>
<string name="nc_remove_participant">Fjern deltaker</string>
<string name="nc_rename">Endre navn på samtale</string>
<string name="nc_rename_confirm">Endre navn</string>
<string name="nc_reply">Svar</string>
<string name="nc_reply_privately">Svar privat</string>
<string name="nc_save_message">Lagre</string>
<string name="nc_screen_lock_timeout_30">30 sekunder</string>
<string name="nc_screen_lock_timeout_300">5 minutter</string>
@ -250,6 +293,7 @@
<string name="nc_settings_proxy_host_title">Mellomserver </string>
<string name="nc_settings_proxy_port_title">Mellomserver port</string>
<string name="nc_settings_proxy_type_title">Type mellomserver</string>
<string name="nc_settings_read_privacy_desc">Del min lesestatus og vis andres lesestatus</string>
<string name="nc_settings_reauthorize">Autoriser kontoen på nytt</string>
<string name="nc_settings_remove">Fjern</string>
<string name="nc_settings_remove_account">Fjern konto</string>
@ -265,6 +309,7 @@
<string name="nc_settings_theme_key">tema</string>
<string name="nc_settings_theme_light">Lys</string>
<string name="nc_settings_theme_title">Tema</string>
<string name="nc_settings_typing_status_desc">Del min skrivestatus og vis andres skrivestatus</string>
<string name="nc_settings_use_credentials_title">Proxy krever legitimasjon</string>
<string name="nc_settings_warning">Advarsel</string>
<string name="nc_settings_wrong_account">Bare gjeldende konto kan reautoriseres</string>
@ -273,7 +318,9 @@
<string name="nc_share_text">Delta i samtalen via %1$s/index.php/call/%2$s</string>
<string name="nc_share_text_pass">\nPassord: %1$s</string>
<string name="nc_share_to_choose_account">Velg konto</string>
<string name="nc_shared_items">Delte elementer</string>
<string name="nc_shared_items_deck_card">Deck kort</string>
<string name="nc_shared_items_empty">Ingen delte elementer</string>
<string name="nc_shared_items_location">Sted</string>
<string name="nc_sort_by">Sorter etter</string>
<string name="nc_start_time">Start tidspunkt</string>
@ -291,13 +338,27 @@
<string name="oneHour">1 time</string>
<string name="online">Pålogget</string>
<string name="online_status">Online-status</string>
<string name="openConversations">Åpne samtaler</string>
<string name="open_in_files_app">Åpne i Filer-appen</string>
<string name="polls_add_option">Legg til alternativ</string>
<string name="polls_end_poll">Avslutt avstemning</string>
<string name="polls_multiple_answers">Flere svar</string>
<string name="polls_options">Valg</string>
<string name="polls_private_poll">Privat avstemning</string>
<string name="polls_question">Spørsmål</string>
<string name="polls_results_subtitle">Resultater</string>
<string name="polls_settings">Innstillinger</string>
<string name="polls_submit_vote">Stemme</string>
<string name="raise_hand">Løft hånden</string>
<string name="reactions_tab_all">Alle</string>
<string name="record_cancel_start">Avbryt opptaksstart</string>
<string name="record_failed_info">Opptaket feilet, vennligst kontakt administratoren din.</string>
<string name="record_start_description">Start opptak</string>
<string name="record_stop_description">Stopp opptak</string>
<string name="recording_consent_all">Det kreves samtykke til opptak for alle samtaler</string>
<string name="recording_consent_for_conversation_description">Krev samtykke til opptak før du blir med i samtalen i denne samtalen</string>
<string name="recording_consent_for_conversation_title">Samtykke til opptak</string>
<string name="recording_consent_title">Samtalen kan bli tatt opp.</string>
<string name="recording_settings_title">Innspilling</string>
<string name="save">Lagre</string>
<string name="scope_federated_description">Synkroniser kun til betrodde servere</string>
@ -308,11 +369,13 @@
<string name="scope_private_title">Privat</string>
<string name="scope_published_description">Synkroniser til betrodde servere og den globale og offentlige adresseboken</string>
<string name="scope_published_title">Publisert</string>
<string name="scroll_to_bottom">Rull til bunnen</string>
<string name="secondsAgo">sekunder siden</string>
<string name="selected_list_item">Valgt</string>
<string name="send_email">Send e-post</string>
<string name="send_to">Send til</string>
<string name="send_to_three_dots">Send til...</string>
<string name="send_without_notification">Send uten varsel</string>
<string name="set">Sett</string>
<string name="set_status">Velg status</string>
<string name="set_status_message">Velg statusmelding</string>
@ -338,6 +401,7 @@
<string name="today">I dag</string>
<string name="tomorrow">I morgen</string>
<string name="translate">Oversette</string>
<string name="translation_copy_translated_text">Kopier oversatt tekst</string>
<string name="translation_device_settings">Enhetsinnstillinger</string>
<string name="translation_from">Fra</string>
<string name="translation_to">Til</string>

View File

@ -52,7 +52,7 @@
<string name="message_search_hint">Пошук …</string>
<string name="messages">Повідомлення</string>
<string name="nc_Server_account_imported">Обраний обліковий запис імпортовано і він доступний</string>
<string name="nc_about">Про програму</string>
<string name="nc_about">Про застосунок</string>
<string name="nc_account_chooser_active_user">Активний користувач</string>
<string name="nc_account_chooser_add_account">Додати обліковий запис</string>
<string name="nc_account_scheduled_for_deletion">Заплановано вилучення облікового запису, тому до нього неможливо внести зміни</string>
@ -351,7 +351,7 @@
<string name="nc_settings_screen_security_desc">Запобігає збереженню скріншотів усередині додатка і в списку недавніх додатків</string>
<string name="nc_settings_screen_security_title">Безпека екрану</string>
<string name="nc_settings_server_almost_eol">Ця версія серверу дуже застаріла і не буде підтримуватися в наступному випуску!</string>
<string name="nc_settings_server_eol">Версія сервера застаріла і не підтримується цією версією програми для Android</string>
<string name="nc_settings_server_eol">Версія сервера застаріла і не підтримується цією версією застосунку для Android</string>
<string name="nc_settings_server_eol_title">Непідтримуваний сервер</string>
<string name="nc_settings_theme_battery_saver">Встановлено режимом збереження батареї</string>
<string name="nc_settings_theme_dark">Темна</string>

View File

@ -794,4 +794,5 @@ How to translate with transifex:
<string name="conversation_is_read_only">Conversation is read Only</string>
<string name="nc_edit_message_text">Edit Message Text</string>
<string name="hint_edited_message">(edited)</string>
<string name="add_to_notes">Add to Notes</string>
</resources>

View File

@ -34,11 +34,11 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-serialization:${kotlinVersion}"
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.6'
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.4"
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.7'
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.5"
classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.0"
// NOTE: Do not place your application dependencies here; they belong

View File

@ -32,6 +32,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-XX:MaxHeapSize\=2048m -Xmx2048m
org.gradle.dependency.verification.console=verbose
android.useAndroidX=true
android.enableJetifier=true

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip

317
gradlew vendored
View File

@ -1,74 +1,127 @@
#!/usr/bin/env bash
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn ( ) {
warn () {
echo "$*"
}
} >&2
die ( ) {
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -77,84 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

66
gradlew.bat vendored
View File

@ -1,4 +1,20 @@
@if "%DEBUG%" == "" @echo off
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -8,20 +24,24 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -35,7 +55,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -45,44 +65,26 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

11
renovate.json5 Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"timezone": "Europe/Berlin",
"labels": [
"dependencies",
"3. to review"
],
}

View File

@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 8 errors and 83 warnings</span>
<span class="mdl-layout-title">Lint Report: 8 errors and 80 warnings</span>