MtpClient: remove finalize override to avoid multiple calls to unregisterReceiver
BUG: 3497801
Change-Id: I4ed0166efcc509a18361287c5816bc4844089025
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/media/java/android/mtp/MtpClient.java b/media/java/android/mtp/MtpClient.java
index 6c8b228..c4ee19e 100644
--- a/media/java/android/mtp/MtpClient.java
+++ b/media/java/android/mtp/MtpClient.java
@@ -163,15 +163,6 @@
mContext.unregisterReceiver(mUsbReceiver);
}
- @Override
- protected void finalize() throws Throwable {
- try {
- close();
- } finally {
- super.finalize();
- }
- }
-
/**
* Registers a {@link android.mtp.MtpClient.Listener} interface to receive
* notifications when MTP or PTP devices are added or removed.