Commit Graph
2909 Commits
Author SHA1 Message Date
Julian_Chu 75b4d767fc Bug 1337771 - Let ActionButton works in some apps r=sebastian
If the intent from 3rd-party app doesn't have data url, directly call
PendingIntent.send() will perform nothing. To use current url as
polyfill to fix it.

MozReview-Commit-ID: IIP7hGd1cBH
2017-02-10 15:47:56 +08:00
Wes Kocher dd70933f86 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D76dMYwFRUQ
2017-02-09 17:06:59 -08:00
Wes Kocher 6db1eacdbc Merge autoland to central, a=merge
MozReview-Commit-ID: Cu9iXbDAS7t
2017-02-09 16:36:11 -08:00
Aman Dwivedi b91c6fb6ac Bug 876002 - Remove nsIFormHistory2 so no synchronous form history code remains, r=markh.
MozReview-Commit-ID: 4hNAqttRddP
2017-02-08 22:50:00 +01:00
Andrzej Hunt dba8a65df2 Bug 1337419 - Post: don't set bookmark ID for suggested site r=Grisha
Suggested sites don't have a bookmark ID, there's little value in setting one here since
that's confusing for anyone handling the cursor. (This is probably an oversight from
when the single-cursor topsites query was first implemented.)

MozReview-Commit-ID: 77Cw37za6cD
2017-02-07 14:12:16 -08:00
Andrzej Hunt 483ab75213 Bug 1337419 - Bookmark state of suggested sites is also unknown r=Grisha
Suggested sites aren't joined against the bookmarks table before returning
them as part of getTopSites(), so their bookmark state is unknown.

MozReview-Commit-ID: C5BhUcoSsll
2017-02-09 09:47:35 -08:00
Jim Chen c348eac8e1 Bug 1336007 - Ignore invalid key/tokens when updating account; r=sebastian
The refactor patch removed a try/catch block that would have caught this
error before. Instead of using try/catch, this patch checks for the
affected items and send an error when the items are missing.
2017-02-08 19:50:33 -05:00
Jim Chen 3e3643da35 Bug 1337053 - Fix optString conversions; r=sebastian
JSONObject.optString defaults to empty string ("") if the key doesn't
exist, whereas GeckoBundle.getString defaults to null if the key doesn't
exist. So the correct conversion for `json.optString("foo")` should be
`bundle.getString("foo", "")`. This patch fixes the wrong conversions
from before. In case we did default to null, this patch gets rid of the
redundant null second argument to GeckoBundle.getString.
2017-02-08 19:50:33 -05:00
Andrzej Hunt 25294c7f0c Bug 1325375 - Followup: extend popupmenu size workaround to all 4/5 devices r=sebastian
It seems that there is a wide variety of affected devices, so we should just play it safe
and run the workaround on any device that might be affected. (We already run this code
for _all_ devices for the main app menu, so it doesn't have any adverse affects. On the other
hand it would be nice to remove it eventually, i.e. once we no longer support Android 4 or 5 -
although that's still a long way away.))

MozReview-Commit-ID: 2nOYScRXQLd
2017-02-06 15:08:28 -08:00
Andrzej Hunt 7c245bf0ce Bug 1320730 - Send different panelID for topsites when AS is enabled r=sebastian
For homepanels we usually send a long ID string (see the list in HomeConfig). We
reuse the topsites panel to render ActivityStream, so topsites and AS have the
same panel ID. It seems simplest to just override the session name when showing
AS.

MozReview-Commit-ID: JqyyqY77Eo3
2017-02-07 13:05:46 -08:00
Andrzej Hunt 442dd8e659 Bug 1320730 - Ensure homepanel telemetry session is set when panel initially loaded r=sebastian
We currently only start a session when swiping between homepanels. We should also send
it when showing the homepanel normally.

MozReview-Commit-ID: 8Kk2RDCbDDc
2017-02-07 13:05:34 -08:00
Adam Velebil 927740206a Bug 656101 - support for audio ducking; r=padenot,snorp
MozReview-Commit-ID: 1OumuSeEIEi
2017-01-29 10:03:37 +01:00
Tom Klein 3fdae36dd7 Bug 1333518 - Don't import Samsung Internet folders as bookmarks. r=sebastian
The Samsung Internet content provider provides both bookmarks and folders,
distinguished by "bookmark_type" (equals 0 for folder, 1 for bookmark).  We're
currently importing both types, with folders getting inserted into our db with a
url of null.  Such "bookmarks" never seem to surface in UI, and sync ignores
them, but let's stop importing them anyway.

MozReview-Commit-ID: 7G3QuEYBgRb
2017-01-24 12:13:15 -06:00
Julian_Chu d7f430b05e Bug 1329144 - CustomTabsActivity supports ActionButton r=sebastian
3rd-party-app could launch CustomTabsActivity, and could also configure
a custom action button. Now let CustomTabsActivity supports it by
creating a MenuItem.

MozReview-Commit-ID: 2KuMgBJy2gz
2017-02-03 16:03:21 +08:00
Julian_Chu a9162a54dd Bug 1329144 - IntentUtil can extract ActionButton info from Intent r=sebastian
To support ActionButton in CustomTabsActivity, information should be
extract from intent.

MozReview-Commit-ID: 3C19U0EQfV6
2017-02-03 13:42:13 +08:00
Julian_Chu cc3aaf334b Bug 1329144 - Remove useless variable r=sebastian
This variable is useless. So far we reference to a toolbar instance by
local variable. Removing it makes less ambiguous.

MozReview-Commit-ID: 8zrEKaB2H48
2017-02-02 17:07:41 +08:00
Tushar Saini (:shatur) 5503ea705a Bug 1252960 - Rename UrlMetadata* table to UrlImageData* r=ahunt
MozReview-Commit-ID: 2TNcctxAbRc
2017-02-02 22:05:17 +05:30
Wes Kocher 6774aad975 Backed out changeset 7038e10280b2 (bug 1252960) for test_safe_browsing_warning_pages.py failures a=backout
MozReview-Commit-ID: 9Dfm6gbDFc8
2017-02-07 14:46:18 -08:00
Tushar Saini (:shatur) 14c7927bcc Bug 1252960 - Rename UrlMetadata* table to UrlImageData* r=ahunt
MozReview-Commit-ID: 2TNcctxAbRc
2017-02-02 22:05:17 +05:30
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
Nevin Chen 5a64df089f Bug 1332955 - Consider restore data( for bookmark parent stack) when reloading home panels. r=ahunt
MozReview-Commit-ID: 7m6HOnfPLK3
2017-01-25 12:10:55 +08:00
maliu 0749c100a8 Bug 1333089 - Force update up indicator drawable in onCreate even locale did not change, r=sebastian
MozReview-Commit-ID: Ltuuq16u571
2017-02-02 11:38:47 +08:00
Sebastian Kaspari 9047642bd8 Bug 1318667 - Do not use palette library on x86 devices (Use BitmapUtils.getDominantColor()). r=ahunt
Our version of the palette support library crashes for certain icons on x86 systems.

MozReview-Commit-ID: E6eEyFXd4uK
2017-02-03 18:42:36 +01:00
Swaroop Rao edcdb4bdc6 Bug 1324427 - Switchboard: Set user agent and proxy; Using proxy and setting user agent from ProxySelector and BaseAction classes respectively. r=sebastian
MozReview-Commit-ID: 4L22dZd4VX5
2017-02-01 18:12:54 -05:00
Julian_Chu 3576566277 Bug 1329145 - Part 2: To apply custom animation if any r=sebastian
3rd party app could specify its own custom-exit-animation when launching
CustomTabsActivity.

For that case, to call `overridePendingTransition` in method finish().

MozReview-Commit-ID: CivYpP2jvXp
2017-01-25 19:07:21 +08:00
Julian_Chu 868b4eb0b5 Bug 1329145 - Part 1: re-indent code style r=sebastian
MozReview-Commit-ID: AOrzGZIAKxU
2017-01-23 17:03:48 +08:00
Andrzej Hunt 1ea201c666 Bug 1323105 - Upgrade topsites, AS topsites, and AS contextmenu to VectorDrawable pin r=sebastian
MozReview-Commit-ID: Dpot8wrYFZI
2017-02-01 14:43:03 -08:00
srivatsav a179e1ff9c Bug 1199752 - Removing all tab mirroring UI code. r=sebastian
MozReview-Commit-ID: GKcqpknJSAD
2017-02-02 11:27:28 +05:30
Wes Kocher 24f5f84020 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Am6M5iHxmAr
2017-02-01 16:31:23 -08:00
Wes Kocher 4fd14b75a1 Merge inbound to m-c a=merge
MozReview-Commit-ID: EZrwvZH5DsY
2017-02-01 16:22:11 -08:00
jdarcangelo 7748456a28 Bug 1335200 - [FlyWeb] Crash on Android when calling publishServer(), r=sebastian 2017-02-01 14:52:40 -05:00
Sebastian Kaspari d7a78df1bd Bug 1335355 - Switchboard: Ignore empty matchers in experiments configuration. r=ahunt
MozReview-Commit-ID: 10T90TjJlGY
2017-01-31 14:26:01 +01:00
Andrzej Hunt e8c78eec45 Bug 1325440 - Use 16:9 keyline for BottomSheet menu r=sebastian
Newer versions of the support library do this automatically, but we need to
roll our own implentation for now.

16:9 keyline means that the top of the menu is placed such that a 16:9 window
of application content is still visible above the menu. This is illustrated in:
https://material.io/guidelines/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
(The menu itself is _not_ 16:9.)

MozReview-Commit-ID: FSUdssb5eBN
2017-01-31 10:43:04 -08:00
Andrzej Hunt d74464cf7c Bug 1325096 - Post: only use deprecated setBackgroundDrawable on older platforms r=maliu
This has no benefit right now, but this lets us avoid forgetting to upgrade to the non-deprecated
method once we no longer need to support api 15.

MozReview-Commit-ID: FmRoP5PnGDC
2017-01-23 15:59:18 -08:00
Andrzej Hunt 251bef49e1 Bug 1325096 - Fix menu button padding on select devices r=maliu
On some devices, ImageView appears to lose it's padding when calling
setBackground[Drawable](). We therefore need to save and restore the
padding on those devices.

Known affected devices are various Asus Transformer tablets,
and also the Motorola Droid 4, running various Android 4.X versions.
We therefore make this workaround conditional on Android 4 to minimise
the number of devices where this workaround is used. (Having the conditional
should also make it easy to notice when we can remove the workaround, i.e.
whenever Android 5 becomes the baseline.)

MozReview-Commit-ID: B88gWwEx48x
2017-01-23 15:53:49 -08:00
Jim Chen a47ea26590 Bug 1333590 - 6. Remove GeckoEventListener and NativeEventListener; r=snorp r=sebastian
Remove GeckoEventListener and NativeEventListener now that we uniformly
use BundleEventListener. Also remove related classes NativeJSContainer,
NativeJSObject, and GeckoRequest, as well as related tests and C++
code.

The "Messaging" object in Messaging.jsm is replaced with a dummy object
that redirect calls to the global and/or window event dispatcher.
2017-02-01 17:35:45 -05: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
Jim Chen 5e89131e28 Bug 1333590 - 1. Convert GeckoRequest usages to events; r=sebastian
Convert places where we use GeckoRequest (to get a callback from JS to
Java) to bundle events that use the built-in callback support.
2017-02-01 17:35:44 -05:00
Krishna 26a419dba0 Bug 1318544 - DLC: Only download known content if it is actually excluded from the APK r=sebastian
MozReview-Commit-ID: E3X9u2MkRpX
2016-12-04 23:17:44 +08: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
Jan Henning 3cd262b33c Bug 1062859 - Part 1 - Restore scroll position when going back through bookmark folders. r=ahunt
When going down one folder level, we store the current scroll position of the list view and then scroll to the top of the list, so that we always show a child folder starting from the beginning. When navigating back up to its parent, we then restore the previously stored scroll position.

MozReview-Commit-ID: 9C2RMXrlUm1
2017-01-22 22:02:35 +01:00
Jan Henning 5520b8ce11 Bug 1062859 - Part 0 - Bookmarks panel cleanups. r=ahunt
Fix up javadoc so it matches the actual function parameter and remove unneeded imports.

MozReview-Commit-ID: I91NuqLlpL1
2017-01-23 19:23:55 +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
jwu 480dfb9013 Bug 1237956 - Use temporary folder instead of modifying the filename while uploading, r=sebastian
MozReview-Commit-ID: 3MQWkPOIRGB
2017-01-25 15:56:23 +08:00
Grigory Kruglov b5a046c701 Bug 1325303 - A-S Telemetry: track position of highlights for menu interactions r=sebastian
MozReview-Commit-ID: GXl5asf2rEq
2017-01-26 23:14:08 -08:00
Grigory Kruglov d40f8a0a92 Bug 1325303 - A-S Telemetry: track positions of Top Site items for tile and menu interactions r=sebastian
MozReview-Commit-ID: B4XpqpwfjMi
2017-01-27 12:13:13 -08:00
Eugen Sawin 41fdce8093 Bug 1323429 - [2.1] Remove the context reference from Clipboard. r=jchen 2017-01-26 15:52:21 +01:00
Phil Ringnalda 2b3ff1fe3a Merge m-c to m-i 2017-01-25 20:48:39 -08:00
Jim Chen 25b8c19ecd Bug 1333589 - 3. Convert SiteIdentityPopup observers to events; r=sebastian
Convert the "Permissions:*" and "Session:Reload" observers to events
that go through GlobalEventDispatcher.
2017-01-25 18:57:32 -05:00