Closed Bug 697299 Opened 8 years ago Closed 8 years ago
Disable preferences before Gecko is loaded
If the user tries to view the preferences activity before Gecko has been loaded, the screen won't be populated with the user's preferences. This patch prevents the preferences activity from being shown before Gecko has been loaded.
Attachment #569531 - Flags: review?(doug.turner)
Comment on attachment 569531 [details] [diff] [review] disables menu item before gecko is ready Review of attachment 569531 [details] [diff] [review]: ----------------------------------------------------------------- looks good. two nits. post another patch, i'll r+ ::: embedding/android/GeckoApp.java @@ +101,5 @@ > private PopupWindow mTabsTray; > private TabsAdapter mTabsAdapter; > public DoorHanger mDoorHanger; > private static boolean isTabsTrayShowing; > + private static boolean sIsGeckoReady = false; can you rename isTabsTrayShowing to sIsTabsTrayShowing while you are here? @@ +400,5 @@ > sMenu = menu; > MenuInflater inflater = getMenuInflater(); > inflater.inflate(R.layout.gecko_menu, menu); > + if (sIsGeckoReady) > + menu.findItem(R.id.preferences).setEnabled(true); how would sIsGeckoReady ever be true here? You probably can just drop these two lines.
Attachment #569531 - Flags: review?(doug.turner) → review-
re: how would sIsGeckoReady ever be true here? You probably can just drop these two lines. the menu is recreated every time the activity is recreated e.g., the view is rotated or the user clicks back and resumes fennec again without quitting first
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
When Gecko is ready, are you able to flip android:enabled="false" to true? If a user has the menu bar open, after Gecko is ready, the Preferences item is still greyed out.
we need to do the update on the UI thread. this patch fixes that (and addresses the problem aaron mentioned).
Attachment #569855 - Flags: review?
Attachment #569855 - Flags: review? → review?(doug.turner)
reopened for new patch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #569855 - Flags: review?(doug.turner) → review+
Comment on attachment 569536 [details] [diff] [review] updated with renamed sIsTabsTrayShowing w/ the other patch to post the UI manipulation to the right thread.
Attachment #569536 - Flags: review?(doug.turner) → review+
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Verified on Samsung Galaxy S2 during 11/11/11 testday.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.