Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1394)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java

Issue 2628943002: Fix issue with setUserVisibleHint() being called too early. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java
index 858c51b56d01bc0eda192f3d2159f638f4c6c012..08036d04d156ce7a34498730e0a011c8b93c8ab8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java
@@ -106,10 +106,13 @@ public class ToSAndUMAFirstRunFragment extends FirstRunPage {
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
+ // This may be called before onViewCreated(), in which case the below is not yet relevant.
+ if (mTitle == null) return;
+
if (!isVisibleToUser) {
// Restore original enabled & visibility states, in case the user returns to the page.
setSpinnerVisible(false);
- } else if (mSendReportCheckBox != null) {
+ } else {
// On certain versions of Android, the checkbox will appear unchecked upon revisiting
// the page. Force it to the end state of the drawable animation as a work around.
// crbug.com/666258
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698