[#706] Fix crashes identified by robo tests

* [#706] Fix crashes identified by robo tests

- Removed unused xml layouts
- Fixed several xml attributes to be backward compatible

* Reduce number of unnecessary logs in console

* Bump min Android SDK version from 19 to 21

* Bump demo-app minSdk to version 21 too

* Update changelog

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
This commit is contained in:
Honza Rychnovsky 2022-10-04 16:27:09 +02:00 committed by GitHub
parent 8ddadf524f
commit 9614a63f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 18 additions and 87 deletions

View File

@ -1,6 +1,11 @@
Change Log
==========
Version 1.9.0-beta05
------------------------------------
- The minimum version of Android supported is now API 21
- Fixed R8/ProGuard consumer rule, which eliminates a runtime crash for minified apps
Version 1.9.0-beta04
------------------------------------
- The SDK now stores sapling param files in `no_backup/co.electricoin.zcash` folder instead of the `cache/params`

View File

@ -12,7 +12,7 @@ android {
defaultConfig {
applicationId = "cash.z.ecc.android.sdk.demoapp"
minSdk = 19
minSdk = 21
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
@ -104,8 +104,8 @@ dependencies {
}
fladle {
// Firebase Test Lab has min and max values that might differ from our project's
// These are determined by `gcloud firebase test android models list`
// Firebase Test Lab has min and max values that might differ from our project's
// These are determined by `gcloud firebase test android models list`
@Suppress("MagicNumber", "PropertyName", "VariableNaming")
val FIREBASE_TEST_LAB_MIN_API = 19

View File

@ -156,12 +156,12 @@ class MainActivity :
/* DrawerListener implementation */
@Suppress("EmptyFunctionBlock")
override fun onDrawerStateChanged(newState: Int) {
twig("Drawer state changed to: $newState.")
}
@Suppress("EmptyFunctionBlock")
override fun onDrawerSlide(drawerView: View, slideOffset: Float) {
twig("Drawer slides with offset: $slideOffset.")
}
override fun onDrawerClosed(drawerView: View) {

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="cash.z.ecc.android.sdk.demoapp.demos.gallery.GalleryFragment">
<TextView
android:id="@+id/text_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -33,7 +33,7 @@
android:id="@+id/text_layout_end_height"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/button_apply"
app:layout_constraintHorizontal_chainStyle="packed"
@ -57,7 +57,7 @@
android:id="@+id/button_apply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:text="apply"
app:layout_constraintBottom_toBottomOf="@id/text_layout_end_height"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -11,8 +11,8 @@
android:id="@+id/text_seed_phrase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_baseline_edit_24"
android:drawableTint="@color/colorPrimary"
app:drawableEndCompat="@drawable/ic_baseline_edit_24"
app:drawableTint="@color/colorPrimary"
android:drawablePadding="12dp"
android:padding="24dp"
android:text="Seed phrase set to: apple...fish"

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="cash.z.ecc.android.sdk.demoapp.demos.home.HomeSecondFragment">
<TextView
android:id="@+id/textview_home_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/button_home_second"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button_home_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/previous"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textview_home_second" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -29,7 +29,7 @@
android:id="@+id/text_layout_end_height"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/text_layout_start_height"

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="cash.z.ecc.android.sdk.demoapp.demos.slideshow.SlideshowFragment">
<TextView
android:id="@+id/text_slideshow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -60,7 +60,7 @@ ZCASH_RELEASE_KEY_ALIAS=
ZCASH_RELEASE_KEY_ALIAS_PASSWORD=
# Versions
ANDROID_MIN_SDK_VERSION=19
ANDROID_MIN_SDK_VERSION=21
ANDROID_TARGET_SDK_VERSION=33
ANDROID_COMPILE_SDK_VERSION=33

View File

@ -9,6 +9,8 @@
io.grpc.okhttp.OkHttpChannelBuilder sslSocketFactory(javax.net.ssl.SSLSocketFactory);
io.grpc.okhttp.OkHttpChannelBuilder transportExecutor(java.util.concurrent.Executor);
}
# gRPC related - https://github.com/grpc/grpc-java/issues/6612
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
# Prevent OKHttp from causing warnings for consumers of the SDK
-dontwarn org.bouncycastle.jsse.BCSSLParameters