-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π[Release v2.12.4 20241130] Merge into Main (#285)
* π[Release v2.11.1 071024] Merge into Develop (#245) * replaced the control in PeerManager.c Signed-off-by: kcw-grunt <[email protected]> * reverted BRBitcoinAmount Signed-off-by: kcw-grunt <[email protected]> * Cleaning up the files Signed-off-by: kcw-grunt <[email protected]> * Removed Pusher remnants Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> * Added Fiat feature, and FCM for push notifications (#247) * Added fiat feature based on language user chose * added fcm for push notifications * Update PushNotificationService.kt * Added new Icon, removed duplicate fcm library, added in app messaging * Added new Icon, removed duplicate fcm library, added in app messaging * Tech debt/add af sdk (#248) * Recent newline Signed-off-by: kcw-grunt <[email protected]> * AF added Refactored cruft - AF working Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> * Techdebt/refactor brevents syncmarkers (#254) * Tech debt/add af sdk (#248) - AF working - Changed requiredActivity - Added analytics error report - test this.Activity is null or not - Bugfix - Phrase Reminder crash - added an exception handler for UserNotAuthenticatedException. - note: this should allow for the system to display the native authorization UI when needed - fixes issue - https://console.firebase.google.com/u/0/project/litewallet-beta/crashlytics/app/android:com.loafwallet/issues/09dac17241309f0e823ef597a9a82cd4 - Added dev note - remove calls to BREventManager - removed BREventManager - renamed error message - fixed Firebase Analytics event error Signed-off-by: kcw-grunt <[email protected]> * version bump update gitignore Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> * Techdebt/ fixed send issue add syncing measurements (#255) * removed unused BRSharedPreferences Signed-off-by: kcw-grunt <[email protected]> * started commenting out more Timber Signed-off-by: kcw-grunt <[email protected]> * Added more shared preferences for syncing Signed-off-by: kcw-grunt <[email protected]> * Commented out many verbose Timber logs Signed-off-by: kcw-grunt <[email protected]> * WIP Still trying to figure out the eplased time and last and start timestampsβ¦??? I dunno Signed-off-by: kcw-grunt <[email protected]> * Moved sync measurment into the method calls Signed-off-by: kcw-grunt <[email protected]> * Debugged the install issue with send - Moved all the measurements in new methods - recalculated measure points - Added analytics - event did_complete_sync was shown! - adding a dummy file to make sure file system is set ||||WIP still verifying the JSON is present - added a blockheight label - changed the sleep time (a hack to allow the device time to refresh the view) to 100 ms from 500ms!! -WIP Why is the bundle not showing on time Signed-off-by: kcw-grunt <[email protected]> * replaces afID to first location Signed-off-by: kcw-grunt <[email protected]> * Removed redundant sync measurements Signed-off-by: kcw-grunt <[email protected]> * code bump Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> * Techdebt/test refactor cruft removal (#250) * Removed non english seed words -Refactor tests - Reset AnalyticsTests Signed-off-by: kcw-grunt <[email protected]> * Rename Bitcoinletter to Litecoinletters -added tests testLitecoinSymbolConstants testAppExternalURLConstants testFirebaseAnalyticsConstants Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> * fix: [#152] make sure using Fragment, FragmentManager and FragmentTransaction from androidx (#260) * fix: [#126] the issue came from FragmentBalanceSeedReminder.fetchSeedPhrase, so we just wrap with runCatching for now to avoid crash (#263) * fix: [#264] add null checking for BRKeyStore.removeAliasAndFiles (#270) * fix: [#265] add null checking, migrate viewpageβ¦ (#271) * fix: [WIP][#265] work in progress add null checking, migrate viewpager to viewpager2 and more * fix: [#265] finalize migration some deprecated class and implement null checking at FragmentTransactionItem * fix: dix dismiss outside FragmentTransactionDetails * π[Release v2.12.2 20241118] Merge into Develop (#272) * π[Release v2.11.1 071024] Merge into Main (#246) * replaced the control in PeerManager.c Signed-off-by: kcw-grunt <[email protected]> * reverted BRBitcoinAmount Signed-off-by: kcw-grunt <[email protected]> * Cleaning up the files Signed-off-by: kcw-grunt <[email protected]> * Removed Pusher remnants Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> * version bump Signed-off-by: kcw-grunt <[email protected]> * Removed donation button removed xml removed fragments removed references of the donation removed analytical events Signed-off-by: kcw-grunt <[email protected]> * fix: prevent activity close * code bump Signed-off-by: kcw-grunt <[email protected]> * enabled for Debug Signed-off-by: kcw-grunt <[email protected]> * fix: [#264] add null checking for BRKeyStore.removeAliasAndFiles (#270) * fix: [#265] add null checking, migrate viewpageβ¦ (#271) * fix: [WIP][#265] work in progress add null checking, migrate viewpager to viewpager2 and more * fix: [#265] finalize migration some deprecated class and implement null checking at FragmentTransactionItem * fix: dix dismiss outside FragmentTransactionDetails * code bump Signed-off-by: kcw-grunt <[email protected]> * version bump Signed-off-by: kcw-grunt <[email protected]> --------- Signed-off-by: kcw-grunt <[email protected]> Co-authored-by: andhikayuana <[email protected]> * revert minSDkVersion to 29 (#276) Signed-off-by: kcw-grunt <[email protected]> * fix: [#258] avoid OOM with cache the result of opsAll, previously called multiple times at onBindViewHolder (#277) * fix: [#258] avoid OOM with cache the result of opsAll, previously called multiple times at onBindViewHolder * chore: [#258] cleanup comment * fix: [#266] add null checking and default value based on iOS since getCurrency can produce null (#278) * fix: [#266] add null checking and default value based on iOS since getCurrency can produce null * chore: [#266] cleanup comment * fix: [#274] fixing locale on android 14 and setup test using junit & mockk (#282) * chore: [#274] initial setup test using JUnit & MockK * chore: [#274] add more test case at LocaleHelperTest * fix: [#274] fix default language from shared preferences * fix: [#274] disable language split on AAB * chore: [#274] rename method * bumped version and code * compiled the env (#284) please check @andhikayuana @josikie that you are able to compile * Users complained that recyclerView was setting to the wrong language - Polished to index to a language - bump code * chore: [#126] simplify exception handling at BRKeyStore._getData and record exception to Firebase Crashlytics (#283) --------- Signed-off-by: kcw-grunt <[email protected]> Co-authored-by: Josi Kie <[email protected]> Co-authored-by: Andhika Yuana <[email protected]>
- Loading branch information
1 parent
dcb363e
commit 893649d
Showing
15 changed files
with
379 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/src/test/java/com/breadwallet/tools/util/LocaleHelperTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.breadwallet.tools.util | ||
|
||
import android.content.Context | ||
import com.breadwallet.entities.Language | ||
import io.mockk.mockk | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Assert.assertFalse | ||
import org.junit.Assert.assertTrue | ||
import org.junit.Test | ||
|
||
class LocaleHelperTest { | ||
|
||
@Test | ||
fun `given LocaleHelper instance, then should validate default value`() { | ||
val context: Context = mockk(relaxed = true) | ||
|
||
LocaleHelper.init(context) | ||
|
||
val currentLocale = LocaleHelper.instance.currentLocale | ||
|
||
assertTrue(currentLocale == Language.ENGLISH) | ||
assertEquals("en", currentLocale.code) | ||
assertEquals("English", currentLocale.title) | ||
assertEquals("Select language", currentLocale.desc) | ||
} | ||
|
||
@Test | ||
fun `getLocale invoked, should return Locale object`() { | ||
val localeIndonesian = LocaleHelper.getLocale(Language.INDONESIAN) | ||
|
||
assertEquals("id", localeIndonesian.language) | ||
|
||
val localeChineseSimplified = LocaleHelper.getLocale(Language.CHINESE_SIMPLIFIED) | ||
|
||
assertEquals("zh", localeChineseSimplified.language) | ||
assertEquals("CN", localeChineseSimplified.country) | ||
} | ||
|
||
@Test | ||
fun `setLocaleIfNeeded invoked, should update current locale`() { | ||
val context: Context = mockk(relaxed = true) | ||
LocaleHelper.init(context) | ||
|
||
val currentLocale = LocaleHelper.instance.currentLocale | ||
assertTrue(currentLocale == Language.ENGLISH) | ||
|
||
var changed = LocaleHelper.instance.setLocaleIfNeeded(Language.INDONESIAN) | ||
assertTrue(changed) | ||
|
||
changed = LocaleHelper.instance.setLocaleIfNeeded(Language.INDONESIAN) | ||
assertFalse(changed) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.