Make mScreenshotController final and @NonNull
Simplifies the code by removing the need to null check altogether. Until the service is onDestroy()'d, it should be capable of handling requests, since it may be rebound before this. Nulling the field in onDestroy is also unneccesary. Making the field final removes the risk of NPE entirely. Note: this also allows mScreenshot.onDestroy() to actually be called, as is this is never executed. (This was part of my change introduced in commit b283231) Test: manual; Take screenshots, dismiss and immediately take another Test: monkey test, see bug Fix: 242881882 Change-Id: I2a25fd4311f2fc7d5802a5d2a9bd8af64f845868
Loading
Please register or sign in to comment