summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-07-05 15:23:15 +0530
committerHarsh Shandilya <msfjarvis@gmail.com>2019-07-05 15:23:15 +0530
commitc6363dc86da4a24efe45cc85e826f428f8a5255a (patch)
tree708776118069b3e903ac3d00e06602ea4548d786 /app/src
parent4207bfe2de9b88936c26031c8eb429eba641c6ba (diff)
AutofillFragment: Repair semantics for newest AppCompat changes
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.kt
index aa1c329b..3e939b26 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.kt
@@ -124,7 +124,7 @@ class AutofillFragment : DialogFragment() {
val positiveButton = ad.getButton(Dialog.BUTTON_POSITIVE)
positiveButton.setOnClickListener {
val callingActivity = requireActivity() as AutofillPreferenceActivity
- val dialog = dialog
+ val dialog = requireDialog()
val args = requireNotNull(arguments)
val prefs: SharedPreferences = if (!isWeb) {
@@ -199,8 +199,8 @@ class AutofillFragment : DialogFragment() {
}
}
- override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
- if (resultCode == AppCompatActivity.RESULT_OK) {
+ override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
+ if (resultCode == AppCompatActivity.RESULT_OK && data != null) {
adapter!!.add(data.getStringExtra("path"))
}
}