Fixing memory leak in WallpaperCropActivity

issue: 15516788
Change-Id: I53a312addbb7ce17ecf02b2f14b9e991eab42be9
This commit is contained in:
Sunny Goyal
2014-07-22 16:56:46 -07:00
parent d73aa15516
commit fabf1f23d6

View File

@@ -133,6 +133,14 @@ public class WallpaperCropActivity extends Activity {
setCropViewTileSource(bitmapSource, true, false, onLoad);
}
@Override
protected void onDestroy() {
if (mCropView != null) {
mCropView.destroy();
}
super.onDestroy();
}
public void setCropViewTileSource(
final BitmapRegionTileSource.BitmapSource bitmapSource, final boolean touchEnabled,
final boolean moveToLeft, final Runnable postExecute) {