Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign set password and biometrics #184

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 33 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-parcelize'
apply plugin: 'com.google.dagger.hilt.android'

configurations {
ktlint
Expand Down Expand Up @@ -56,6 +57,12 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.7"
}


compileSdkVersion 34
Expand Down Expand Up @@ -268,6 +275,8 @@ dependencies {
implementation 'org.json:json:20231013'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
implementation 'androidx.compose.ui:ui-android:1.6.6'
implementation 'androidx.navigation:navigation-compose:2.7.7'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1')
Expand Down Expand Up @@ -350,8 +359,31 @@ dependencies {
def lifecycle_version = "2.4.0"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
}

// biometrics
implementation("androidx.biometric:biometric:1.1.0")
// encryption & decryption
implementation("androidx.security:security-crypto:1.1.0-alpha06")

// dependencies for jetpack
implementation("androidx.activity:activity-compose:1.8.2")
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
implementation "com.google.accompanist:accompanist-systemuicontroller:0.27.0"

implementation "com.google.dagger:hilt-android:2.51"
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
kapt 'androidx.hilt:hilt-compiler:1.0.0'
kapt 'com.google.dagger:hilt-android-compiler:2.51'
annotationProcessor("com.google.dagger:hilt-android:2.51")
}

tasks.register("ktlintCheck", JavaExec) {
group = "verification"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import android.util.Log;

import com.breadwallet.BreadApp;
import com.breadwallet.BreadApp_kt;
import com.breadwallet.presenter.activities.BreadActivity;
import com.breadwallet.tools.util.BRCompressor;
import com.breadwallet.tools.util.BRConstants;
import com.breadwallet.tools.util.Utils;
import com.jniwrappers.BRKey;
import com.platform.APIClient;

import org.apache.commons.io.IOUtils;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -31,7 +29,7 @@ public class PlatformTests {
private static final String PROTO = "https";
// host is the server(s) on which the API is hosted
// convenience getter for the API endpoint
private static final String BASE_URL = PROTO + "://" + BreadApp.HOST;
private static final String BASE_URL = PROTO + "://" + BreadApp.Companion.getHOST();
//feePerKb url
private static final String FEE_PER_KB_URL = "/v1/fee-per-kb";
//token
Expand Down
64 changes: 51 additions & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools" >

<uses-sdk
android:minSdkVersion="31"
Expand Down Expand Up @@ -39,8 +39,10 @@
android:name="android.hardware.camera.autofocus"
android:required="false" />

<application xmlns:tools="http://schemas.android.com/tools"
android:name=".BreadApp"
<application
xmlns:tools="http://schemas.android.com/tools"
android:localeConfig="@xml/locales_config"
android:name="com.breadwallet.BreadApp"
android:allowBackup="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"
Expand All @@ -51,24 +53,50 @@
android:theme="@style/AppTheme"
android:windowSoftInputMode="stateVisible|adjustResize"
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"
tools:replace="android:fullBackupContent">
tools:replace="android:fullBackupContent" >
<activity
android:name=".presenter.activities.Example"
android:exported="false" />
<activity
android:name=".presenter.activities.AuthPassCodeActivity"
android:exported="false" />
<activity
android:name=".presenter.activities.AuthPassCodeAndBiometricsActivity"
android:exported="false" />
<activity
android:name=".presenter.activities.SetPinActivity"
android:exported="false" />
<activity
android:name=".presenter.activities.ReEnterPinActivity"
android:exported="false" />
<activity
android:name=".presenter.activities.intro.SetSecurityActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".presenter.activities.AnnounceUpdatesViewActivity"
android:enableOnBackInvokedCallback="true"
android:exported="false"
android:label="Litewallet"
android:enableOnBackInvokedCallback="true"
android:theme="@style/AppTheme" />
<activity
android:name=".presenter.activities.intro.IntroActivity"
android:exported="true"
android:label="Litewallet"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
android:screenOrientation="portrait" >

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- <intent-filter android:autoVerify="true"> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->


<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
<activity
android:name=".presenter.activities.BreadActivity"
Expand All @@ -77,7 +105,7 @@
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustPan">
android:windowSoftInputMode="adjustPan" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand All @@ -95,7 +123,7 @@
android:resource="@xml/searchable" />
</activity>
<activity
android:name=".presenter.activities.SetPinActivity"
android:name=".presenter.activities.SetPinActivity_java"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
Expand All @@ -115,7 +143,7 @@
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name=".presenter.activities.ReEnterPinActivity"
android:name=".presenter.activities.ReEnterPinActivity_java"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
Expand Down Expand Up @@ -230,6 +258,16 @@
android:enabled="true"
android:exported="false"
android:label="SyncReceiver" />
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
android:exported="false"
>
<meta-data
android:name="autoStoreLocales"
android:value="true"
/>
</service>
</application>

</manifest>
Loading