Commit Graph
271 Commits
Author SHA1 Message Date
Carsten "Tomcat" Book dc21916166 merge mozilla-inbound to mozilla-central a=merge 2017-03-02 14:02:48 +01:00
Dylan Roeh 68a41fec08 Bug 1305815 - Issue EOL warning if non-NEON-compatible device detected. r=glandium 2017-03-01 13:26:12 -06:00
Tom Klein 8c1ad00722 Bug 1216489 - 3. Remove unnecessary touch intercept code for TabsPanel. r=sebastian
MozReview-Commit-ID: 7pf9GRLgHXg
2016-11-30 18:30:57 -06:00
Jan Henning 05d9f4c323 Bug 1337115 - Part 1 - Make "Is first run" pref generally useable. r=sebastian
This pref could be useful for things outside of the TelemetryCorePingDelegate as well, so we have it live in GeckoApp now.

MozReview-Commit-ID: 2JZ3vNqSzcl
2017-02-23 22:16:26 +01:00
Michael Kaply 8702aa26dd Bug 1332562 - OMA Downloads should go to the system Download directory. r=snorp
MozReview-Commit-ID: 48fGzGYBoS6
2017-02-23 12:27:43 -06:00
Michael Kaply 7e3ae86ebb Bug 1330714 - Allow distributions to override firstrun wizard. r=rnewman
MozReview-Commit-ID: 8vEqApRi9bC
2017-02-17 11:33:03 -06:00
Andrzej Hunt 7b889268ba Bug 1336084 - Remove unneeded isForegrounded() call r=sebastian
I accidentally added this while working on a fix for Bug 1120441,
and forgot to remove it before landing. This call isn't harmful,
but it's unnecessary.

MozReview-Commit-ID: FrnhoYWFvKR
2017-02-02 10:37:58 -08:00
Jim Chen efb7112fd1 Bug 1333590 - 2. Convert SearchEngine observers to events; r=sebastian
Convert the "SearchEngine:*" observers to events that go through
GlobalEventDispatcher.
2017-02-01 17:35:44 -05:00
Sebastian Kaspari b07d54df7e Bug 1334562 - DLC: Start study action from BrowserApp.onCreate() and never in automation. r=ahunt
Previously we started the DLC service from GeckoApplication. The reason for that was that we wanted to
download content like fonts as early as possible so that they are available the next time we display
a website.

However we do not know whether we are running in automation until the BrowserApp activity is launched.
This patch will start the service from BrowserApp.onCreate() now if we are not running in automation.

MozReview-Commit-ID: C3Ob6S3yve4
2017-01-30 17:41:38 +01:00
Andrzej Hunt 2c77f31a23 Bug 1120441 - Don't try to show tab-history panel if app has been shutdown r=sebastian
Showing the tab history panel involves a gecko call to retrieve tab history. This
can be slow, meaning we have no idea what state the app will be in when the tab
history data is returned. Thus we need to protect the code that shows the tab
history fragment against a number of scenarios to avoid crashes in those cases
where the app might be shutting down:

1. If onSaveInstanceState() has been called (which might happen before or after onPause(),
   and might be linked to app shutdown - but the docs don't appear to give any guarantees),
   fragment transactions cannot be performed. We protect against this by accepting loss
   of state in fragment transactions.
2. If the Activity has been completely destroyed, trying to perform a fragment transaction
   will likewise fail. We protect against this by not even trying to perform the transaction
   if we definitively know that the Activity is being shut down (ie isFinishing()).

In both of these cases, we simply must accept that we're potentially losing UI state: i.e.
a user could request the tab history panel via long-back-press, followed by exiting the app;
we now end up never ever showing the panel. This scenario doesn't seem like a major loss - and
fixing this issue properly would require significant investment (i.e. we would need to either
cache tab history on frontend side, or cache the tab-history panel request - and it's not clear
users will still care about seeing the panel the next time they open firefox).

MozReview-Commit-ID: JsAK1By8yqn
2017-01-18 22:09:20 +01:00
Swaroop Rao 36b3e1de43 Bug 1328837 - Move 'Switchboard' code into our module/package. Refactored SwitchBoard component to pull it into the app module. r=sebastian
MozReview-Commit-ID: HfypfVFdPwP
2017-01-28 16:26:13 -05:00
Michael Kaply 18dcdf3fef Bug 1107942 - Allow zh-CN distribution to add Quit menu. r=sebastian 2017-01-23 17:43:47 -06:00
Nevin Chen e8796c5cf9 Bug 1275662 - Close all tabs and clean up session files when "Open Tabs" is selected in "Clear private data on exit" or "Clear private data" pref. r=JanH,sebastian
MozReview-Commit-ID: GoUQVDIzYbI
2016-12-29 14:22:45 +08:00
Dale Harvey daf3f9c959 Bug 1234558 - Use icons from app manifest. r=marcosc, r=sebastian 2017-01-17 18:24:53 +00:00
Carsten "Tomcat" Book 68ef3b46e9 Merge mozilla-central to mozilla-inbound 2017-01-11 16:37:37 +01:00
Tom Ritter 739ebe9eab Bug 1314784 - Add an 'Is Orbot Installed' telemetry probe. r=bsmedberg,sebastian
MozReview-Commit-ID: IlTLcVtycj8
2017-01-10 14:13:15 -06:00
Sebastian Kaspari 310235f997 Bug 1319017 - browser.js addEngine(): Use icon pipeline to load search engine icon. r=Grisha,maliu
I missed this part of the code when refactoring the icon code in bug 1290014 - because this code
never used our favicon loader but instead accessed the database directly. Now this code is using
the same pipeline we use from Java code and should therefore always load (or generate) an icon.

MozReview-Commit-ID: 9WPvTW1uscI
2017-01-10 14:15:33 +01:00
Sebastian Kaspari 40d524ea1d Bug 1323408 - Do not show first run tour in guest profiles. r=nechen
MozReview-Commit-ID: 42FcUvGzRr9
2017-01-05 13:12:52 +01:00
Adrian Zatreanu 1682d3fa79 Bug 1316008: Use explicit charset encoding r=nechen,sebastian
MozReview-Commit-ID: 3y2CKQZrLtl
2016-11-29 20:42:08 +02:00
Shan 7d1bbb428a Bug 1316021 - Remove unnecessary static fields; r=sebastian 2016-12-19 17:37:33 +01:00
Jim Chen 5a3f21320a Bug 1321418 - Use GekcoBundle events in GeckoApp/BrowserApp; r=snorp r=sebastian r=gbrown
Bug 1321418 - 1. Use GekcoBundle events in GeckoApp; r=snorp r=sebastian

Switch GeckoApp to using GeckoBundle events everywhere. UI or Gecko
events are used if the event requires the UI or Gecko thread,
respectively, and background events are used for all other events.

There are changes to some other Java classes, such as SnackbarBuilder
and GeckoAccessibility, due to the switch to GeckoBundle.

For "Snackbar:Show", we need the global EventDispatcher because the
event can be sent to both GeckoApp and GeckoPreferences. Howveer, we
only want one listener registered at the same time, so we register and
unregister in GeckoApp's and GeckoPreferences's onPause and onResume
methods.

Bug 1321418 - 2. Use appropriate JS EventDispatcher to send GeckoApp events; r=snorp r=sebastian

Change JS code that sends events to GeckoApp to use either the global
EventDispatcher or the per-window EventDispatcher.

"Session:StatePurged" is not used so it's removed. "Gecko:Ready" in
geckoview.js is not necessary because it's only used for GeckoApp, so
it's removed from geckoview.js.

Bug 1321418 - 3. Use GeckoBundle events in BrowserApp; r=snorp r=sebastian

Switch BrowserApp to using GeckoBundle events, in a similar vein as
GeckoApp. UI or Gecko events are used if the event handlers required UI
or Gecko thread, respectively, and background events are used for all
other events.

Some other Java classes also have to be modified as a result of
switching to GeckoBundle.

Bug 1321418 - 4. Use global EventDispatcher to send BrowserApp events; r=snorp r=sebastian

Change JS code that sends events to BrowserApp to use the global
EventDispatcher instead of "Messaging".

Bug 1321418 - 5. Update usages of events in tests; r=gbrown

Update cases where we use or wait for events in tests.
2016-12-09 12:32:45 -05:00
Jim Chen 5079eff930 Bug 1319496 - 5. Change prompt response to use GeckoBundle; r=sebastian
Change prompt response from using JSONObject/String to using
GeckoBundle. The GeckoBundle is automatically translated to a JS object,
like before, when dispatched to JS code.
2016-11-29 12:25:53 -05:00
Jim Chen 813eafff12 Bug 1319496 - 3. Convert prompts to BundleEventListener; r=sebastian
Convert prompts to use BundleEventListener and GeckoBundle.

DefaultDoorHanger.setOptions accepts a JSONObject argument, but if we
converted it to GeckoBundle, it would involve a lot of extra changes in
the other doorhanger code. So this patch adds GeckoBundle.fromJSONObject
and converts JSONObject to GeckoBundle within
DefaultDoorHanger.setOptions. In the future, another patch would convert
all doorhanger code to use GeckoBundle instead of JSONObject.
2016-11-29 12:25:53 -05:00
Sebastian Kaspari 2f2ad2fcef Bug 1315206 - BrowserApp: Remove unneeded cast of BrowserAppDelegate objects. r=ahunt,maliu
MozReview-Commit-ID: 22eEGFr4lFo
2016-11-02 20:14:28 +01:00
Sebastian Kaspari fe2a0728da Bug 1315206 - Move Adjust related code from BrowserApp to delegate implementation. r=ahunt,nechen
MozReview-Commit-ID: IbTZKdWgPGc
2016-11-02 20:13:36 +01:00
Sebastian Kaspari 8564ac9007 Bug 1315206 - Move getIsInAutomationFromEnvironment from BrowserApp to IntentUtils. r=ahunt,walkingice
MozReview-Commit-ID: AAFW9PzoVVN
2016-11-02 20:00:45 +01:00
Grisha Kruglov 3dd6f6d61a Bug 1301717 - Limit what we extract, store incoming page metadata r=sebastian
We only extract metadata that we'd want to store. For now this is just image_url.

In case we try to store page metadata before corresponding history record has been inserted,
we queue up metadata and wait for an event from GlobalHistory letting us know that history
record is now available, at which point we try inserting metadata again.

MozReview-Commit-ID: 2FpIqc6uHMb
2016-11-04 13:39:50 -07:00
KuoE0 e59d0f7580 Bug 1313601 - Disable presentation mode when taps disconnect from Chromecast on Android Notification Bar. r=sebastian
MozReview-Commit-ID: Ge83JjnPSJg
2016-10-28 16:26:03 +08:00
Sebastian Kaspari de17b82f1b Bug 1313391 - Move HLS video playback behind a switchboard flag. r=snorp
This will allow us to ship the feature to a subset of the users or pull the feature without
needing to release a new version of the app.

MozReview-Commit-ID: 3rGLT29wuyC
2016-10-28 20:16:56 +02:00
Michelangelo De Simone 74c25bed4b Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan
MozReview-Commit-ID: ENmSuOCdTnA
2016-10-17 17:26:51 -07:00
Sebastian Hengst faa4e03c25 Bug 1304829 - rename RELEASE_BUILD to RELEASE_OR_BETA: main part. r=ted,Mossop
MozReview-Commit-ID: 1lCt0xTMV5O
2016-10-08 11:14:49 +02:00
Carsten "Tomcat" Book c7df17937d merge fx-team to mozilla-central a=merge 2016-10-06 11:57:36 +02:00
Jim Chen 0044906898 Bug 1305498 - Refactor notification code to be more concise; r=sebastian
Bug 1305498 - 1. Remove NotificationClient task queue; r=sebastian

Not sure why we needed a task queue for NotificationClient actions. The
actions all go through IPC and are non-blocking, so it's perfectly fine
to perform them off of whatever thread we're on.

Bug 1305498 - 2. Integrate NotificationHandler et al into NotificationCllient; r=sebastian

There's no reason to have NotificationHandler, AppNotificationClient,
and ServiceNotificationClient all separate from the base
NotificationClient class. This patch adds the functionality of
those three classes to NotificationClient.

The notifications hash map is changed from a ConcurrentHashMap to a
regular HashMap with synchronization because I think the use case here
doesn't warrant the added performance and overhead of ConcurrentHashMap.

NotificationService is changed to match the new NotificationClient. Now
the only job for NotificationService is to set a notification as
foreground, rather than to manage all notifications like before.

NotificationHandler, AppNotificationClient, and
ServiceNotificationClient will be removed in a later patch.

Bug 1305498 - 3. Set NotificationListener in GeckoApplication; r=sebastian

Set NotificationListener once in GeckoApplication.onCreate, instead of
spreading it out in GeckoApp, BrowserApp, and GeckoService. This is
possible because there's no longer a distinction between
AppNotificationClient and ServiceNotificationClient in the new,
consolidated NotificationClient.

Bug 1305498 - 4. Remove obsolete notification classes; r=sebastian

Remove AppNotificationClient, ServiceNotificationClient, and
NotificationHandler, now that they've all been replaced by the new,
consolidated NotificationClient.

Bug 1305498 - 5. Use NotificationReceiver for web notification callbacks; r=sebastian

Previously, web notification callbacks went to GeckoApp directly, but
that presented some problems such as not being able to implement the
on-close callback, because we don't want to launch GeckoApp when the
notification is closed by swiping. This patch makes us use
NotificationReceiver for callbacks, and let NotificationReceiver launch
GeckoApp if necessary.

Bug 1305498 - 6. Don't keep notification cookie in native code; r=sebastian

Keep the notification cookie a single location (in the notification
intent itself), and simplify the native notification handling code.

Bug 1305498 - 7. Use NotificationReceiver for persistent notifications; r=sebastian

Currently, persistent notification callbacks go through a different code
path, but it'd be more consistent and correct to let persistent
notification callbacks go through NotificationReceiver as well.

This takes care of some housekeeping work that was missing for
persistent notifications, such as deleting the mNotifications entry when
the notification is closed.
2016-10-05 21:52:32 -04:00
Tushar Saini (:shatur) 75462f42df Bug 1261041 - Remove feature11Plus-feature15Plus flags. r=sebastian
MozReview-Commit-ID: J4uXtUrjuKr
2016-09-22 21:20:23 +05:30
Sebastian Kaspari 39a27c4757 Bug 1301715 - BrowserApp: Receive metadata from event. r=ahunt
MozReview-Commit-ID: 7rND7R09Pj6
2016-09-08 10:20:44 +02:00
Andrzej Hunt d1217ca7a5 Bug 1307779 - Only start long-press timer for back button r=sebastian
Huge oversight in my original patch. Pressing any hardware button will result
in the history list being shown after the long-press delay (regardless of long-pressing).

MozReview-Commit-ID: KO8u0NzTxaO
2016-10-05 18:14:12 +02:00
Andrzej Hunt 2050d209eb Bug 1304688 - Implement long-press timer to workaround broken onKeyLongPress on Android N r=sebastian
Note: we also change the return value of a long-press when the tab history fragment is showing:
we want to completely ignore long-presses in this case, previously we used to return false in this
case, which suggests that we didn't handle the event - however we explicitly consider this a no-op,
so should return a value reflecting that (in reality: no one else handles the long-press, so this
makes no effective difference).

MozReview-Commit-ID: FYrCVsNHfjv
2016-09-27 09:42:44 -07:00
Dylan Roeh fe71e50630 Bug 1305086 - Move code from GeckoApp.onDestroy() to BrowserApp.onDestroy() so that finishing a CustomTabsActivity doesn't kill the process. r=snorp 2016-09-28 15:44:26 -05:00
Dylan Roeh 45a079c5d5 Bug 1294821 - De-singletonize EventDispatcher and make it application-specific. r=jchen 2016-09-27 11:07:24 -05:00
James Willcox a604770e41 Bug 1301043 - Remove HLS player if you switch tabs in Fennec r=ahunt 2016-09-20 15:54:00 -05:00
Jim Chen 71c4727c5e Bug 1258472 - 2. Move guest mode state management to GeckoProfile; r=nalexander
Because guest mode is intimately tied to the profile, it'd be hard to
keep guest mode out of geckoview code entirely, But we also don't want
any dependency on GuestSession from geckoview code, so this patch moves
the part of GuestSession that manages guest mode state to GeckoProfile.
2016-09-14 13:33:09 -04:00
Jim Chen 0efa8e0f16 Bug 1258472 - 1. Start first-run telemetry session outside of GeckoProfile; r=nalexander
Move the first-run telemetry session from GeckoProfile to BrowserApp, so
there is no longer any dependency on Telemetry from inside GeckoProfile.
2016-09-14 13:33:09 -04:00
Jim Chen 44870b81a5 Bug 1291384 - 2. Convert GeckoProfile.getDB calls to BrowserDB.from calls; r=nalexander
Mass convert GeckoProfile.getDB() calls to BrowserDB.from() calls,
whether using Context or GeckoProfile.
2016-09-14 12:46:50 -04:00
Jan Henning 786582848c Bug 1277978 - Part 2 - Allow saving a cached recent tabs count in BrowserApp. r=liuche
Getting the total number of recently closed tabs involves waiting for Gecko to actually send the closed tabs to the Java UI. This means that (unless there are some "Tabs from last time" present) when showing the history panel we always start out with the Recently closed folder hidden and then unhide (and animate) it once we've finally received the closed tabs.

Because this is visually distracting, we should cache the closed tabs count somewhere, so we can decide on the smart folder visibility as soon as the CombinedHistoryAdapter initialises.

MozReview-Commit-ID: 8uYCbM7eiSt
2016-08-29 20:03:12 +02:00
Jan Henning 327cce367a Bug 1277978 - Part 0b - Add target api annotation in BrowserApp. r=liuche
Otherwise Android Studio complains because it doesn't recognise our version switch.

MozReview-Commit-ID: 2QpD3nNSryK
2016-08-20 16:59:59 +02:00
Carsten "Tomcat" Book 0a2cd5ef84 merge mozilla-inbound to mozilla-central a=merge 2016-09-09 12:02:43 +02:00
Michael Kaply 440e82867b Bug 1298500 - Don't explicitly set the startpane pref. r=liuche 2016-09-08 14:49:19 -05:00
Jan Henning 3a00023cb5 Bug 1299576 - Part 2 - Cancel edit mode when restoring a recently closed tab. r=sebastian
When restoring a recently closed tab from the corresponding home panel, we normally directly switch to the freshly recreated tab. However if we've entered the home panels through editing mode (as opposed to opening a new tab with about:home), editing mode takes priority and the restored tab is opened in background instead, because we return to the originally selected tab when exiting editing mode.

To fix this inconsistency, we introduce a new parameter for opening tabs from Gecko that cancels editing mode if necessary to allow for directly switching to the new tab.

MozReview-Commit-ID: 4iqPISmtNIx
2016-09-02 20:43:08 +02:00
Jan Henning 550b7c2df8 Bug 1299576 - Part 1 - Refactor BrowserApp's handleMessage to use a switch statement. r=sebastian
So much nicer than a chain of else ifs.

MozReview-Commit-ID: FbEtD4Odet1
2016-09-02 19:02:16 +02:00
Andrzej Hunt 44d851f606 Bug 1297117 - Replace unnecessary usage of getUrlFromAboutReader with stripAboutReaderUrl r=sebastian
In some of these cases we're duplicating the work of stripAboutReaderUrl. In the other cases
there is no effective difference, however switching to stripAboutReaderUrl allows us
to make getUrlFromAboutReader private, which should help prevent future errors.

MozReview-Commit-ID: BLeQkve2XIs
2016-09-05 12:56:49 -07:00