Skip to content

Commit d276ce5

Browse files
kcw-gruntvsima
andauthored
🚀[ Release v.2.6.0] Merge into Main (#12)
* Added український language - add uk xml file - removed the nl, sv, da files - Escaped apostrphes in UK strings file - Updated language choices * 🥳[Feature] Unstoppable ext update (#11) * WIP: DNC Dropped in the UD code prior to testing * Added study link * Fix unstoppable domains dependency * Updated the UD ext text WIP::::Need to refactor once UK and deletion on SV, NL, DA * added UK lang Co-authored-by: Victor Sima <[email protected]> * version bump * Hotfix/crashes v2.6.0 (#17) * Added notes * Bugfix - add missing pendingIntent flag for android 13 * Use firebase bom Co-authored-by: kcw-grunt <[email protected]> Co-authored-by: Victor Sima <[email protected]>
1 parent 0e3928b commit d276ce5

File tree

25 files changed

+887
-2332
lines changed

25 files changed

+887
-2332
lines changed

app/build.gradle

+10-7
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ android {
6464
applicationId = 'com.loafwallet'
6565
minSdkVersion 27
6666
targetSdkVersion 31
67-
versionCode 671
68-
versionName "v2.5.0"
67+
versionCode 673
68+
versionName "v2.6.0"
6969
multiDexEnabled true
7070
archivesBaseName = "${versionName}(${versionCode})"
7171

@@ -90,7 +90,9 @@ android {
9090
unitTests.returnDefaultValues = true
9191
}
9292
packagingOptions {
93-
pickFirst 'protobuf.meta'
93+
resources {
94+
pickFirsts += ['protobuf.meta']
95+
}
9496
}
9597
externalNativeBuild {
9698
cmake {
@@ -300,15 +302,16 @@ dependencies {
300302
implementation 'com.squareup.okhttp3:okhttp:4.3.1'
301303

302304
// Firebase
303-
implementation 'com.google.firebase:firebase-analytics:20.1.0'
304-
implementation 'com.google.firebase:firebase-crashlytics:18.2.8'
305-
implementation 'com.google.firebase:firebase-crashlytics-ndk:18.2.8'
305+
implementation platform('com.google.firebase:firebase-bom:29.3.1')
306+
implementation 'com.google.firebase:firebase-analytics'
307+
implementation 'com.google.firebase:firebase-crashlytics'
308+
implementation 'com.google.firebase:firebase-crashlytics-ndk'
306309

307310
// Timber
308311
implementation 'com.jakewharton.timber:timber:5.0.1'
309312

310313
// Unstoppable domain
311-
implementation 'com.unstoppabledomains:resolution:2.0.0'
314+
implementation 'com.unstoppabledomains:resolution:5.0.0'
312315

313316
// Progress Button
314317
implementation 'com.github.razir.progressbutton:progressbutton:2.1.0'

app/src/main/java/com/breadwallet/entities/Language.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,20 @@ package com.breadwallet.entities
77
* Copyright © 2021 Litecoin Foundation. All rights reserved.
88
*/
99
enum class Language(val code: String, val title: String, val desc: String) {
10-
DANISH("da", "Dansk", "Vælg sprog"),
1110
GERMAN("de", "Deutsch", "Sprache auswählen"),
1211
ENGLISH("en", "English", "Select language"),
1312
SPANISH("es", "Español", "Seleccione el idioma"),
1413
FRENCH("fr", "Français", "Sélectionner la langue"),
1514
INDONESIAN("in", "Indonesia", "Pilih bahasa"),
1615
ITALIAN("it", "Italiano", "Seleziona la lingua"),
17-
DUTCH("nl", "Nederlands", "Selecteer taal"),
1816
PORTUGUESE("pt", "Português", "Selecione o idioma"),
19-
SWEDISH("sv", "Svenska", "Välj språk"),
2017
TURKISH("tr", "Türkçe", "Dil Seçin"),
18+
UKRAINIAN("uk", "Yкраїнський", "Оберіть мову"),
2119
RUSSIAN("ru", "Pусский", "Выберите язык"),
2220
KOREAN("ko", "한국어", "언어 선택"),
2321
JAPANESE("ja", "日本語", "言語を選択する"),
2422
CHINESE_SIMPLIFIED("zh-CN", "简化字", "选择语言"),
2523
CHINESE_TRADITIONAL("zh-TW", "繁體字", "選擇語言");
26-
2724
companion object {
2825
fun find(code: String?): Language = values().find { it.code == code } ?: ENGLISH
2926
}

app/src/main/java/com/breadwallet/tools/manager/BRNotificationManager.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import android.app.TaskStackBuilder;
66
import android.content.Context;
77
import android.content.Intent;
8+
import android.os.Build;
9+
810
import androidx.core.app.NotificationCompat;
911

1012
import com.breadwallet.presenter.activities.BreadActivity;
@@ -31,10 +33,12 @@ public static void sendNotification(Context ctx, int icon, String title, String
3133
stackBuilder.addParentStack(BreadActivity.class);
3234
// Adds the Intent that starts the Activity to the top of the stack
3335
stackBuilder.addNextIntent(resultIntent);
36+
int flags = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ?
37+
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE : PendingIntent.FLAG_UPDATE_CURRENT;
3438
PendingIntent resultPendingIntent =
3539
stackBuilder.getPendingIntent(
3640
0,
37-
PendingIntent.FLAG_UPDATE_CURRENT
41+
flags
3842
);
3943
mBuilder.setContentIntent(resultPendingIntent);
4044
NotificationManager mNotificationManager =

app/src/main/java/com/breadwallet/tools/manager/ResolutionResult.kt

+21-8
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,11 @@ import com.unstoppabledomains.resolution.Resolution
88
import com.unstoppabledomains.resolution.naming.service.NamingServiceType
99
import timber.log.Timber
1010

11-
12-
/** Litewallet
13-
* Created by Mohamed Barry on 12/23/20
14-
15-
* Copyright © 2020 Litecoin Foundation. All rights reserved.
16-
*/
1711
data class ResolutionResult(val error: NamingServiceException?, val address: String?)
1812

1913
class UDResolution {
2014
private val tool: DomainResolution = Resolution.builder()
21-
.infura(NamingServiceType.CNS, Network.MAINNET, BuildConfig.INFURA_KEY)
15+
// .infura(NamingServiceType.CNS, Network.MAINNET, BuildConfig.INFURA_KEY)
2216
.build()
2317

2418
fun resolve(domain: String): ResolutionResult {
@@ -29,4 +23,23 @@ class UDResolution {
2923
ResolutionResult(err, null)
3024
}
3125
}
32-
}
26+
}
27+
28+
//https://github.com/unstoppabledomains/resolution-java/blob/master/samples.md
29+
//data class ResolutionResult(val error: NamingServiceException?, val address: String?) {}
30+
//
31+
//class AsyncResolution : AsyncTask<String, String, ResolutionResult>() {
32+
// private val tool: DomainResolution = Resolution()
33+
//
34+
// override fun doInBackground(vararg params: String?): ResolutionResult {
35+
// val domain = params[0]
36+
// val currency = params[1]
37+
// return try {
38+
// val address = this.tool.addr(domain, currency)
39+
// ResolutionResult(null, address)
40+
// } catch(err: NamingServiceException) {
41+
// err.printStackTrace();
42+
// ResolutionResult(err, null)
43+
// }
44+
// }
45+
//}

app/src/main/java/com/breadwallet/tools/manager/SyncManager.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.app.PendingIntent;
55
import android.content.Context;
66
import android.content.Intent;
7+
import android.os.Build;
78

89
import com.breadwallet.presenter.activities.BreadActivity;
910
import com.breadwallet.tools.listeners.SyncReceiver;
@@ -29,10 +30,13 @@ private SyncManager() {
2930
}
3031

3132
private void createAlarm(Context app, long time) {
33+
//Add another flag
3234
AlarmManager alarmManager = (AlarmManager) app.getSystemService(Context.ALARM_SERVICE);
3335
Intent intent = new Intent(app, SyncReceiver.class);
3436
intent.setAction(SyncReceiver.SYNC_RECEIVER);//my custom string action name
35-
PendingIntent pendingIntent = PendingIntent.getService(app, 1001, intent, PendingIntent.FLAG_UPDATE_CURRENT);
37+
int flags = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ?
38+
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE : PendingIntent.FLAG_UPDATE_CURRENT;
39+
PendingIntent pendingIntent = PendingIntent.getService(app, 1001, intent, flags);
3640
alarmManager.setWindow(AlarmManager.RTC_WAKEUP, time, time + TimeUnit.MINUTES.toMillis(1), pendingIntent);//first start will start asap
3741
}
3842

app/src/main/res/layout/fragment_send.xml

+4-5
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,17 @@
161161
<EditText
162162
android:id="@+id/ud_address_edit"
163163
style="@style/BREditStyle"
164-
android:layout_width="0dp"
165-
android:layout_height="32dp"
164+
android:layout_width="wrap_content"
165+
android:layout_height="65dp"
166166
android:layout_gravity="center_vertical"
167167
android:layout_marginStart="16dp"
168168
android:layout_marginEnd="8dp"
169169
android:layout_weight="1"
170170
android:background="@android:color/transparent"
171-
android:ellipsize="middle"
172-
android:ems="10"
171+
android:ems="8"
173172
android:hint="@string/Send.UnstoppableDomains.placeholder"
174173
android:inputType="textPersonName"
175-
android:singleLine="true" />
174+
tools:ignore="TextContrastCheck" />
176175

177176
<com.breadwallet.presenter.customviews.BRButton
178177
android:id="@+id/ud_lookup_button"

0 commit comments

Comments
 (0)