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/BaseGitActivity.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt') diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt index ae2bbc07..341bd3fd 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt @@ -4,7 +4,6 @@ */ package com.zeapo.pwdstore.git -import android.app.Activity import android.content.Intent import android.content.SharedPreferences import android.os.Bundle @@ -167,7 +166,7 @@ abstract class BaseGitActivity : AppCompatActivity() { */ fun launchGitOperation(operation: Int) { if (url == null) { - setResult(Activity.RESULT_CANCELED) + setResult(RESULT_CANCELED) finish() return } -- cgit v1.2.3