Skip to content

Commit

Permalink
Merge pull request #439 from sora-xor/mwr-995
Browse files Browse the repository at this point in the history
Mwr 995
  • Loading branch information
arvifox authored Oct 23, 2024
2 parents b14d6c6 + 6e2b387 commit f872f58
Show file tree
Hide file tree
Showing 37 changed files with 67 additions and 58 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

// soralution 138 3.8.5.0 2024.09.06
// sora dae 115 3.8.5.0 2024.09.09
// sora dae 116 3.8.5.1 2024.10.23

android {
namespace = "jp.co.soramitsu.sora"
Expand All @@ -30,8 +30,8 @@ android {
applicationId = "jp.co.soramitsu.sora"
minSdk = 26
targetSdk = 34
versionCode = System.getenv("CI_BUILD_ID")?.toInt() ?: 115
versionName = "3.8.5.0"
versionCode = System.getenv("CI_BUILD_ID")?.toInt() ?: 116
versionName = "3.8.5.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
// resConfigs "en", "ru", "es", "fr", "de", "nb", "in", "tr", "ar"
Expand Down Expand Up @@ -172,7 +172,7 @@ play {
serviceAccountCredentials = file(System.getenv("CI_PLAY_KEY") ?: "../key/fake.json")
track = "internal"
releaseStatus = ReleaseStatus.DRAFT
releaseName = "3.8.5.0 - SORA Card Improvements"
releaseName = "3.8.5.1 - Bug fixes and minor improvements"
defaultToAppBundles = true
}

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!-- <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />-->

<queries>
<package android:name="com.soracard.iban.wallet"/>
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fun maybeWrapQuotes(s: String): String {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion common/src/production/assets/sora2_metadata

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common_wallet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion core_db/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion demeter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_account_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_account_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_assets_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_assets_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package jp.co.soramitsu.feature_assets_impl.presentation.screens.scan

import android.app.Activity
import android.content.Intent
import android.graphics.Color
import android.net.Uri
import android.os.Bundle
import android.view.KeyEvent
import android.widget.Toast
import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.PickVisualMediaRequest
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
Expand Down Expand Up @@ -68,12 +68,10 @@ class QRCodeScannerActivity : AppCompatActivity() {

private var capture: CaptureManager? = null

private val startForResultFromGallery: ActivityResultLauncher<Intent> =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result: ActivityResult ->
if (result.resultCode == Activity.RESULT_OK) {
result.data?.data?.let { selectedImageUri ->
viewModel.decodeScannedQrCodeUri(selectedImageUri)
}
private val startForResultFromGallery: ActivityResultLauncher<PickVisualMediaRequest> =
registerForActivityResult(ActivityResultContracts.PickVisualMedia()) { resultUri: Uri? ->
resultUri?.let { selectedImageUri ->
viewModel.decodeScannedQrCodeUri(selectedImageUri)
}
}

Expand Down Expand Up @@ -176,14 +174,8 @@ class QRCodeScannerActivity : AppCompatActivity() {
}

private fun selectQrFromGallery() {
val intent = Intent().apply {
type = QR_CODE_IMAGE_TYPE
action = Intent.ACTION_GET_CONTENT
}
startForResultFromGallery.launch(intent)
}

private companion object {
const val QR_CODE_IMAGE_TYPE = "image/*"
val pickVisualMediaRequest =
PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)
startForResultFromGallery.launch(pickVisualMediaRequest)
}
}
2 changes: 1 addition & 1 deletion feature_blockexplorer_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_blockexplorer_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_ecosystem_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_ethereum_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_main_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_main_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_multiaccount_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_multiaccount_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_polkaswap_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_polkaswap_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_referral_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_referral_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_select_node_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_select_node_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_sora_card_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_sora_card_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_wallet_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion feature_wallet_impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
val composeCompilerVersion: String by project

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
14 changes: 13 additions & 1 deletion feature_wallet_impl/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
<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_DATA_SYNC" />

<application>
<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="dataSync"
tools:node="merge" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package jp.co.soramitsu.feature_wallet_impl.presentation.claim

import android.content.Context
import android.content.pm.ServiceInfo
import android.os.Build
import androidx.core.app.NotificationManagerCompat
import androidx.hilt.work.HiltWorker
import androidx.work.CoroutineWorker
Expand All @@ -46,6 +48,7 @@ import dagger.assisted.AssistedInject
import javax.inject.Inject
import jp.co.soramitsu.common.R
import jp.co.soramitsu.common.logger.FirebaseWrapper
import jp.co.soramitsu.common.util.BuildUtils
import jp.co.soramitsu.common.util.Notification
import jp.co.soramitsu.feature_wallet_api.domain.interfaces.WalletInteractor
import jp.co.soramitsu.feature_wallet_api.domain.model.MigrationStatus
Expand Down Expand Up @@ -82,7 +85,11 @@ class ClaimWorker @AssistedInject constructor(
.setContentTitle(appContext.getString(R.string.claim_notification_text))
.build()

val foregroundInfo = ForegroundInfo(NOTIFICATION_ID, notification)
val foregroundInfo = if (BuildUtils.sdkAtLeast(Build.VERSION_CODES.Q)) {
ForegroundInfo(NOTIFICATION_ID, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
} else {
ForegroundInfo(NOTIFICATION_ID, notification)
}
setForeground(foregroundInfo)

val result = runCatching { walletInteractor.migrate() }.getOrElse {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
agp = "8.6.0"
agp = "8.7.1"
kotlin = "1.9.24"
appcompat = "1.7.0"
coroutines = "1.8.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jan 13 13:13:48 MSK 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

android {
Expand Down
Loading

0 comments on commit f872f58

Please sign in to comment.