mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
parent
eb733656a3
commit
0de198a0fa
1 changed files with 11 additions and 16 deletions
|
@ -766,24 +766,19 @@ 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");
|
||||||
getMainHandler().post(new Runnable() {
|
try {
|
||||||
@Override
|
for (Field field : f.getClass().getDeclaredFields()) {
|
||||||
public void run() {
|
Class<?> type = field.getType();
|
||||||
try {
|
if (View.class.isAssignableFrom(type) ||
|
||||||
for (Field field : f.getClass().getDeclaredFields()) {
|
RecyclerView.Adapter.class.isAssignableFrom(type)) {
|
||||||
Class<?> type = field.getType();
|
Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName());
|
||||||
if (View.class.isAssignableFrom(type) ||
|
field.setAccessible(true);
|
||||||
RecyclerView.Adapter.class.isAssignableFrom(type)) {
|
field.set(f, null);
|
||||||
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