Skip to content

IntentService extending fails at runtime when service is started #1426

@vmutafov

Description

@vmutafov

If a user extends an IntentService and does not implement the onCreate method explicitly, an internal implementation is generated by the SBG for the onCreate method (used for NS runtime initialization cases). This generated method, however, does not make a call to super.onCreate() which makes the instance of the newly generated service be incorrectly initialized by the Android runtime and crash when it's used.
There should be a call to super.onCreate() in this internal implementation of onCreate and this would remove the runtime crash. However, if the user has provided an implementation of onCreate there should not be a generated call to super.onCreate() because there may be a case where the user does not want this call to be made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions