Android - Fix task implementations

Description

The Task implementations catch exceptions internally and return null in that case, so that they can call handle() explicitly, thus not requiring the overriding of the onException() callback. However, the client code doesn't expect or handle null responses.

A simple fix would be to simply change the implementation to not catch exceptions, and handle them in onException() instead, with the requirement that the client code will call through to the super implementation.

Or we can simply switch to a Loader implementation which will provide a generic and centralized implementation, and fix many other deficiencies in the current implementation (e.g. lack of cancellation guarantees), and also add automatic management alongside the UI lifecycle and retention across Activity restarts.

Steps to Reproduce

None

Reason for Variance

None

Release Notes

None

Customer Problem Statement

None

Status

Assignee

Mirza Mubashar Baig

Reporter

IbraheemZ

Labels

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Sub-Team(s)

None

Reach

None

Impact

None

Open edX Discourse Thread

None

Story Points

1

Epic Link

Sprint

None

Priority

CAT-1
Configure