Skip to content

Commit 8786a96

Browse files
jreckAndroid (Google) Code Review
authored andcommitted
Merge "Re-allow suppressing onDetachedFromWindow" into lmp-dev
2 parents c6a06d4 + 77e4a52 commit 8786a96

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

core/java/android/view/SurfaceView.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,8 @@ public void setVisibility(int visibility) {
256256
updateWindow(false, false);
257257
}
258258

259-
/** @hide */
260259
@Override
261-
protected void onDetachedFromWindowInternal() {
260+
protected void onDetachedFromWindow() {
262261
if (mGlobalListenersAdded) {
263262
ViewTreeObserver observer = getViewTreeObserver();
264263
observer.removeOnScrollChangedListener(mScrollChangedListener);
@@ -280,7 +279,7 @@ protected void onDetachedFromWindowInternal() {
280279
mSession = null;
281280
mLayout.token = null;
282281

283-
super.onDetachedFromWindowInternal();
282+
super.onDetachedFromWindow();
284283
}
285284

286285
@Override

opengl/java/android/opengl/GLSurfaceView.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,17 +595,16 @@ protected void onAttachedToWindow() {
595595
mDetached = false;
596596
}
597597

598-
/** @hide */
599598
@Override
600-
protected void onDetachedFromWindowInternal() {
599+
protected void onDetachedFromWindow() {
601600
if (LOG_ATTACH_DETACH) {
602601
Log.d(TAG, "onDetachedFromWindow");
603602
}
604603
if (mGLThread != null) {
605604
mGLThread.requestExitAndWait();
606605
}
607606
mDetached = true;
608-
super.onDetachedFromWindowInternal();
607+
super.onDetachedFromWindow();
609608
}
610609

611610
// ----------------------------------------------------------------------

0 commit comments

Comments
 (0)