From 14aab9ec3662687ef0d4daea072333aa8032e42a Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 6 Jan 2016 19:29:37 -0800 Subject: [PATCH] Revert "fix massive memory leak by removing ExpiringDelegate's timers when" This reverts commit 50ca74d2595af3d31b3631dd0dc761786eb05b8c. --- .../src/org/eehouse/android/xw4/ExpiringDelegate.java | 5 ----- .../org/eehouse/android/xw4/ExpiringLinearLayout.java | 9 --------- .../src/org/eehouse/android/xw4/ExpiringTextView.java | 7 ------- .../src/org/eehouse/android/xw4/GameListItem.java | 7 ------- 4 files changed, 28 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java index a6b6f15c7..e5b4045b6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringDelegate.java @@ -96,11 +96,6 @@ public class ExpiringDelegate { } } - public void clearPct() - { - m_handler.removeCallbacks( m_runnable ); - } - public void setSelected( boolean selected ) { m_selected = selected; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringLinearLayout.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringLinearLayout.java index aa9950b49..4e3070e02 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringLinearLayout.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringLinearLayout.java @@ -56,13 +56,4 @@ public class ExpiringLinearLayout extends LinearLayout { m_delegate.onDraw( canvas ); } } - - @Override - protected void onDetachedFromWindow () - { - if ( null != m_delegate ) { - m_delegate.clearPct(); - } - super.onDetachedFromWindow(); - } } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java index 46f6c0cf0..6c0ea2815 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ExpiringTextView.java @@ -52,13 +52,6 @@ class ExpiringTextView extends TextView { } } - public void clearPct() - { - if ( null != m_delegate ) { - m_delegate.clearPct(); - } - } - @Override protected void onDraw( Canvas canvas ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java index ece8ef1ed..0c3d78b64 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java @@ -158,13 +158,6 @@ public class GameListItem extends LinearLayout } } - @Override - protected void onDetachedFromWindow () - { - m_name.clearPct(); - super.onDetachedFromWindow(); - } - private void update( boolean expanded, long lastMoveTime, boolean haveTurn, boolean haveTurnLocal ) {