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/PullOperation.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt') diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt index c543f885..436c81bb 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt @@ -4,8 +4,8 @@ */ package com.zeapo.pwdstore.git -import android.app.Activity import android.content.Intent +import androidx.appcompat.app.AppCompatActivity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R import org.eclipse.jgit.api.Git @@ -18,7 +18,7 @@ import java.io.File * @param fileDir the git working tree directory * @param callingActivity the calling activity */ -class PullOperation(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) { +class PullOperation(fileDir: File, callingActivity: AppCompatActivity) : GitOperation(fileDir, callingActivity) { /** * Sets the command -- cgit v1.2.3