diff options
author | Garfield Tan <xutan@google.com> | 2020-06-05 17:53:09 -0700 |
---|---|---|
committer | Garfield Tan <xutan@google.com> | 2020-06-08 17:22:38 -0700 |
commit | cbf1e41fecded6c70cbbed2c4312facc5a4ab2ae (patch) | |
tree | 7e46519cc50bb2e62506c0dc0885ae5f953376b5 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | a621dad0b63a219fa47b2cbf7158930569502947 (diff) |
Move HapticSettingObserver to companion object.
MagnetizedObject used to register setting observer for each instance,
but it's never unregistered. MagnetizedObject doesn't have explicit
lifecycle calls, so there isn't a good place to unregister the observer.
Without unregistration MagnetizedObject will always be referenced by a
JNI global reference so that it can be called when the remote calls it.
It's not necessary to have an observer per instance, so let's do it in
the companion object instead then we don't need to worry about
unregistering it because it's long standing.
Bug: 149918957
Test: MagnetizedObject isn't referenced by any JNI global references.
Test: Device still vibrates when bubble stack is attracted by the
removal place when settings is on, and doesn't vibrate when settings is
off.
Change-Id: Ie9719baa3ff76bd08180b9ab32662eb1ca43de3a
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions