Skip to content

Handle getLast/onRetainNonConfigurationInstance via bytecode transformation #16

Open

Description

@sblackshear

The programmer can save state across instances of an Activity by returning the desired object in onRetainNonConfigurationInstance and can retrieve the saved state by calling getLastNonConfigurationInstance. The mechanism for saving this state inside the Android library is quite complicated, but we could model this saving mechanism in a simple way using a special static field that is written in onRetainNonConfigurationInstance and read instead of calling getLastNonConfigurationInstance. We should add an automated bytecode instrumentation pass that implements this transformation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions