Make commitChange honor finishWithResultOnEnd (#815)
If PasswordRepository.isGitRepo() returns false, commitChange currently doesn't honor the finishWithResultOnEnd parameter, which causes Autofill generate flows to hang on a blank AutofillSaveActivity. This commit lets commitChange mimic what GitAsyncTask does with the parameter. Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
2428d4c0de
commit
cd0b23e003
1 changed files with 7 additions and 1 deletions
|
@ -839,7 +839,13 @@ class PasswordStore : AppCompatActivity() {
|
|||
private const val PREFERENCE_SEEN_AUTOFILL_ONBOARDING = "seen_autofill_onboarding"
|
||||
|
||||
fun commitChange(activity: Activity, message: String, finishWithResultOnEnd: Intent? = null) {
|
||||
if (!PasswordRepository.isGitRepo()) return
|
||||
if (!PasswordRepository.isGitRepo()) {
|
||||
if (finishWithResultOnEnd != null) {
|
||||
activity.setResult(Activity.RESULT_OK, finishWithResultOnEnd)
|
||||
activity.finish()
|
||||
}
|
||||
return
|
||||
}
|
||||
object : GitOperation(getRepositoryDirectory(activity), activity) {
|
||||
override fun execute() {
|
||||
tag(TAG).d { "Committing with message $message" }
|
||||
|
|
Loading…
Reference in a new issue