mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Clear delayed
This commit is contained in:
parent
2b305ec7f1
commit
4f2b0995bf
1 changed files with 16 additions and 11 deletions
|
@ -766,19 +766,24 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
@Override
|
@Override
|
||||||
public void onFragmentDestroyed(@NonNull FragmentManager fm, @NonNull Fragment f) {
|
public void onFragmentDestroyed(@NonNull FragmentManager fm, @NonNull Fragment f) {
|
||||||
log(fm, f, "onFragmentDestroyed");
|
log(fm, f, "onFragmentDestroyed");
|
||||||
try {
|
getMainHandler().post(new Runnable() {
|
||||||
for (Field field : f.getClass().getDeclaredFields()) {
|
@Override
|
||||||
Class<?> type = field.getType();
|
public void run() {
|
||||||
if (View.class.isAssignableFrom(type) ||
|
try {
|
||||||
RecyclerView.Adapter.class.isAssignableFrom(type)) {
|
for (Field field : f.getClass().getDeclaredFields()) {
|
||||||
Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName());
|
Class<?> type = field.getType();
|
||||||
field.setAccessible(true);
|
if (View.class.isAssignableFrom(type) ||
|
||||||
field.set(f, null);
|
RecyclerView.Adapter.class.isAssignableFrom(type)) {
|
||||||
|
Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName());
|
||||||
|
field.setAccessible(true);
|
||||||
|
field.set(f, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.w(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable ex) {
|
});
|
||||||
Log.w(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue