summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorMathias Jeppsson <mathias.jeppsson@sonymobile.com>2013-08-06 11:41:55 +0200
committerJohan Redestig <johan.redestig@sonymobile.com>2014-11-07 07:02:50 +0000
commit2d2d8c28545c687dbb105006ef4554eac8480313 (patch)
tree636702ce9d242a6c1b52768b24fd45d0a85e8302 /rs/java/android/renderscript/RenderScript.java
parent59701b9ba5c453e327bc0e6873a9f6ff87a10391 (diff)
Dont call close in in BluetoothA2dp finalize
The close in finalize() is pointless, as finalize() will only be called if there are no references to BluetoothA2dp. Until close() is called, BluetoothManagerService will have a reference to BluetoothA2dp, preventing garbage collection and finalize() to be called. This means finalize() is not serving its purpose of cleaning up in cases close() is not called, as finalize() is only called if close() has already been called. Actually calling close in finalize here means unregistering the already unregistered mBluetoothStateChangeCallback which can lead to crashes when pairing/unpairing BTH. A typical crash would look like: *** FATAL EXCEPTION IN SYSTEM PROCESS: BluetoothManager java.lang.NullPointerException at android.os.RemoteCallbackList.unregister(RemoteCallbackList.java:143) at com.android.server.BluetoothManagerService$BluetoothHandler.handleMessage(BluetoothManagerService.java:780) at android.os.Handler.dispatchMessage(Handler.java:99) Change-Id: Ib65962917ecbacf7900d7fe540057e6915f0532d
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
0 files changed, 0 insertions, 0 deletions