1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Clear animator target

This commit is contained in:
M66B 2022-04-13 11:28:34 +02:00
parent 440759066d
commit da27db5988
2 changed files with 4 additions and 1 deletions

View file

@ -814,6 +814,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
RecyclerView.Adapter.class.isAssignableFrom(type)) { RecyclerView.Adapter.class.isAssignableFrom(type)) {
Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName()); Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName());
field.setAccessible(true); field.setAccessible(true);
if (Animator.class.isAssignableFrom(type))
((Animator) field.get(f)).setTarget(null);
field.set(f, null); field.set(f, null);
} }
} }

View file

@ -661,7 +661,6 @@ public class Helper {
public void onDestroyed() { public void onDestroyed() {
try { try {
animator.removeUpdateListener(listener); animator.removeUpdateListener(listener);
fab.setAlpha(1.0f);
owner.getLifecycle().removeObserver(this); owner.getLifecycle().removeObserver(this);
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);