Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

No countermeasure for Activity recreation when the screen rotates #17

@BoxResin

Description

@BoxResin

I found a trivial bug. rx and coroutine packages are affected by this.

Scenario

  1. A Activity starts B Activity.
  2. Rotate the screen in B Activity.
  3. Tap the back button in B Activity.
  4. A Activity will lost the activity result from B Activity.

Activitys are recreated when the screen rotates as we know. Starting another Activity is also the case. If B Activity has been rotated, then A Activity get recreated.(It's deferred until B Activity is finished) In this case, A Activity calling startActivityForResult() never get callback for onActivityResult(). (It would be called in another instance of A Activity).

I attach a video that actually reproduces the bug.

device-2021-01-15-021348.mp4

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