* With this patch fenix build variants will launch HomeActivity directly from the launcher.
This will get rid of the performance regression outlined in #7818.
* Fennec build variants will launch into MigrationDecisionActivity which will show the
migration UI or launch normally into the app. This is faster than going through
IntentReceiverActivity (measured and perceived).
- The "Add to Firefox Home" browser menu item adds a top site to the top site storage.
- Refactors the FenixSnackbar from BaseBrowserFragment into BrowserToolbarController
since there are multiple menu items that need to show a FenixSnackbar.
- Adds metrics for the new browser menu item.
This removes Fretboard. The goal is to reduce cold startup costs associated with loading the experiments on the main thread. We currently have two experiments frameworks in use and should only require one.
Cache the list of installed browsers. Calling `Browsers.all`
the application directly redundantly recalculates the list.
Accessing the list of installed browsers through this cache
will reduce that overhead.
* For #4977 - Support opening Fennec pinned website shortcuts in Fenix
Fennec's pinned website shortcuts are set to open the BrowserApp activity.
So we need a new activity alias to actually catch such Intents. Otherwise they
would open "org.mozilla.firefox/.App" without any way to inform that this is
the result of the user clicking on a pinned shortcut.
For actually checking if the newly received Intent is of a Fennec pinned
shortcut we introduce a new FennecBookmarkShortcutsIntentProcessor which will
prepare the Intent to open the shortcut's URL in a new tab.
* For #4977 - Don't keep IntentReceiverActivity on the back stack
For successive Fennec pinned shortcuts to create a new IntentReceiverActivity
and be processed as normal we need to not keep this as our task root.
* For #4977 - Test the FennecBookmarkShortcutsIntentProcessor
This annotation was not applied correctly and lint was unable to ensure
it was used properly: it declared an error in lint saying so but that
error was ignored. I did not know how to apply the annotation - and I
felt it had limited utility - so I removed it entirely in order to
permit the lint baseline file to be removed (it was the only error).
* For #220
- Added advanced header + locale settings item in the settings fragment
* For #220
- Added locale selection page with lib state + handling of locale changes
* For #220
- Removed registering for locale changes in the manifest, allow system
to restart activity in that scenario
* For #220
- Added unit tests for locale settings page
* For #220: fixed an outdated unit test
ga-a
Co-authored-by: Severin Rudie <Baron-Severin@users.noreply.github.com>
* For #7410: rewrite updateBookmarkFromObservableInput with coroutines
* For 7410: remove RxJava from project. :(
* For 7410: converted updateBookmarkFromTextChanges to Flow per review
* For #7352: integrate highlightable browser menu changes
* For 7352: invalidate menu when reader mode availability changes
* For 7352: removed highlight from reader mode appearance per UX
* For #7254: Replace anko applyConstraintSet
* Anko has been deprecated and will not be continued
* Refactor ConstraintSet changes
* Replace applyConstraintSet in SearchLayouts
* Refactor HomeFragment ConstraintSet
* Define anonymous ConstraintSet
* Remove ConstraintSet prefix from PARENT_ID
Uninstall engine immediately and allow reinstall in onCancel.
Set previous list with default engine in onCancel.
Keep default engine change in operation and remove now unnecessary view refresh.
* For #7219 - Use accent color for downloads dialog positive button
* For #7219 - Fixes gap beneath download notification dialog
* switch to setimageresource
This call will acquire a "write" lock at the storage layer (sqlite's reserved+),
which may interfere with migrations that run during startup as well (they need to
write to storage, and so also need to acquire a lock). If these operations clash,
we get a SQLITE_BUSY crash. For now, just disable the maintenance operation.
* Fixes#7048.
Adds extension function to check if online or not based on capabilities
Modified `buildDeviceList`
Modifies tests
* Fixing lint error for max length
Fixing test in AppRequestInterceptorTest.kt
* Adds suppression for deprecation
Moving away from using anko for ConnectivityManager instance
* Creates ConnectivityManager extension component
* Fixes#7180
Refactors test cases to fix static mocks
If the intent that starts the HomeActivity includes an extra
boolean flag named finishonboarding and it is set to true,
Fenix will "finish onboarding".
As mentioned in the class comment, we could use an alternative
implementation to measure perf from outside the application however
it's more complicated to set up and less consistent with our cold
startup methodology so we'll start with this.
Add/Remove fullscreen flags in home fragment's onResume / onPause
Change homeLayout padding to include system bars height (status&navigation).
Change homeMenu orientation to UP to properly display menu.
Change home bottomBar background to transparent.
* For #5334: added private custom tab processor
* For #5334 - Fixes up IntentReceiverActivity for handling intents
* For 5334: update styling for private custom tabbs
* For 5334: update tests to account for new processors
Note that two are still failing. These appear to be true failures, and will be corrected in a later commit.
* For 5334: fixes bug introduced by changes to IntentReceiverActivity
RCA: intent className and extra were previously set based on which processors matched, not which successfully processed. This patch reintroduces that behavior.
* For 5334: add tests for custom tabs processing
* For #5574 - Part 1: Port TabAction.SaveTabGroup to TabSessionInteractor and SessionControlController. (#6651)
- Introduces the TabSessionInteractor, SessionControlInteractor and SessionControlController classes.
- Removes the TabAction.SaveTabGroup.
* For #5574 - Part 2: Port TabAction.PrivateBrowsingLearnMore to TabSessionInteractor and SessionControlController (#6651)
* For #5574 - Part 3: Port TabAction.ShareTabs to TabSessionInteractor and SessionControlController (#6651)
* For #5574 - Part 4: Remove unused TabAction.Share and TabItemMenu (#6651)
In #2205, the tab overflow button was removed which would have shown the
TabItemMenu when clicked. So, we can remove TabItemMenu since it is not
used and as a result, we can also remove TabAction.Share since there are
no consumers.
* For #5574 - Part 5: Port TabAction.PlayMedia and TabAction.PauseMedia to TabSessionInteractor and SessionControlController (#6651)
* For #5574 - Part 6: Port TabAction.Select to TabSessionInteractor and SessionControlController (#6651)
* For #5574 - Part 7: Port Onboarding.Finish to OnboardingInteractor and SessionControlController (#6651)
* For #5574 - Part 8: Port TabAction.Close and TabAction.CloseAll to TabSessionInteractor and SessionControlController (#6651)
- Removes TabAction
* For #5574 - Part 9: Port CollectionAction.Delete to CollectionInteractor and SessionControlController (#6651)
* For #5574 - Part 10: Port CollectionAction.ShareTabs to CollectionInteractor and SessionControlController (#6651)
* For #5574 - Part 11: Port CollectionAction.AddTab and CollectionAction.Rename to CollectionInteractor and SessionControlController (#6651)
* For #5574 - Part 12: Port CollectionAction.RemoveTab to CollectionInteractor and SessionControlController (#6651)
* For #5574 - Part 13: Port CollectionAction.OpenTab to CollectionInteractor and SessionControlController (#6651)
* For #5574 - Part 14: Port CollectionAction.CloseTabs to CollectionInteractor and SessionControlController (#6651)
* For #5574 - Part 15: Introduce a HomeFragmentStore (#6651)
- We will hook up the HomeFragmentStore in later parts.
- Removes List<Tab>.toSessionBundle(context: Context) since it is unused.
* For #5574 - Part 16: Port CollectionAction.Collapse and CollectionAction.Expand to CollectionInteractor and SessionControlController (#6651)
- We assume the store is hooked up to the SessionControlController in this part,
but this work will be done in a later part.
- Removes CollectionAction.
* For #5574 - Part 20: Remove the architecture module. (#6651)
* For #5574 - Part 17: Remove duplicate subscribeToTabCollections in BrowserFragment.kt (#6651)
There is a duplicate call of subscribeToTabCollections() in both HomeFragment and BrowserFragment.
In this patch, we remove the call in BrowserFragment to avoid passing the HomeFragmentStore to
BrowserFragment in order to dispatch the CollectionsChange event.
* For #5574 - Part 18: Delete SessionControlComponent and fix TabCollection and Tab imports (#6651)
* For #5574 - Part 19: Use the new HomeFragmentStore in the HomeFragment (#6651)
- Renames SessionControlUIView to SessionControlView
* For #5574 - Part 21: Fix white screen on home fragment (#6651)
* For #5574 - Part 22: Fix formatting in SessionControlInteractor and replace See with @see in SessionControlController (#6651)
* For #5574 - Part 23: Move to metrics.track call to the beginning of handleCollectionRemoveTab (#6651)
This ensures that the metrics.track will be called immediately before the tab is removed from the collection.
* For #5574 - Part 24: Use the sessionManager getter in SessionControlController (#6651)
* For #5574 - Part 25: Use mapNotNull in List<Tab>.toSessionBundle (#6651)
* For #5574 - Part 26: Simplify closeTab and closeAllTabs functions by assigning a deletionJob constant (#6651)
* For #5574 - Part 27: Replace listOf() with emptyList() in removeAllTabsWithUndo (#6651)
* For #5574 - Part 28: Replace the Context parameter with the HomeActivity in SessionControlController (#6651)
* For #5574 - Part 29: Add test for HomeFragmentStore, DefaultSessionControlController and SessionControlInteractor (#6651)
* For #5574 - Removes running CI against the architecture debug build varient
With this patch Fennec users, who upgrade to Fenix, will not lose Firefox launcher icons they
have added to their home screen.
A side effect of this change is that the launcher entry for existing Fenix users may disappear
from the home screen for existing Firefox Preview users and they will have to re-add it.
Since the Preview audience is more accepting of breaking changes and since that group is
way smaller than the millions of Fennec users, I think that this is an acceptable breaking
change. I looked into supporting multiple launcher entries in parallel, but that got quite
complex with multiple build types and multiple manifest files. Especially if we decide
to keep a Firefox Preview build around (e.g. org.mozilla.fenix) then it would be good to
unify on a single launcher and do that as early as possible.
Thanks to the work of the team at application-services, it is possible
to asynchronously initialize the Http client and logger used by megazord
Use that power to hide the time necessary to complete this initialization
within the time that it takes to warmup the gecko runtime.
* For #5694 & #6054: Adds preference screen for toolbar
* For #5694: Adds changing toolbar position functionality
* No issue: Updates telemetry links to actually work lol 😬
* For #6054: Adds toolbar position to core ping
* For #5577 - Adds button to add a new search engine
* For #5577 - Adds custom engine store
* For #5577 - Creates a custom SearchEngineProvider
* For #5577 - Gives the ability to delete search engines
* For #5577 - Adds the UI to add a custom search engine
* For #5577 - Adds form to create a custom search engine
* For #5577 - Adds the ability to add a custom search engine
* For #5577 - Adds the ability to delete custom search engines
* For #5577 - Selects the first element on the add custom search engine screen
* For #5577 - Prevents adding a search engine that already exists
* For #5577 - Styles the add search engine preference
* For #5577 - Makes the name check case-insensitive
* For #5577 - Fix bug where home screen doesnt see new search engines
* For #5577 - Moves Search URL validation to its own type
* For #5577 - Fixes linting errors
* For #5577 - Adds the ability to edit a custom search engine
* For #5577 - Allows the user to edit a serach engine even when it is the last item in the list
* For #5577 - Adds an undo snackbar when deleting a search engine
* For #5577 - Moves all of the strings to be translated
* For #5577 - Fixes bug when deleting your default search engine
* For #5577 - Puts adding search engines behind a feature flag
* For #5577 - Navigate to custom search engine SUMO article when tapping learn more
* For #5577 - Fixes nits
* For #5577 - Uses concept-fetch to validate search string
* For #5577 - Adds string resources for the cannot reach error state
* For #4844: add test cases for url elision
* For 4844: implement toShortUrl to pass test cases
* For 4844: update plumbing to use toShortUrl
* For 4844: adds/handles suggested url elision test case
Removed label from nav_graph that caused label to be set for each navigation
Removed title setting in onCreate() called for each navigation
Changed logic for checking current root when setting UI for normal mode
* For #4281: small ToolbarMenu refactor
This makes it easier to see how items are ordered in the menuItems list
* For 4281: add QAB buttons to menu
* For 4281: removed menu back button per mocks
I double checked with UX, and we'll be relying on the hardware back button for its functionality
* For 4281: add content descriptions for bookmarking
* For 4281: updated BrowserToolbarController for new functionality
* For 4281: provided simple dependencies to browser controller
More complex changes will be in a following commit, for review readability
* For 4281: move toolbar controller dependencies up to BaseBrowserFragment
The functionality they control is being moved into the toolbar menu, which is shared by both normal tabs and custom ones
* For 4281: removed (now unused) code related to QAB
* For 4281: fix test compilation after QAB removal
Tests still need to be expanded to include added functionality
* For 4281: updated menu to show if url is bookmarked
This sloppy workaround is required because TwoStateButton requires that `isInPrimaryState` be a synchronous call, and checking whether or not the current site is bookmarked is quite slow (10-50 MS, in my tests). After days of work and many attempted solutions, this was the least abhorrent among them.
https://github.com/mozilla-mobile/android-components/issues/4915 was opened against AC to evaluate potentially supporting async `isInPrimaryState` functions.
https://github.com/mozilla-mobile/fenix/issues/6370 was opened against Fenix to investigate the unexpectedly slow call to `BookmarkStorage`.
* For 4281: update reader mode switch
* For 4281: selectively show/hide menu items
* For 4281: add reader mode appearance
* For 4281: update bookmark button when it is clicked
* For 4281: removed unused QAB code
* For 4281: removed QAB robot, updated UI tests
* For 4281: removed QuickActionSheet metrics
Since this behavior now lives in the toolbar, it is tracked via Event.BrowserMenuItemTapped
* For 4281: fixed lint errors
* For 4281: add new strings for buttons added to menu
This is necessary because the location change (from QAB to toolbar menu) could affect the grammar in some languages
* For 4281: remove outdated TODOs
* For 4281: removed QAB container
* For 4281: removed back button reference from UI test
This button no longer exists
* For 4821: Fixes a visual defect (extra padding on top of toolbar)
* For 4281: update copy on reader mode
* For 4281: fixed review nits
* Added Vibration Effect On Scanning QR Code
Added Vibration Feature for the new feature Request
Vibrate phone upon successful pairing #2928
* Added Vibration Effect On Scanning QR Code
Added Vibration Feature for the new feature Request
Vibrate phone upon successful pairing #2928
* Update PairFragment.kt
Removed unwanted blank lines
* Update PairFragment.kt
Removed the Casting with !!
When bookmark fragment is opened from homeFragment, libraryFragment does not
exists so the popBackStack(R.id.libraryFragment, true) would have failed. So
the solution for this was to pop back stack to homeFragment when the
bookmarks/history fragments are opened from homeFragment.
This fixes an issue with Samsung devices where an invisible DeviceCredentialHandler because the executor was "null" (it wasn't actually)
You *must* reuse the biometric object instead of creating a new one.
- added engine hashmap so that we create each type of search provider once
(previously the providers to be added were checked by id, but since the id
is a UUID, it was always unique -> bug with multiple providers with same engine
but different id
- refactored update() flow so that it's more understandable + remove complex
method warning
Used runBlocking to ensure we wait for the code using coroutines to execute
instead of runBlockingTest and join() since this last option led to failed
tests in CI because of
"java.lang.IllegalStateException: This job has not completed yet".
Combined all Stores into one for all Views shown in on Fragment.
Used a static `createStore()` which will build the initial state residing
inside the Store and not in the Fragment as to decouple the Fragment from the
business logic needed to build all the needed initial States.
Added Interactors that handle a MVI View's business logic for
TrackingProtectionView and WebsitePermissionsView.
WebsiteInfoView doesn't register any user input events and does not have any
reason to change while it is displayed so it does not have an Interactor.
The two Interactors will delegate Fragment's QuickSettingsController for
complex Android interactions, communication with other app features or for
Store updates.
Also refactored the stubs from the previous commit so that with this commit the
the quicksettings feature should all be working now based on lib-state.
Refactored `fragment_quick_settings_dialog_sheet` to now be composed of of
FrameLayouts placeholders in which each independent View will inflate itself.
Refactored the QuickSettingsUIView and Component to 3 standalone Views with
their own lib-state components: Store, State, Actions, Reducer.
The problem was that the parameter 'selectedTabIds' was not taken into account
when initializing the variable 'selectedTabs'. So I made the initialization
based on both the selected tab and the number of open tabs.
The bug occurred because the activity/fragment is not recreated on
orientation change. A simple fix was to just set width and height to 0dp
to let it match constraints.
- Moved toolbar coloring to extension method
- Refactored classes using it
- Removed selection mode colouring for EditBookmarkFragment toolbar,
making it only black and white (normal mode)
- added PRIVATE MODE intent extra to the notification action
(could use also the OPEN_FROM_NOTIFICATION, but I considered this one to
be more explicit. Kept the old one in case other checks will be done
filtering for it)
- added intent? param to the getPrivateModeFromIntent method, because
onNewIntent() method does not set the activities intent, and it was needed
to be used both in onCreate() and onNewIntent()
This bug occurs because the activity/fragment is not recreated on
orientation change. A simple fix was to just set width and height to 0dp
to let it match constraints.