Commit Graph

266 Commits (af233106794ff2b809f37f8deaf445e4cf1fb2d7)

Author SHA1 Message Date
Michael Comella 993428cd0f For #17969: add duration probes for App.onCreate and HomeActivity.onCreate. 3 years ago
Michael Comella b3ef8a11e8 For #17816: add profiler marker for onPreDraw via HomeActivity.onStart.
This may be useful for MAIN start up to determine when the user begins
seeing content.
3 years ago
Michael Comella 4de49c7585 For #17816: add profiler marker for 2x Activity.onCreate.
The IntentReceiverActivity one is particularly useful to quickly determine
when we can begin executing code in the WARM VIEW case (i.e. "Set selection
begin here").

The HomeActivity one is useful for COLD start up analysis in similar
ways and to see the Activity transitions in WARM VIEW.
3 years ago
ekager f5b068a453 For #17785 - Use screenshots setting when adding secure flag 3 years ago
Jonathan Almeida 824f3fd821 Issue #1340: Forward Activity results to the fragment 3 years ago
MarcLeclair 24bce64e0b
16373 Count the # of inflations done on startup (#16778)
* For #16373: Added performance Inflater to counter # of inflations

This class is quite straight forward. The only thing that I have to point out is the onCreateView method. It usually
calls its super if you don't override it. The problem with that is that the super.onCreateView actually uses
android.view. as a prefix for the XML element it tries to inflate. So if we have an element that isn't part
of that package, it'll crash. As I said in the code, a good example is ImageButton. Calling android.view.ImageButton
will make the app crash. The method is implemented the same way that PhoneLayoutInflater does (Another example
is the AsyncLayoutInflater)

* For #16373: Added test for PerformanceInflater

This test got quite awkward / complicated fast.  I wanted to test the  to make sure we don't break *any* of our layouts
and to do so, I decided to just retrieve all our XML in our /res/layout folder. However, this gets quite a bit outside of a unit test scope.
The point was to get every layouts and get their LayoutID through the resources using the testContext we have. It gets even weirder, since some
of the XML tags have special implementation in android. One of them is the <fragment> tag. That tag actually is inflated by the OS using the Factory2
that the Activity.java implements. In order to get around the fragment issue, we just return a basic FrameLayout since the system LayoutInflater doesn't deal
won't ever get a <fragment> tag to inflate. Another issue was the <merge> tag. In order to inflate those, you need 1) a root view and 2) attach your view to it.
In order to be able to test those layouts file, I had to create an empty FrameLayout and use it as the root view for testing. Again, I know this is beyond the spirit of a unit test but if we use this inflater, I think it should make sure that no layouts are broken by it.

* For #16373: Overrode getSystemService to return PerformanceInflater

This allows PerformanceInflater to be called in every inflation to keep track of the number of inflations we do.

* For #16373: Added UI test for # of inflations

* For #16373: Lint fix

* For #167373: Changed the LayoutInflater cloneInContext to take this instead of inflater

The inflater parameter is set on the first call from the OS from  the Window object. However, the activity itself sets multiple factories on the inflater
during its creation (usually through AppCompatDelegateImpl.java). This means that, once we initially set the inflater with a null check, we pass an inflater
that has no factory initially. However, since we keep a reference to it, when cloneInContext was called, it cloned the inflater with the original inflater
which didn't have any factories set up. This meant that the app would crash on either browserFragment creation or any thing that required appCompat (such as
ImageView and ImageButton). Now, passing itself with a cloneInContext means we keep all the factories initially set by the activity or the fragment.

* For #16373: Fixed code issues for PR. No behavior change

* For #16373: fixed some code nits
3 years ago
Gabriel Luong 846d618c06
For #16941 - [Telemetry] Bookmark Counts (#16942) 3 years ago
Christian Sadilek 3722033a5c For #16032: Support installing recommended add-ons from AMO 4 years ago
Sebastian Kaspari 2b759e9d6f Integrate new search code from Android Components into Fenix. 4 years ago
ekager f520586dcd
For #12062 - Remove feature flag for return to browser (#16622) 4 years ago
Christian Sadilek fbbc25b54e Closes #16053: Fix crash when closing private tabs via notification 4 years ago
Christian Sadilek 0fbc8410a4 Closes #16430: ExternalAppBrowserActivity should not handle incoming intents 4 years ago
ekager aae43b84eb
For #12062 - Feature Flag return to browser (#16099) 4 years ago
Christian Sadilek c852301c93 Closes #11286: Add TelemetryMiddleware to remove Session[Manager] observers 4 years ago
ekager e56043c485 For #15265 - Save cached top sites for metrics ping 4 years ago
ekager cbe293d3e4 For #12062 - Launch back to browser if we previoulsy had tabs 4 years ago
sraturi 8f16f9cb37 for #10069 added AppLaunchTimeMeasurement.kt to handle logic of startup time for cold, warm, and hot startup types. 4 years ago
ekager ec3595d4fc For #15600 - Move removal of timed out sessions to immediately after restoration 4 years ago
Michael Comella d767cd199e For #13959: fix startup crash by using arg Context.
The `context` member function returns null in attachBaseContext so we
need to use the Context that's being attached instead.
4 years ago
Michael Comella f19c9920f9 For #13959: move resetAfter into StrictModeManager.
In a followup PR, we need to add state to strictModeManager (the
number of suppressions). This is much simpler to do when this is defined
as a class rather than an object. However, when this is defined as a
class, `resetAfter` needs access to the strictModeManager. Instead of
passing it in as an argument, it made sense to move this function onto
the strictModeManager instead.

Since folks are used to calling:
```
StrictMode.ThreadPolicy.allowThreadDiskReads().resetAfter
```

We're going to have to add a lint check to prevent them from doing that.
4 years ago
Michael Comella 6abeb2d9e7 For #13959: change StrictModeManager to class from object.
I originally tried to create this PR leaving this as an object to keep
the change simple but it wasn't worth it - once the object started to
keep state, we'd need to manually reset the state between runs. Also,
the tests were already getting hacky with static mocking so it was
easier to address some of those issues this way too.
4 years ago
Michael Comella 2c1befaa25 For #13959: rename to attachListenerToDisablePenaltyDeath for clarity. 4 years ago
Grisha Kruglov 24985d54fa Closes #15436: Auto-close tabs during startup on the main thread 4 years ago
Elise Richards 1adf467248
For #14280, #14743: Remove old search fragment (#15169)
* Remove search fragment

* Use new folder to search dialog

* Rebase and lint

* Update tests with search dialog nav directions

* Rename interactor to match naming convention. Remove old controller and point everything to the dialog controller.
4 years ago
Grisha Kruglov 71b51146cb Update breaking changes in the FxA/Sync integration 4 years ago
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 4 years ago
ekager de7e6663ce Closes #14895 - Adds paste to context menu ordering preference 4 years ago
ekager 2d67e4b748 For #4118 - Creates setting for auto closing tabs 4 years ago
Kainalu Hagiwara d668a82f14
For #13498 - Use custom long press back handling for Huawei devices. (#14387) 4 years ago
Sachin 316b70940f
for #12573, added startup type and hasSavedInstance keys to app_startup_type telemetry (#13494) 4 years ago
Jeff Boek c73870b794 For #13507 - Performance fixes for the ReviewPromptController 4 years ago
Jeff Boek 56b730f0e8 For #13507 - Extracts review prompt behavior into ReviewPromptController 4 years ago
Tiger Oakes 0b333fe48a For #9056: Search from custom tab 4 years ago
Sebastian Kaspari 4782705af9 Add diagnostic breadcrumbs for debugging "Display already aquired" crashes.
For:
https://github.com/mozilla-mobile/android-components/issues/7960
4 years ago
sraturi 5ccbca25c0 for #13479, added a VisualCompletenessQueue.kt class to handle all the functionality related to visual completeness 4 years ago
Jonathan Almeida f614c0b18d For #12287: Add Synced Tabs to Tabs Tray 4 years ago
Tiger Oakes 57e557fd18
Use AC version of PrivateNotificationService (#12459) 4 years ago
Sawyer Blatz e42a8f5fa2 For #11531: Fixes some issues with default event not firing 4 years ago
Sebastian Kaspari 77263aad70 Validate deep links. 4 years ago
ekager 5d664b979d For #6313 - Removes unused browser animations, improve delayed paint interactions 4 years ago
Jeff Boek ccb5b0b641
Wires up controller, store and interactor. (#13324)
* For #13320 - Wires up the search store, controller and interactor for the new search experience

* For #13323 - Navigates to new search experience from the browser when enabled
4 years ago
Tiger Oakes 1d28f63737
Closes #12522: Reuse exceptions code (#13047) 4 years ago
Sawyer Blatz bb03049fb5 Add documentation 4 years ago
Sawyer Blatz 8bfc493568 For #12103: Add ChangedDefaultBrowser event for leanplum 4 years ago
sraturi 537d95c04d for #11830 created class containing the logic for sending AllStartup telemetry logic
lint check

renamed the intentReceived telemetry to appOpenedAllSource

added comments

removed unused code

moved lifecycle process to AppAllSourceStartTelemetry

moved tracking event out of init function

lint fix

moved appAllStartTelemetry to components

added bit more info about the metrics

added the  onReceivedIntent metric back

minor fix

change discriptions based on the comments frm MR

wrote test cases for AppAllSourceStartTelemetry.kt

lint fix

test case to mock application going background

post rebase:

post rebase:

fixed nit from comments

fixed nit from comments

fixed nit from comments

lint fix

lint fix
4 years ago
Jonathan Almeida d15b8381a6 For #10925: Fix breaking APIs in tabs tray 4 years ago
Kainalu Hagiwara 921b16233b For #1048 - Add ability to view tab history by long-pressing the back or forward button. 4 years ago
Tiger Oakes c2d940cf06
Use AC RunWhenReadyQueue (#12800) 4 years ago
Tiger Oakes c08d375c18
Move settings in components (#12675) 4 years ago
Michael Comella fcb84d940a No issue: correct position of StartupTimeline; add warning. 4 years ago