Skip to content

Commit

Permalink
Share option and brute force protection
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishksahu committed Apr 20, 2024
1 parent 86f4f71 commit 41f1b92
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 11 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
Binary file added app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file added app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
23 changes: 20 additions & 3 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,27 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 20,
"versionName": "1.4.6",
"versionCode": 22,
"versionName": "1.4.8",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/app-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/app-release.dm"
]
}
],
"minSdkVersionForDexing": 29
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.appcompat.content.res.AppCompatResources
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.text.isDigitsOnly
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.appbar.MaterialToolbar
Expand Down Expand Up @@ -485,8 +484,7 @@ class MainActivity : AppCompatActivity(), ItemClickListener, FolderClickListener
.setView(changePinLayout)
.setPositiveButton(getString(R.string.ok)) { _, _ ->

if (currentPinEditText.text.toString().isDigitsOnly() &&
currentPinEditText.text.toString() == EncPref.getString(
if (currentPinEditText.text.toString() == EncPref.getString(
Constants.HARD_PIN,
applicationContext
)
Expand All @@ -495,6 +493,10 @@ class MainActivity : AppCompatActivity(), ItemClickListener, FolderClickListener
// clear pin from shared prefs and reset enrollment status
EncPref.clearString(Constants.HARD_PIN, applicationContext)
EncPref.clearBoolean(Constants.HARD_PIN_SET, applicationContext)
sharedPref.edit()
.putBoolean(Constants.USE_BIOMETRIC, false)
.putBoolean(Constants.USE_BIOMETRIC_BCKP, false)
.apply()

// restart application to set pin again
finish()
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/change_pin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?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">

Expand All @@ -13,12 +14,13 @@
android:autofillHints="@string/current_pin"
android:ems="10"
android:hint="@string/current_pin"
android:inputType="numberPassword"
android:inputType="textPassword"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
tools:ignore="TextFields" />

</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.3.1' apply false
id 'com.android.library' version '8.3.1' apply false
id 'com.android.application' version '8.3.2' apply false
id 'com.android.library' version '8.3.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/22.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Share files with other apps
* Multiple failed password attempts protection
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 @@
#Sat Apr 20 11:27:52 IST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=4159b938ec734a8388ce03f52aa8f3c7ed0d31f5438622545de4f83a89b79788
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 41f1b92

Please sign in to comment.