From 3f9c971e761222dc9fb4e5866f81c5f7a3348992 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Fri, 31 Oct 2014 11:48:25 -0700 Subject: Adding a couple memory optimizations to Launcher -> Always dispose of widget page views when leaving the activity. These pages hold onto many bitmaps. -> Clear database cache when leaving the activity. Bug: 17967108 Change-Id: I10ebaaed14e7cd86f09a9afcabd73043705f21b8 --- src/com/android/launcher3/PagedViewWithDraggableItems.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/com/android/launcher3/PagedViewWithDraggableItems.java') diff --git a/src/com/android/launcher3/PagedViewWithDraggableItems.java b/src/com/android/launcher3/PagedViewWithDraggableItems.java index 2a29c33f3..7f4a3a032 100644 --- a/src/com/android/launcher3/PagedViewWithDraggableItems.java +++ b/src/com/android/launcher3/PagedViewWithDraggableItems.java @@ -91,6 +91,10 @@ public abstract class PagedViewWithDraggableItems extends PagedView return super.onTouchEvent(ev); } + public void reset() { + mLastTouchedItem = null; + } + @Override public boolean onTouch(View v, MotionEvent event) { mLastTouchedItem = v; -- cgit v1.2.3