Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.
Differential Revision: https://phabricator.services.mozilla.com/D9271
In this case the profile name will be null, situation already handled, in which
a telemetry ping about the crash will not be sent but the crash can still be
reported to crash-stats.
Differential Revision: https://phabricator.services.mozilla.com/D12741
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D10775
Even if the GeckoApp activity is destroyed, the user's tabs remain open as long
as the app process itself isn't killed.
Therefore, for users who aren't automatically restoring their previous session's
tabs on startup, there's no point in renaming the current session store file so
it appears under "Recently closed" instead of being automatically restored,
unless we're really doing a cold startup (and hence mIsRestoringActivity is
false).
This also better matches what we do when we *are* automatically restoring tabs:
We only do it when !mIsRestoringActivity, too.
Differential Revision: https://phabricator.services.mozilla.com/D11800
The page loading indicator should be animated while it is visible.
Previously for controlling the animation the visibility state of the parent
Drawable - ShiftDrawable would be checked, which in all cases would return
true, so the animation would run indefinitely.
The patch modifies setVisible() in accordance with the Framework version of
DrawableWrapper to corectly set the visibility of both the wrapper and the
wrapped drawables so that isVisible() will now return the correct value which
will allow stopping the animation.
Differential Revision: https://phabricator.services.mozilla.com/D12552
Summary:
Speculative fix.
initialize() is called by Gecko on it's background thread after it started.
The value for the "dom.audiochannel.mediaControl" preference also comes on a
background thread.
This both can end up registering the HeadSetStateReceiver while unregistering it
happens only on the main thread.
The patch tries to avoid the race condition by making sure Receiver's
registering and unregistering is done serially on the main thread.
Depends on D12032
Reviewers: JanH
Reviewed By: JanH
Subscribers: jya
Bug #: 1505685
Differential Revision: https://phabricator.services.mozilla.com/D12033
Summary:
Executing SwitchBoard.loadConfig() on a background thread is the main purpose
of the AsyncConfigLoader so executing it immediately again in the same thread
is redundant.
Depends on D12031
Reviewers: JanH
Reviewed By: JanH
Bug #: 1505685
Differential Revision: https://phabricator.services.mozilla.com/D12032
Summary:
Speculative fix for avoiding the situation in which the initialization of Mma
and registering of the PackageAddedReceiver continues on the background thread
after BrowserApp is destroyed and calls for unregistering the receiver.
By registering the receiver on the main thread we have the benefit of
sequentially execution which would guarantee that the registration is done
before trying to unregister it.
Reviewers: JanH
Reviewed By: JanH
Bug #: 1505685
Differential Revision: https://phabricator.services.mozilla.com/D12031
Summary:
Speculative fix.
initialize() is called by Gecko on it's background thread after it started.
The value for the "dom.audiochannel.mediaControl" preference also comes on a
background thread.
This both can end up registering the HeadSetStateReceiver while unregistering it
happens only on the main thread.
The patch tries to avoid the race condition by making sure Receiver's
registering and unregistering is done serially on the main thread.
Depends on D12032
Reviewers: JanH
Reviewed By: JanH
Subscribers: jya
Bug #: 1505685
Differential Revision: https://phabricator.services.mozilla.com/D12033
Summary:
Executing SwitchBoard.loadConfig() on a background thread is the main purpose
of the AsyncConfigLoader so executing it immediately again in the same thread
is redundant.
Depends on D12031
Reviewers: JanH
Reviewed By: JanH
Bug #: 1505685
Differential Revision: https://phabricator.services.mozilla.com/D12032
Summary:
Speculative fix for avoiding the situation in which the initialization of Mma
and registering of the PackageAddedReceiver continues on the background thread
after BrowserApp is destroyed and calls for unregistering the receiver.
By registering the receiver on the main thread we have the benefit of
sequentially execution which would guarantee that the registration is done
before trying to unregister it.
Reviewers: JanH
Reviewed By: JanH
Bug #: 1505685
Differential Revision: https://phabricator.services.mozilla.com/D12031
Leaving the Fennec process running after a swipe-to-kill puts Fennec in an unrecoverable state; this ensures we kill the process anytime a user swipes-to-kill Fennec and therefore lets us recover as usual.
Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.
Differential Revision: https://phabricator.services.mozilla.com/D9271
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D10775
Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.
Differential Revision: https://phabricator.services.mozilla.com/D9271
We're already have some special handling in the Android UI when detecting
MOZ_PROFILER_STARTUP, so we might as well handle MOZ_PROFILER_SHUTDOWN, too.
This means two things:
1. In order to actually quit the app, the "Quit" button needs to be enabled.
2. We need to wait until we're sure that the profile has been dumped to disk
before finishing the activity (and thereby possibly killing our process).
Differential Revision: https://phabricator.services.mozilla.com/D11696
Although this two receivers are guarded by checks for if they were initialized
(and so registered) there are reports of crashes because of trying to unregister
them without them actually being registered.
The underlying issue will be investigated further in bug 1505685 but for the
moment wrapping the unregister operations in a try-catch saves the users from
a crash and because the unregister is done when the app is closed
(for the MmaDelegate receiver) or when the app finished playing media
(for the GeckoMediaControlAgent receiver) the user doesn't loose any
functionality going forward.
Differential Revision: https://phabricator.services.mozilla.com/D11177
`mExtensionPermissionsHelper` is initialized in BrowserApp's onCreate() and
nullified in it's onDestroy().
GeckoApp's onCreate() can finish after BrowserApp's onDestroy() because it uses
background initialization.
`mExtensionPermissionsHelper` will be checked for null before using it and
if null it's safe to ignore it's method's results as it only can be null if the
app was already closed.
Differential Revision: https://phabricator.services.mozilla.com/D10910
The media and default channels are changed as per comment 2 of this bug.
I'm keeping the location service string as it is, though, as our settings UI
uses "&vendorShortName; Location Service" as well.
Differential Revision: https://phabricator.services.mozilla.com/D10771
Needed to allow localizers more control over what needs to be translated in a
String that contains another already translated String that should be bolded.
Differential Revision: https://phabricator.services.mozilla.com/D9629
Sharing tabs with file:// URIs is not possible, but users can still send them to
other apps via the helper app system in the URL bar/context menu. "Intent:Open"
and "Intent:OpenForResult" are both sent from Gecko by HelperApps.jsm.
The same reasoning as in bug 1450449 applies as to why for publicly accessible
files content:// URIs are more trouble than they're worth.
Differential Revision: https://phabricator.services.mozilla.com/D9420
1. The patch from bug 1476710 was nonsense and had the same effect as simply
deleting that line, because the ChildFragmentManager is only of interest if
the TabHistoryFragment loaded further Fragments itself.
2. The issue at hand is that under some circumstances the TabHistoryFragment
will be trying to dismiss itself while its responsible FragmentManager is
already busy transacting some Fragment state changes. More precisely, the
fact that the Fragment is calling popBackStack*Immediately*, which isn't
allowed if the FragmentManager is already handling some other transaction.
3. The dismiss() calls in response to the onClick() handlers are unproblematic,
because they won't trigger any FragmentManager activity through any route
other than the dismiss() call itself.
4. The dismiss() calls in onPause() *are* problematic because the Fragment-
Manager will already be busy pausing the TabHistoryFragment, so triggering a
further synchronous transaction is not allowed (and originally caused
bug 1476710).
5. If the onPause() call happened because some external entity was attempting to
remove the fragment (either BrowserApp directly, or indirectly by forwarding
a back button press to the FragmentManager), then the Fragment trying to
additionally remove itself is unnecessary.
6. If the onPause() call happens because the containing activity itself is being
paused, then the Fragment being dismissed is the desired outcome (see
bug 1093209), however the Fragment won't be able to remove itself because
a) A synchronous transaction is illegal at that point in time.
b) An async transaction would be possible, but might not complete until after
onSaveInstanceState() had subsequently already been called, which again
would be illegal because of state loss.
c) An async transaction allowing state loss would succeed in any case, but
would mean that if BrowserApp was subsequently destroyed while in back-
ground and then later recreated from the savedInstanceState, the Tab-
HistoryFragment would be recreated as well, which is undesired.
7. Therefore, the only way to dismiss the TabHistoryFragment when the containing
activity is pausing is to synchronously dismiss the Fragment from inside the
activity, *before* the onPause() call is forwarded to the FragmentManager.
8. Calling dismiss() in response to onDestroy() is unnecessary, because the
Fragment is already irrevocably being removed as soon as we hit onPause().
9. Because it doesn't make sense to have multiple TabHistoryFragments active at
the same time, we also change the logic such that any attempt to show a new
TabHistoryFragment will now replace the previous fragment.
This is also useful in view of the fact that in order to close the Fragment,
BrowserApp retrieves it by calling findFragmentByTag(), which simply returns
the first matching Fragment, i.e. wouldn't properly handle things if we ever
accidentally ended up with multiple Fragment instances active at the same
time.
Differential Revision: https://phabricator.services.mozilla.com/D8680
`<input type=datetime>` was dropped from the spec many years ago,
and is not supported by the platform. To JS code, it looks like a
regular text input box.
With removed support for "datetime" inputs, we can also fix a bug in the
InputWidgetHelper. Due to the use of getAttribute, if the attribute
value was capitalized, then the special date/time picker UI would not be
shown. This is corrected by using the "type" property instead.
I verified on Android Nougat that all other input types (date,
datetime-local, week, month, time) still work as intended.
Depends on D8668
Differential Revision: https://phabricator.services.mozilla.com/D8666
When a time input expects seconds, e.g. via `<input type=time step=1>`,
then the UI should show a way to input seconds.
On Nougat, `data:text/html,<input type=time step=1>`,
the UI used to show a clock to select hours and minutes.
As of this commit, three spinners are shown (HH mm ss),
and if 24-hour mode is disabled, four of them (HH mm ss AM).
Depends on D8667
Differential Revision: https://phabricator.services.mozilla.com/D8668