You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
prevent reference cycles between Java and native objects
This commit is contained in:
@@ -46,9 +46,16 @@ public class Window {
|
||||
}
|
||||
|
||||
public void setContentView(View view) {
|
||||
if (contentView != view) {
|
||||
if (contentView != null)
|
||||
contentView.onDetachedFromWindow();
|
||||
if (view != null)
|
||||
view.onAttachedToWindow();
|
||||
}
|
||||
contentView = view;
|
||||
view.onAttachedToWindow();
|
||||
set_widget_as_root(native_window, view.widget);
|
||||
if (view != null) {
|
||||
set_widget_as_root(native_window, view.widget);
|
||||
}
|
||||
}
|
||||
|
||||
public View getDecorView() {
|
||||
|
||||
Reference in New Issue
Block a user