Fix the momery leak in DrawOverlayDetails

https://code.google.com/p/android/issues/detail?id=210852

we need to release the mOverlayBridge in onDestroy, or it will cause Memory Leak issue
Signed-off-by: 宋凯伦 <songkailun@xiaomi.com>

Change-Id: If0113ed72773c366596a2c915ec504c1c68fe3b7
This commit is contained in:
宋凯伦
2016-05-23 12:02:52 +08:00
committed by Jason Monk
parent 91f6b496a9
commit 4feb4d9a8b

View File

@@ -93,6 +93,12 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc
.setAction(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
}
@Override
public void onDestroy() {
super.onDestroy();
mOverlayBridge.release();
}
@Override
public boolean onPreferenceClick(Preference preference) {
if (preference == mOverlayPrefs) {