Skip to content

Crash when asking for permission #103

Description

@felipecs81

Hi Araujo, thank you for providing this great library.
At the moment I am having a random issue when trying to ask for permission. Not sure how to reproduce it because doesn't happen always.

Describe the bug
Crash with some devices

To Reproduce
Not sure

Expected behavior
Open dialog asking the user for permission

Smartphone (please complete the following information):

  • Device: Motorola edge 20 fusion (maybe other devices too)
  • OS: Android
  • Version 11

Additional context
Error details:

Fatal Exception: java.lang.IllegalArgumentException: Unknown color
at android.graphics.Color.parseColor(Color.java:1400)
at com.araujo.jordan.excuseme.utils.DesignUtils$Companion.resolveColor(DesignUtils.kt:54)
at com.araujo.jordan.excuseme.view.dialog.PosPermissionDialog.showDialogForPermission(PosPermissionDialog.kt:88)
at com.araujo.jordan.excuseme.view.InvisibleActivity.posPermission(InvisibleActivity.kt:113)
at com.araujo.jordan.excuseme.view.InvisibleActivity$onRequestPermissionsResult$1.invokeSuspend(InvisibleActivity.kt:69)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
at kotlinx.coroutines.BuildersKt.launch(:1)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
at kotlinx.coroutines.BuildersKt.launch$default(:1)
at com.araujo.jordan.excuseme.view.InvisibleActivity.onRequestPermissionsResult(InvisibleActivity.kt:68)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:8580)
at android.app.Activity.dispatchActivityResult(Activity.java:8428)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5118)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5166)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2143)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:250)
at android.app.ActivityThread.main(ActivityThread.java:7868)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions