From d9382f59bf8e25c68085f162cd808abed4a6c723 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 8 Oct 2020 00:14:51 -0700 Subject: [PATCH] Fix logical error --- .../main/java/com/topjohnwu/magisk/core/base/BaseActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/base/BaseActivity.kt b/app/src/main/java/com/topjohnwu/magisk/core/base/BaseActivity.kt index 17c974525..1a121bbc1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/base/BaseActivity.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/base/BaseActivity.kt @@ -52,7 +52,7 @@ abstract class BaseActivity : AppCompatActivity() { var requestCode: Int do { requestCode = Random.nextInt(Const.ID.MAX_ACTIVITY_RESULT + 1, 1 shl 15) - } while (!resultCallbacks.containsKey(requestCode)) + } while (resultCallbacks.containsKey(requestCode)) resultCallbacks[requestCode] = { result, _ -> if (result > 0) request.onSuccess()