DescriptionRefactor handleMessage() functionality in fullscreen
to static inner class to avoid HandlerLeak lint warnings
The following HandlerLeak lint warnings are reported that are legitimate:
(1) org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
This Handler class should be static or leaks might occur
(org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager.2):
HandlerLeak [warning]
(2) org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java
This Handler class should be static or leaks might occur
(org.chromium.chrome.browser.fullscreen.FullscreenHtmlApiHandler.1):
HandlerLeak [warning]
The above warnings needs to fixed as the references to Handler class
might prevent outer class from getting garbage collected.
Making static inner class do not hold an implicit reference to the outer
class and hence this problem can be avoided. The same is also done for other
classes eg: TapGestureDetector.
BUG=None.
Committed: https://crrev.com/640ca0b5920679e4d0e8e8d53251e757d148e540
Cr-Commit-Position: refs/heads/master@{#311226}
Patch Set 1 #
Total comments: 4
Patch Set 2 : review comments incorporated #
Messages
Total messages: 18 (4 generated)
|