You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iceraven-browser/app/src/main/res/layout
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #16900: Refactored blocking call into a function

For 16900: NavGraph inflation is now async

We now attach the nav graph (or check if its attached) on every nav call ( an extension function for NavController).
This is done by checking the value of the job stored in PerfNavController.map which keeps track of the job with the NavController as a Key.
If the job hasn't been completed, it will block the main thread until the job is done. The job itself is responsible for attaching the navgraph
to the navcontroller (and the inflation of the latter too)

For 16900: rebased upstream master

For 16900: Rebase on master

For #16900: Fixed Async Navgraph navigation per review comments.

1)The Asynchronous method is now found in NavGraphProvider.kt. It creates a job on the IO dispatcher
2)The Job is tracked through a WeakHashMap from Controller --> NavGraph
3)The Coroutine scope doesn't use MainScope() anymore
4)The Coroutine is cancelled if the Activity is destroyed
5)The tests mockk the blockForNavGraphInflation method through the FenixReoboelectricTestApplication instead of calling the mock every setup()

For #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #16900: Review nits for async navgraph

This is composed of squash commits, the original messages can be found below:

-> DisableNavGraphProviderAssertionRule + kdoc.

Use test rule in RobolectricApplication.

Fix failing CrashReporterControllerTest

Fix blame by -> navigate in tests.

This commit was generated by the following commands only:
```
find app/src/test -type f -exec sed -i '' "/import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph/d" {} \;
find app/src/test -type f -exec sed -i "" "s/navigateBlockingForAsyncNavGraph/navigate/g" {} \;
git checkout app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
```

Fix various blame

This is expected to be squashed into the first commit so, if so, it'd
fix the blame.

Move test rule to helpers pkg.

add missing license header

Add import change I missed

fix unused imports

Replace robolectricTestrunner with test rule.

Improve navGraphProvider docs

Remove unnecessary rule as defined by robolectric.

add clarifying comment to robolectric

remove unnecessary space

* For #16900: nit fixes for MozillaNavigateCheck and lint fixes

3 squash commits:
 *Changed violation message and fixed the lint rule for MozillaNavigateCheck
 *Added suppression to NavController.kt
 *Fixed detekt violations

* For 16900: Fixed failing tests

Co-authored-by: Michael Comella <michael.l.comella@gmail.com>
3 years ago
..
about_list_item.xml For #4776: Redesign and refactor the About Page 4 years ago
account_auth_error_preference.xml Use tools:text to avoid inflating strings twice (#3619) 5 years ago
account_preference.xml Fixes existing lint errors 4 years ago
account_share_list_item.xml For #4007 - Use camelCase for views referenced from code 5 years ago
activity_addons.xml Provide add-on support (#8064) 4 years ago
activity_home.xml 16900 make navgraph inflation asynchronous (#18889) 3 years ago
activity_migration.xml For #15280: suppress new lint rule in migration code. 4 years ago
activity_privacy_content_display.xml Pop out privacy notice in first launch in MozillaOnline builds 3 years ago
add_new_collection_dialog.xml For #10163 - Adds tab multiselect mode 4 years ago
amo_collection_override_dialog.xml Fixes existing lint errors 4 years ago
app_share_list_item.xml For #4007 - Use camelCase for views referenced from code 5 years ago
bookmark_list_item.xml For #12551 - Implement swipe to delete for bookmarks. 4 years ago
browser_toolbar_popup_window.xml Closes #17118: Fix font spacing when long pressing a URL (#17164) 3 years ago
button_tip_item.xml Fixes existing lint errors 4 years ago
checkbox_item.xml Extract checkbox selected mask (#14308) 4 years ago
checkbox_left_preference.xml For #16745 - Allow preference layout to increase height if needed. (#16752) 4 years ago
checkbox_left_preference_etp.xml For #10656: Adjust etp checkbox dimensions for a11y. 4 years ago
checkbox_left_sub_preference.xml For #16830: Increase the Show in private sessions option in Search Preferences Settings (#18689) 3 years ago
collection_dialog_list_item.xml For #10163 - Adds tab multiselect mode 4 years ago
collection_header.xml For #12673: Adjust top and left alignment of logo on homescreen (#12676) 4 years ago
collection_home_list_row.xml Closes #16345: Update share icon shape 4 years ago
collection_tab_list_row.xml For #11139:Constrain title to start of checkbox and ellipsize. 4 years ago
collections_list_item.xml Fixes existing lint errors 4 years ago
component_bookmark.xml For #12706 - Add vertical scrollbar to bookmarks screen 4 years ago
component_bottom_browser_toolbar.xml For #5694 & #6054: Allows users to change toolbar position (#6608) 5 years ago
component_browser_top_toolbar.xml For #10686 - Use the AC custom behavior for both the top and bottom toolbars 3 years ago
component_collection_creation.xml Fixes existing lint errors 4 years ago
component_collection_creation_name_collection.xml Fixes existing lint errors 4 years ago
component_collection_creation_select_collection.xml Fixes existing lint errors 4 years ago
component_credit_cards.xml For #18268, #18269 - [Saved cards] Display a list of Saved cards fetched from the credit card storage (#18808) 3 years ago
component_downloads.xml For #16541: Download UX Updates 3 years ago
component_exceptions.xml For issue: #16394 Fix UI for consider increasing some elements from ETP-Exceptions page 3 years ago
component_history.xml For #15112 - Still show recently closed when history empty 4 years ago
component_locale_settings.xml For #12078: Follow ux mock on Settings --> Language screen 4 years ago
component_permissions_blocked_by_android.xml For #12532: Align Settings -> Site permissions -> Sub-pages to 72dp keyline (#12680) 4 years ago
component_recently_closed.xml For #2486 - Adds Recently Closed Tabs 4 years ago
component_saved_logins.xml For #10285: Swap TextView for a LinkTextView to improve links a11y 4 years ago
component_session_control.xml For #3574 Allow all screen readers to read onboarding items one-by one (#7292) 4 years ago
component_sync_tabs.xml For #11498 - add Sync tabs error view (including sign-in CTA) 4 years ago
component_sync_tabs_tray_layout.xml Issue #14117: Add Synced Tabs as a page in the tabs tray 3 years ago
component_tabhistory.xml For #15219 - Fix tab tray handle size. 4 years ago
component_tabstray.xml For #15788: Remove nested constraint layout in tabs tray. 4 years ago
component_tabstray2.xml Close #18973: Fix references to info banner 3 years ago
component_tabstray_fab.xml Remove hidden fab in tabs tray (#16972) 3 years ago
component_top_sites.xml For #18009: Correctly report items in adapter for a11y services. 3 years ago
component_top_sites_pager.xml For #8312 - Show Top Sites in a ViewPager (#14116) 4 years ago
component_tracking_protection_panel.xml For #15703 and #17133: allow ETP redirect trackers setting to be customized (#17137) 3 years ago
credit_card_list_item.xml For #18268, #18269 - [Saved cards] Display a list of Saved cards fetched from the credit card storage (#18808) 3 years ago
custom_search_engine.xml For #12755 - Replace @+id by @id when referencing already declared ids 4 years ago
custom_search_engine_radio_button.xml For #12804: Set min height for search engine radio button 4 years ago
delete_browsing_data_item.xml For #11665: Adjust visual design for delete browsing data screens. 4 years ago
delete_exceptions_button.xml For #9857: Create button style (#9858) 4 years ago
delete_logins_exceptions_button.xml Closes #12522: Reuse exceptions code (#13047) 4 years ago
download_dialog_layout.xml For #16675 For #16398 - Fix button styling 3 years ago
download_list_item.xml For #352: Delete a download 4 years ago
dropdown_preference_etp.xml For #6479: Add granular ETP settings 4 years ago
etp_dropdown_item.xml For #6479: Add granular ETP settings 4 years ago
exception_item.xml For issue: #16394 Fix UI for consider increasing some elements from ETP-Exceptions page 3 years ago
exceptions_description.xml Closes #12522: Reuse exceptions code (#13047) 4 years ago
experiment_default_browser.xml For #18375: Add experiment for set default browser New Tab card. 3 years ago
fenix_snackbar.xml For #9594: Increase touch target for snackbar action button button. 4 years ago
fragment_about.xml For #9712 - show "AC: " before AC version on "About" screen 4 years ago
fragment_about_libraries.xml for #7584 - fix about libraries toolbar theme 4 years ago
fragment_add_new_device.xml For #16675 For #16398 - Fix button styling 3 years ago
fragment_add_on_details.xml For #11456: AddonDetailsFragment should use ConstraintLayout, not RelativeLayout 4 years ago
fragment_add_on_internal_settings.xml Update Android Components, Kotlin, Gradle plugin (#16021) 4 years ago
fragment_add_on_permissions.xml For #12755 - Replace @+id by @id when referencing already declared ids 4 years ago
fragment_add_ons_management.xml For issue #8520: Improve add-ons UI 4 years ago
fragment_add_search_engine.xml Adds custom search engines (#6551) 5 years ago
fragment_bookmark.xml For #8649: No bookmarks here strings are close to the top 4 years ago
fragment_browser.xml For #10686 - Use the AC custom behavior for both the top and bottom toolbars 3 years ago
fragment_crash_reporter.xml Fixes existing lint errors 4 years ago
fragment_create_collection.xml #4596 migrate collections (#5911) 5 years ago
fragment_create_shortcut.xml For #9435: Adjust margins and paddings to mirror correctly in RTL 4 years ago
fragment_credit_card_editor.xml No issue - Remove generic strings for more specificity (#18769) 3 years ago
fragment_delete_browsing_data.xml For #15181: Remove All Downloads From Settings 3 years ago
fragment_downloads.xml For #349: View Downloads 4 years ago
fragment_edit_bookmark.xml For #15508: Show error when trying to save empty or invalid bookmark URL (#15674) 4 years ago
fragment_edit_custom_search_engine.xml Adds custom search engines (#6551) 5 years ago
fragment_edit_login.xml For #14679 For #14676 - Dismiss MP Migration tip, init in disabled state 4 years ago
fragment_exceptions.xml For #7094 - Adds save login exceptions 4 years ago
fragment_history.xml For #8651 - Ensure FenixSnackbar has a proper root for inflating into 4 years ago
fragment_home.xml For #8545: Fix unnecessary scroll in home screen 3 years ago
fragment_installed_add_on_details.xml For #12755 - Replace @+id by @id when referencing already declared ids 4 years ago
fragment_locale_settings.xml For #12078: Follow ux mock on Settings --> Language screen 4 years ago
fragment_login_detail.xml For #13831: Adjust buttons dimensions to improve a11y. 4 years ago
fragment_manage_site_permissions_exceptions_feature_phone.xml For issue: #16846 Add ui for controlling exceptions for auto play 3 years ago
fragment_manage_site_permissions_feature_phone.xml For #12532: Quick fix for radio button alignment (#12691) 4 years ago
fragment_not_yet_supported_addons.xml Update NotYetSupported add-ons copy 4 years ago
fragment_pair.xml For #6198: Update copy and position of pair QR code scan message. 4 years ago
fragment_pwa_onboarding.xml For #16675 For #16398 - Fix button styling 3 years ago
fragment_quick_settings_dialog_sheet.xml For #8591: Allow items in quick_action_sheet to be read by a11y services 4 years ago
fragment_recently_closed_tabs.xml For #2486 - Adds Recently Closed Tabs 4 years ago
fragment_saved_cards.xml For #18268, #18269 - [Saved cards] Display a list of Saved cards fetched from the credit card storage (#18808) 3 years ago
fragment_saved_logins.xml For #10173: login duplicates and save (#11208) 4 years ago
fragment_search.xml For #13784 - Addresses nits 4 years ago
fragment_search_dialog.xml For #17364: Make hint scrollable and do not overlap other elements. 3 years ago
fragment_select_bookmark_folder.xml Closes #4540 - Set correct tint for select bookmark folder icon (#4541) 5 years ago
fragment_share.xml For #2754 Add tab cards to share sheet (#5493) 5 years ago
fragment_sign_out.xml For #16397 - Fixes SignOutFragment crash and invisible button 4 years ago
fragment_site_permissions_exceptions.xml Extract navigation subgraphs 4 years ago
fragment_site_permissions_exceptions_item.xml Issue 5366 Vector Drawable Compat (#6904) 5 years ago
fragment_synced_tabs.xml For #10834 - Adding Sync Tabs Feature in Fenix 4 years ago
fragment_tab_history_dialog.xml For #1048 - Add ability to view tab history by long-pressing the back or forward button. 4 years ago
fragment_tab_tray_dialog.xml For #11342 - Fixes missing space for the FAB 4 years ago
fragment_tracking_protection.xml Add Tracking Protection Info Panel 5 years ago
fragment_tracking_protection_blocking.xml For #15703 and #17133: allow ETP redirect trackers setting to be customized (#17137) 3 years ago
fragment_turn_on_sync.xml For #15262: Updated margins 4 years ago
history_list_item.xml For #16519: Add space above Delete History button (#17492) 3 years ago
info_banner.xml For #9506: Implement banner custom view based on material design specs. 4 years ago
layout_clear_permission_button.xml For #9857: Create button style (#9858) 4 years ago
layout_percentage_seek_bar.xml For #12730 - Fix ripple for font size setting. 4 years ago
layout_url_background.xml Closes #6236: Fix padding lint issues (#6240) 5 years ago
library_separator.xml Change separator to use its own view holder 4 years ago
library_site_item.xml Change separator to use its own view holder 4 years ago
list_element.xml Fixes existing lint errors 4 years ago
locale_settings_item.xml For #12755 - Replace @+id by @id when referencing already declared ids 4 years ago
logins_item.xml For #7992: Use favicon style from AC (#12608) 4 years ago
migration_list_item.xml For #11004: Fix invisible text on migration UI 4 years ago
mozac_browser_menu_item_switch.xml For #1716 - Consolidate Switch Styles 5 years ago
mp_migration_dialog.xml For #13926 - MP migration 4 years ago
mp_migration_done_dialog.xml For #13926 - MP migration 4 years ago
name_collection_dialog.xml Fixes existing lint errors 4 years ago
navigation_toolbar.xml For #16161 - Fixes Saved Login toolbar layout 4 years ago
no_collections_message.xml For #12377 - Choice to hide no collections placeholder from homescreen 4 years ago
normal_browser_tray_list.xml Issue #17822: Create a tabs tray layout and fragment 3 years ago
onboarding_automatic_signin.xml Fixes existing lint errors 4 years ago
onboarding_finish.xml For #9583: Increase touch targets for onboarding elements. 4 years ago
onboarding_header.xml No issue: Use ImageView rather than rebuilding drawable (#3616) 5 years ago
onboarding_manual_signin.xml For #15372 Optimize the order and messages of onboarding cards 3 years ago
onboarding_privacy_notice.xml For #14011: Remove new line character and spaces from string. 3 years ago
onboarding_private_browsing.xml For #8643 and #7606 - Changed styles for most onboarding cards 4 years ago
onboarding_section_header.xml No issue: Use ImageView rather than rebuilding drawable (#3616) 5 years ago
onboarding_theme_picker.xml For #15372 Optimize the order and messages of onboarding cards 3 years ago
onboarding_toolbar_position_picker.xml For #15372 Optimize the order and messages of onboarding cards 3 years ago
onboarding_tracking_protection.xml For #15372 Optimize the order and messages of onboarding cards 3 years ago
onboarding_whats_new.xml For #10285: Swap TextView for a LinkTextView to improve links a11y 4 years ago
overlay_add_on_progress.xml Wire up UI to make add-on installation cancelable 4 years ago
pbm_shortcut_popup.xml For #5499 - Unify CFR drawables and dimens (#12749) 4 years ago
preference_cat_style.xml For #14636 - Update preference section headers to use correct color, spacing and rulers (#16332) 4 years ago
preference_category_empty.xml For #11665: Adjust visual design for delete browsing data screens. 4 years ago
preference_category_no_icon_style.xml For issue #18132 remove icons from Settings screen 3 years ago
preference_credit_cards_add_credit_card.xml For #18240 - Add a Credit Card preference screen (#18410) 3 years ago
preference_default_browser.xml Close #420 - Default Browser Preference reacts to default browser status 5 years ago
preference_search_add_engine.xml For #14922: Use padding instead of margin to use the full screen width for the "Add search engine" button 4 years ago
preference_search_engine_chooser.xml Closes #877 - Add Search Engine Settings 5 years ago
preference_widget_radiobutton.xml For #12755 - Replace @+id by @id when referencing already declared ids 4 years ago
preference_widget_radiobutton_with_info.xml Fixes existing lint errors 4 years ago
private_browser_tray_list.xml Issue #17822: Create a tabs tray layout and fragment 3 years ago
private_browsing_description.xml For #13315: Fix text direction and alignment for RTL languages. 4 years ago
quicksetting_permission_spinner_dropdown.xml For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
quicksettings_permission_spinner_item.xml For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
quicksettings_permissions.xml For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
quicksettings_tracking_protection.xml Bug 1643132 - Remove native "Report site issue" functionality. 4 years ago
quicksettings_website_info.xml For #6317 - Applies 3dot menuItem look to quickSettings and tracking panel 4 years ago
recently_closed_nav_item.xml For #15112 - Still show recently closed when history empty 4 years ago
save_to_collection_button.xml For #9857: Create button style (#9858) 4 years ago
saved_logins_sort_items_toolbar_child.xml For #16271 - Fixes ripple being cut-off in Saved logins sort toolbar (#16741) 3 years ago
search_engine_radio_button.xml For #14725 - Resize search engine radio button 4 years ago
search_suggestions_hint.xml For #17364: Make hint scrollable and do not overlap other elements. 3 years ago
search_widget_extra_small_v1.xml Fixes existing lint errors 4 years ago
search_widget_extra_small_v2.xml Fixes existing lint errors 4 years ago
search_widget_large.xml Fixes existing lint errors 4 years ago
search_widget_medium.xml Fixes existing lint errors 4 years ago
search_widget_small.xml Fixes existing lint errors 4 years ago
search_widget_small_no_mic.xml Fixes existing lint errors 4 years ago
share_close.xml For #13300 - Adjust the 'Sharing a Collection' layout to prevent overlapping of the close icon and 'Share' label in RTL 4 years ago
share_tab_item.xml For #2754 Add tab cards to share sheet (#5493) 5 years ago
share_to_account_devices.xml For #4007 - Refactor AppShareView in standalone Share Views 5 years ago
share_to_apps.xml For #11177 - Load all share targets in the horizontal share menu 4 years ago
sign_in_preference.xml For #5497 Improve sync title/summary settings to support RTL 5 years ago
site_list_item.xml For #14346: Fix min height on site list item (#14370) 4 years ago
stub_find_in_page.xml For #4066: Provide lazy inflation of Find In Page View 5 years ago
switch_with_description.xml For #12755 - Replace @+id by @id when referencing already declared ids 4 years ago
sync_tabs_error_row.xml For #12287: Add Synced Tabs to Tabs Tray 4 years ago
sync_tabs_list_item.xml For #18717: Use normal theme color for tab tray synced tabs. 3 years ago
synced_tabs_tray_list.xml Issue #17822: Create a tabs tray layout and fragment 3 years ago
tab_header.xml Closes #16345: Update share icon shape 4 years ago
tab_history_list_item.xml Fix suggestions, extract layout for tab history 4 years ago
tab_list_row.xml Simplify media state drawables (#13474) 4 years ago
tab_preview.xml Closes #8791: Use A-C tab counter and upgrades to A-C 69.0.20201203202830 4 years ago
tab_tray_grid_item.xml For #16500 - Ensure CardView clips ImageView on lower APIs (#16507) 4 years ago
tab_tray_item.xml For #14619: Show half a tab top offset when scrolling to selected tab. 4 years ago
tabs_tray_save_to_collections_item.xml For #16132 - Revise multiselect mode UI 4 years ago
tabs_tray_tab_counter.xml For #12461: Add tab count to tab tray 4 years ago
tabs_tray_tab_counter2.xml Closes #18514: Re-add tab counter in tabs tray (#18659) 3 years ago
tabstray_multiselect_items.xml For #15788: Remove nested constraint layout in tabs tray. 4 years ago
top_site_item.xml For #18743 - Change the top sites label colour and size (#18752) 3 years ago
top_sites_header.xml For #9525 - Add bottom margin to top sites header 4 years ago
top_sites_rename_dialog.xml For #9548 - Ability to rename top sites (#16285) 4 years ago
tracking_protection_category.xml For #13812: add ETP category for redirect trackers (#15139) 4 years ago
tracking_protection_learn_more_preference.xml Fixes existing lint errors 4 years ago
tracking_protection_onboarding_popup.xml For #12905: Just code rearrange, no changes. 4 years ago
view_synced_tabs_group.xml For #18717: Use normal theme color for tab tray synced tabs. 3 years ago
view_synced_tabs_no_item.xml For #12287: Show devices with no tabs in Synced Tabs list 4 years ago
view_synced_tabs_title.xml Fixes existing lint errors 4 years ago