From 25b426157417c97c61c3d2cc0d9fa556f337f22d Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 3 Jul 2020 12:54:06 +0530 Subject: Migrate to ActivityResultContracts (#910) * Move git directory selection to ActivityResultContracts Signed-off-by: Harsh Shandilya * global: replace all android.app.Activity references Signed-off-by: Harsh Shandilya * res: resolve ObsoleteSdkInt lint warning Signed-off-by: Harsh Shandilya * layout: silence some overdraw warnings Signed-off-by: Harsh Shandilya * PasswordFragment: address deprecation Signed-off-by: Harsh Shandilya * PasswordStore: start addressing deprecation warnings Signed-off-by: Harsh Shandilya * autofill: silence deprecation warnings for legacy implementation I don't want to ever touch these files Signed-off-by: Harsh Shandilya * Reset scrollTarget after use Signed-off-by: Harsh Shandilya * Refresh password list after each swipe Signed-off-by: Harsh Shandilya * Convert if to when Signed-off-by: Harsh Shandilya * Migrate UserPreference to ActivityResultContracts Signed-off-by: Harsh Shandilya * Also validate result in git directory selection Signed-off-by: Harsh Shandilya * AutofillSaveActivity: Switch to ActivityResultContracts Signed-off-by: Harsh Shandilya * AutofillDecryptActivity: Switch to ActivityResultContracts Signed-off-by: Harsh Shandilya * AutofillFilterActivity: Switch to ActivityResultContracts Signed-off-by: Harsh Shandilya * Improve deletion flow - Silently delete empty directory - Always refresh password list upon completion Signed-off-by: Harsh Shandilya * Uniform naming for activity result handlers Signed-off-by: Harsh Shandilya Co-authored-by: Fabian Henneke --- app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt') diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt b/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt index 8533187f..6a3fdfd5 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt @@ -4,7 +4,7 @@ */ package com.zeapo.pwdstore.git -import android.app.Activity +import androidx.appcompat.app.AppCompatActivity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R import org.eclipse.jgit.api.Git @@ -13,7 +13,7 @@ import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.api.RebaseCommand import java.io.File -class BreakOutOfDetached(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) { +class BreakOutOfDetached(fileDir: File, callingActivity: AppCompatActivity) : GitOperation(fileDir, callingActivity) { private lateinit var commands: List> /** -- cgit v1.2.3