Skip to content

Commit 644e2d8

Browse files
committed
- QuickPass 2.0 beta 1
- All new main screen -- Smooth panel for all passwords - Optimization for some constructions - Fixes - Libraries updated (10/10/20)
1 parent 7bf6b75 commit 644e2d8

20 files changed

+1161
-793
lines changed

.idea/codeStyles/Project.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.mikhailgrigorev.quickpass"
1111
minSdkVersion 23
1212
targetSdkVersion 29
13-
versionCode 1
14-
versionName "1.0"
13+
versionCode 2
14+
versionName "2.0"
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}
@@ -27,16 +27,16 @@ android {
2727
dependencies {
2828
implementation fileTree(dir: "libs", include: ["*.jar"])
2929
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
30-
implementation 'androidx.core:core-ktx:1.3.0'
30+
implementation 'androidx.core:core-ktx:1.3.2'
3131
implementation 'android.arch.work:work-runtime-ktx:1.0.1'
32-
implementation 'androidx.appcompat:appcompat:1.1.0'
33-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
32+
implementation 'androidx.appcompat:appcompat:1.2.0'
33+
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
3434
implementation 'androidx.biometric:biometric:1.0.1'
35-
implementation 'com.google.android.material:material:1.1.0'
35+
implementation 'com.google.android.material:material:1.2.1'
3636
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
3737
implementation 'androidx.preference:preference:1.1.1'
38-
testImplementation 'junit:junit:4.12'
39-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
40-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
38+
testImplementation 'junit:junit:4.13'
39+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
40+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
4141

4242
}

app/src/main/java/com/mikhailgrigorev/quickpass/MyAutofillService.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import android.os.CancellationSignal
1010
import android.service.autofill.*
1111
import android.view.autofill.AutofillValue
1212
import android.widget.RemoteViews
13-
import android.widget.Toast
1413
import androidx.annotation.RequiresApi
15-
import com.google.android.material.chip.Chip
1614
import java.util.*
1715
import kotlin.collections.ArrayList
1816

@@ -114,13 +112,13 @@ class MyAutofillService : AutofillService() {
114112

115113
var i = 0
116114

117-
val remoteView = RemoteViews(packageName, R.layout.autofill_suggestion)
115+
var remoteView = RemoteViews(packageName, R.layout.autofill_suggestion)
118116
remoteView.setTextViewText(R.id.suggestion_item, "Random")
119117
for (name in names){
120118
name.split("\\s".toRegex()).forEach { partName ->
121119
if ((partName.toLowerCase(Locale.ROOT).contains(appName.toLowerCase(Locale.ROOT))) or
122120
(appName.toLowerCase(Locale.ROOT).contains(partName.toLowerCase(Locale.ROOT)))){
123-
val remoteView = RemoteViews(packageName, R.layout.autofill_suggestion)
121+
remoteView = RemoteViews(packageName, R.layout.autofill_suggestion)
124122
remoteView.setTextViewText(R.id.suggestion_item, passwords[i])
125123
dataSets.add(Dataset.Builder(remoteView).setValue(
126124
passFields[0]?.autofillId!!,
@@ -186,7 +184,4 @@ class MyAutofillService : AutofillService() {
186184
override fun onSaveRequest(request: SaveRequest, callback: SaveCallback) {
187185
}
188186

189-
private fun toast(message:String)=
190-
Toast.makeText(this,message, Toast.LENGTH_SHORT).show()
191-
192187
}

app/src/main/java/com/mikhailgrigorev/quickpass/PassGenActivity.kt

Lines changed: 633 additions & 393 deletions
Large diffs are not rendered by default.

app/src/main/java/com/mikhailgrigorev/quickpass/PasswordManager.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ class PasswordManager {
5353
val monthCurrent = c.get(Calendar.MONTH)
5454
val dayCurrent = c.get(Calendar.DAY_OF_MONTH)
5555

56-
return if(yearCurrent > year)
57-
true
58-
else if(monthCurrent > month + 4)
59-
true
60-
else (monthCurrent > month + 3) && (dayCurrent > day)
56+
return when {
57+
yearCurrent > year -> true
58+
monthCurrent > month + 4 -> true
59+
else -> (monthCurrent > month + 3) && (dayCurrent > day)
60+
}
6161
}
6262

6363
fun evaluatePassword(passwordToTest: String) : Float {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- drawable/emoticon_wink_outline.xml -->
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:height="24dp"
4+
android:width="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path android:fillColor="#000" android:pathData="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,17.23C10.25,17.23 8.71,16.5 7.81,15.42L9.23,14C9.68,14.72 10.75,15.23 12,15.23C13.25,15.23 14.32,14.72 14.77,14L16.19,15.42C15.29,16.5 13.75,17.23 12,17.23M17,10H13V9H17V10Z" />
8+
</vector>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- drawable/menu_up_outline.xml -->
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:height="24dp"
4+
android:width="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path android:fillColor="#000" android:pathData="M18,16V14.5L12,8.5L6,14.5V16H18M12,11.33L14.67,14H9.33L12,11.33Z" />
8+
</vector>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@
106106
android:layout_gravity="center"
107107
android:layout_margin="10dp"
108108
android:contentDescription="@string/telegram"
109-
android:tint="@color/black"
110-
app:srcCompat="@drawable/github" />
109+
app:srcCompat="@drawable/github"
110+
app:tint="@color/black" />
111111
</LinearLayout>
112112

113113
</androidx.cardview.widget.CardView>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@
182182
android:layout_height="wrap_content"
183183
android:contentDescription="@string/edit"
184184
android:padding="10dp"
185-
android:tint="@color/black"
186-
app:srcCompat="@drawable/pencil_outline" />
185+
app:srcCompat="@drawable/pencil_outline"
186+
app:tint="@color/black" />
187187
</androidx.cardview.widget.CardView>
188188

189189
<androidx.cardview.widget.CardView

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@
132132
android:layout_height="20dp"
133133
android:layout_marginStart="20dp"
134134
android:contentDescription="@string/edit"
135-
android:tint="@color/black"
136135
app:layout_constraintBottom_toBottomOf="@+id/helloTextId"
137136
app:layout_constraintStart_toStartOf="parent"
138137
app:layout_constraintTop_toTopOf="@+id/helloTextId"
139-
app:srcCompat="@drawable/pencil_outline" />
138+
app:srcCompat="@drawable/pencil_outline"
139+
app:tint="@color/black" />
140140

141141
<HorizontalScrollView
142142
android:id="@+id/horizontalScroll"
@@ -326,7 +326,7 @@
326326
android:hint="@string/add_keywords" />
327327
</com.google.android.material.textfield.TextInputLayout>
328328

329-
<Switch
329+
<com.google.android.material.switchmaterial.SwitchMaterial
330330
android:id="@+id/emailSwitch"
331331
android:layout_width="0dp"
332332
android:layout_height="wrap_content"
@@ -374,8 +374,8 @@
374374
app:layout_constraintStart_toStartOf="parent"
375375
app:layout_constraintTop_toTopOf="@+id/passQualityText"
376376
app:srcCompat="@drawable/circle_double"
377-
android:tint="@color/black"
378-
android:contentDescription="@string/no_text" />
377+
android:contentDescription="@string/no_text"
378+
app:tint="@color/black" />
379379

380380

381381
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)