diff options
author | shubang <shubang@google.com> | 2018-05-10 11:15:47 -0700 |
---|---|---|
committer | Nick Chalko <nchalko@google.com> | 2018-05-18 10:27:13 -0700 |
commit | 57629ebc5394d1cc3c2f059cec7b8ff6acaf16be (patch) | |
tree | 724a9c7174e7282e083d7fe3a719a01fcfad0d88 | |
parent | 8899abad832e62df14e0d04e80111faa6d296a94 (diff) | |
download | TV-57629ebc5394d1cc3c2f059cec7b8ff6acaf16be.tar.gz |
Fix state loss in SetupActivity
PiperOrigin-RevId: 196143164
Change-Id: I12dfbb1c40bd5b48fc6a575cc5e80851d2fa303a
-rw-r--r-- | common/src/com/android/tv/common/ui/setup/SetupActivity.java | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/common/src/com/android/tv/common/ui/setup/SetupActivity.java b/common/src/com/android/tv/common/ui/setup/SetupActivity.java index 67418ce0..6a89ed41 100644 --- a/common/src/com/android/tv/common/ui/setup/SetupActivity.java +++ b/common/src/com/android/tv/common/ui/setup/SetupActivity.java @@ -27,7 +27,6 @@ import android.support.annotation.NonNull; import android.transition.Transition; import android.transition.TransitionInflater; import android.view.View; -import android.view.ViewTreeObserver.OnPreDrawListener; import com.android.tv.common.R; import com.android.tv.common.WeakHandler; import com.android.tv.common.ui.setup.animation.SetupAnimationHelper; @@ -55,23 +54,7 @@ public abstract class SetupActivity extends Activity implements OnActionClickLis // Show initial fragment only when the saved state is not restored, because the last // fragment is restored if savesInstanceState is not null. if (savedInstanceState == null) { - // This is the workaround to show the first fragment with delay to show the fragment - // enter transition. See http://b/26255145 - getWindow() - .getDecorView() - .getViewTreeObserver() - .addOnPreDrawListener( - new OnPreDrawListener() { - @Override - public boolean onPreDraw() { - getWindow() - .getDecorView() - .getViewTreeObserver() - .removeOnPreDrawListener(this); - showInitialFragment(); - return true; - } - }); + showInitialFragment(); } else { mShowInitialFragment = false; } |