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
View: make sure onDetachedFromWindow() gets called before updating attachedToWindow property
This commit is contained in:
@@ -1876,13 +1876,17 @@ public class View implements Drawable.Callback {
|
||||
native_keep_screen_on(widget, true);
|
||||
}
|
||||
protected void onDetachedFromWindow() {
|
||||
attachedToWindow = false;
|
||||
if (onAttachStateChangeListener != null) {
|
||||
onAttachStateChangeListener.onViewDetachedFromWindow(this);
|
||||
}
|
||||
if (keepScreenOn)
|
||||
native_keep_screen_on(widget, false);
|
||||
}
|
||||
|
||||
void detachFromWindowInternal() {
|
||||
onDetachedFromWindow();
|
||||
attachedToWindow = false;
|
||||
}
|
||||
public void attachToWindowInternal() {
|
||||
onAttachedToWindow();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user