cancelAllTasks();
}
+ @Override
+ public void trimMemory() {
+ super.trimMemory();
+ clearAllWidgetPages();
+ }
+
public void clearAllWidgetPages() {
cancelAllTasks();
int count = getChildCount();
}
}
- @Override
public void reset() {
- super.reset();
// If we have reset, then we should not continue to restore the previous state
mSaveInstanceStateItemIndex = -1;
mPagedView.reset();
}
+ void trimMemory() {
+ mPagedView.trimMemory();
+ }
+
public void onWindowVisible() {
if (getVisibility() == VISIBLE) {
mContent.setVisibility(VISIBLE);
// 3MB of memory for caching which isn't necessary.
SQLiteDatabase.releaseMemory();
- // We reset the apps customize tray in order to
- // to free all the memory associated with widget previews
+ // This clears all widget bitmaps from the widget tray
if (mAppsCustomizeTabHost != null) {
- mAppsCustomizeTabHost.reset();
+ mAppsCustomizeTabHost.trimMemory();
}
}
}
return super.onTouchEvent(ev);
}
- public void reset() {
+ public void trimMemory() {
mLastTouchedItem = null;
}