am 4a3ba7b7: Merge "Allow previous view hierarchy to be GC\'ed more quickly on rotation" into honeycomb
* commit '4a3ba7b7f2f8a8560daf2562c3dac4c18ebd1621': Allow previous view hierarchy to be GC'ed more quickly on rotation
This commit is contained in:
@@ -106,6 +106,7 @@ import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -1313,6 +1314,7 @@ public final class Launcher extends Activity
|
||||
(System.currentTimeMillis() - mAutoAdvanceSentTime));
|
||||
}
|
||||
mHandler.removeMessages(ADVANCE_MSG);
|
||||
mHandler.removeMessages(0); // Remove messages sent using postDelayed()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1493,6 +1495,9 @@ public final class Launcher extends Activity
|
||||
} catch (NullPointerException ex) {
|
||||
Log.w(TAG, "problem while stopping AppWidgetHost during Launcher destruction", ex);
|
||||
}
|
||||
mAppWidgetHost = null;
|
||||
|
||||
mWidgetsToAdvance.clear();
|
||||
|
||||
TextKeyListener.getInstance().release();
|
||||
|
||||
@@ -1511,6 +1516,11 @@ public final class Launcher extends Activity
|
||||
}
|
||||
|
||||
unregisterReceiver(mCloseSystemDialogsReceiver);
|
||||
|
||||
((ViewGroup) mWorkspace.getParent()).removeAllViews();
|
||||
mWorkspace.removeAllViews();
|
||||
mWorkspace = null;
|
||||
mDragController = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1977,6 +1987,7 @@ public final class Launcher extends Activity
|
||||
for (ItemInfo item: mDesktopItems) {
|
||||
item.unbind();
|
||||
}
|
||||
mDesktopItems.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,4 +36,10 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
|
||||
AppWidgetProviderInfo appWidget) {
|
||||
return new LauncherAppWidgetHostView(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopListening() {
|
||||
super.stopListening();
|
||||
clearViews();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,6 +492,9 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
mLoaderTask.stopLocked();
|
||||
}
|
||||
}
|
||||
mItems.clear();
|
||||
mAppWidgets.clear();
|
||||
mFolders.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -150,4 +150,10 @@ public abstract class PagedViewWithDraggableItems extends PagedView
|
||||
public void setDragSlopeThreshold(float dragSlopeThreshold) {
|
||||
mDragSlopeThreshold = dragSlopeThreshold;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
mLastTouchedItem = null;
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user