The ideal solution is to remove the whitespace from the action bar drawables
(bug 1122752) but since I'm not sure where else these images might be used and
how removing the padding will affect all of the different devices and
configurations, it would be easier to uplift a solution where we *only* change
the padding on the share icon and *only* on the affected devices.
However, this solution is dangerous because we hard-code a filename: if we
rename ab_share, things will break. Also, unnecessary special casing makes it
ugly.
--HG--
extra : rebase_source : 4750f2deab2340d26ef2d4a86df35c0aefef1ea5
extra : amend_source : e6d305b225085f085c80a8266c31254bd139a7f2
extra : source : 77f45cc5f48368e31c4ca9fe61b10c37f14c0a1c
========
a0ccd38174
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1149208 - Make it easier to create a Firefox Account pointing at stage.
Tap the Firefox icon 5 times on the Getting Started screen, and the
account sign up flow will start, pointing at the stage account
constellation.
--HG--
extra : rebase_source : 9662008cf4aab09128b89bac46c4f99b750b73f4
We lost this change in bug 1148041 (ShareOverlayActivity from styles -> themes)
from when we originally implemented it in bug 1148167 (bolditalic font in 4.4).
--HG--
extra : rebase_source : f38dac5be7338cd127a88dec2091655dcaee6f3a
Before we only added this flag to the share intent used by the browser toolbar
menu.
Practically, this has the effect of having "Add to <current channel>" opening
the share overlay with *only* the device list wherever getShareIntent() is
used. Ideally, this method is used anywhere we use ACTION_SEND.
I've noticed this change makes both sharing from the long-press context menu
and about:reader to display *only* the device list.
--HG--
extra : rebase_source : 63fd4c7ebfa43ed3f2f7fc3d0ef9809a5458aa9f
Still TODO: rename resources prefixed with "new_tablet" or styles appended with
"NewTablet".
--HG--
extra : rebase_source : 1e216b09beb6574695a103c7c13a530468aa422f
We couldn't use it before because of the new/old tablet divide.
--HG--
rename : mobile/android/base/resources/drawable-large-v11/new_tablet_site_security_level.xml => mobile/android/base/resources/drawable-large-v11/site_security_level.xml
rename : mobile/android/base/resources/drawable-large-v11/new_tablet_site_security_unknown.xml => mobile/android/base/resources/drawable-large-v11/site_security_unknown.xml
extra : rebase_source : 26a5a3b8164dd48875100f3469a00b4628d62010
This is necessary because the configuration breaks on some devices if it's
just set in XML - see the code comments for more details.
--HG--
extra : source : 20612adf39a75abc22de568a5aa2a04d8349e0e2
This patch does two things:
* It doesn't set MODIFIED at all unless fields are being changed. That's the original bug.
* It only sets MODIFIED in a non-Sync update if the item is marked as SYNCED. NEW items will stay new even if Fennec changes them, until they've been synced.
The command I ran was:
for i in `find mobile -name "*.png" | sed "s/\(.*\)\/.*\.png/\1/" | sort | uniq`; do trimage -d ${i}; done
--HG--
extra : rebase_source : 90ae53a7e3c63834b1bbb251cc4e5c48e5d20f08
We use a larger icon so that the icon is not blurry in the long-press context
menu.
Also, changed the name to icon_shareplane because it better represents that
this asset is extra-large and intended to be scaled because it's used as an
application icon.
--HG--
extra : rebase_source : 6ac8cb91b80047821e78af3d005d8049e9b23dfd
This is the simplest and most durable option: when Settings (GeckoPreferences) sends a Preferences:Set message to Gecko, typically via PrefsHelper and a SharedPreferences change observer, we include a "flush": true field.
When browser.js handles Preferences:Set, it checks for this and flushes.
The scope of this change, then, is preferences changes within Settings; nothing else (e.g., turning on search suggestions) is affected.
I decided to do this rather than sending a flush message when leaving Settings for three reasons:
* One less message.
* No flushes if nothing changed.
* No data loss if we crash before the user completes the departure from Settings (e.g., they change something then hit the Android 'home' button).
This should mean we do the slide up animation every time, not just when the
Activity is created.
--HG--
extra : rebase_source : b640e4ccfc429341dbc0b78e04445d56a6417493
========
3b849794e9
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Apr 2 20:23:04 2015 -0700
Bug 1149226 - Initialize Reading List authority after upgrade.
The desired behaviour is: Reading List is syncing automatically if
Firefox Sync is syncing automatically.
Test plan:
0) Remove all Firefox Accounts.
1) Install old version. Add a Firefox Account. Ensure that Firefox
Sync is enabled. Upgrade to new version. Verify that Reading List is
enabled.
2) Install old version. Add a Firefox Account. Manually disable
Firefox Sync by unchecking the checkbox in Android Settings >
Accounts. (This can not be done from the Firefox Account settings
activity; unchecking the 4 boxes there is not the same.) Upgrade to new
version. Verify that Reading List is disabled.
3) Install new version. Add a new Firefox Account. Verify that Reading
List is enabled.
(There are automated tests for these scenarios.)
The static String is stored in StringHelper.
This fixes the bustage on fx-team from the initial push.
--HG--
extra : rebase_source : c129d706429f2e73e3361a958110ecf469ea965b
extra : amend_source : e2aff7bc783e5ac287386248bb11b2ab70420bca
This has the effect of changing the Activity's title bar color in the recent
app switcher though we'd prefer not to appear in the recent app switcher
(bug 1137928).
--HG--
extra : rebase_source : fb005c5060e51b763b648b5dc70e5ca50bce5208
Due to bitrot, this changeset leaves some loose ends that will be cleaned up in
a followup bug.
--HG--
extra : rebase_source : ff8704c84880bdeadbb6877174a80757af5ebad0
On Android v21, this logo is a padded version of android:icon which, to
my knowledge, is only used by the ActionBar, which we only make visible in
GeckoPreferences. On < 21, this icon is used via resource alias.
--HG--
extra : rebase_source : 93722e1935fa363e527e230b5498339f93f2f911
Only the httpd.js unit tests actually rely on this. I tried to make them use Cu.import but they also rely on poking a bunch of stuff in httpd.js that's not exported, so instead I just made the test manifest copy httpd.js to the test directory and had them load it from there.
--HG--
extra : rebase_source : 24b04d619891ec95e5df23a2eb7f3277dd3206b2
extra : amend_source : 72139cecdcd695171e2fd0ce8ea7be91c1eebd1a
========
cd7edfa0b5
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1140812 - Part 3: React to Backoff and Retry-After headers.
========
8581f5a572
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 15:30:33 2015 -0700
Bug 1140812 - Part 2: Include request in HTTP response observation callbacks.
This allows to only handle responses from certain hosts.
========
05b50325db
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 14:47:38 2015 -0700
Bug 1140812 - Part 1: Generalize from one to many HTTP response observers.
CopyOnWriteArrayList is a reasonable choice here: we have few writes but
many iterations. See
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CopyOnWriteArrayList.html
========
5950219343
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 16:04:07 2015 -0700
Bug 1140812 - Pre: Modernize backoffInSeconds.
Sync uses X-Backoff; newer services, including Reading List, use Backoff.
This tries to sync prod accounts against prod Reading List, stage
accounts against stage Reading List, and reject all other account
servers. Custom Sync (Token) servers (not prod, not stage) should cause
us not to Sync Reading List, the intention being to avoid storing data
with Mozilla if the user has expressed a desire not to.
========
b69b097505
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1148029 - Disable Reading List sync when using custom endpoints.
Custom is interpreted to mean neither Mozilla production nor Mozilla
stage. To ease the burden of testing stage, we sync the reading list
against stage reading list storage when the account is authing against
stage FxA.
Messaging this in some way would be nice but will have to wait for
follow-up.
When it's on the parent of the outermost container with
layout_width="match_parent", the margin adds to the parent's size
(i.e. the screen width). Adding the margin to the child ensures the width is
reduced and content centered.
--HG--
extra : rebase_source : 711e8af15b1ca505aca699ea6f1ad437a6ef4ed5
========
8b1d353ee8
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1148504 - Part 2: Make updating Firefox Account state happen in a critical section.
It's worth noting that the two consumers of the shared state lock will
only race for a very short window -- essentially only when creating or
re-connecting an account.
That's because Reading List oauth tokens are long-lived and do not
expire (yet) in response to remote Account state changes, such as
updating the Account password. So Sync and RL will race to initialize
the Account state; eventually RL will get an oauth token; and that token
will be cached forever until RL produces a 401 for the token or Android
expires the token.
Since Sync requests a token server token at the start of every sync, the
lock will be constantly exercised, but should never block.
========
d7a8611810
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 08:27:28 2015 -0700
Bug 1148504 - Part 1: Reduce scope of section that may set Account state.
The only place that might throw a TokenServerException is the token
server client code itself. By handling such an exception earlier, we
reduce the scope of the section that may update the Firefox Account
state. (This comes at the cost of threading AndroidFxAccount into
syncWithAssertion, but c'est la vie.)
This does not interact with the exist handling of 401s that we might see
from the storage endpoint. Those 401s never generated
TokenServerExceptions; in fact, they were (essentially) ignored. Since
we fetch a fresh token every Sync, what was (and is) expected is that
such 401s would be transient and fixed by authenticating with a fresher
token.
Test plan: manually verify that remotely changing the Firefox Account's
password while the device is in the Married state does the following:
1) uses the cached certificate to generate a local assertion;
2) the assertion produces a 401 from the TokenServerException, since the
certificate is no longer fresh;
3) the TokenServerException drives the Account state to Cohabiting;
4) the state machine discovers it cannot /sign, driving the Account
state to Separated.
========
9b406122ef
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1142596 - Post: Use production OAuth and Reading List endpoints.
========
9e5368b4aa
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:00:34 2015 -0700
Bug 1142596 - Part 4: Make ReadingListSyncAdapter use oauth tokens produced and cached by the authenticator.
========
fbef93698d
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:49:52 2015 -0700
Bug 1142596 - Part 3: Implement getAuthToken with token types of the form oauth::scope.
Be aware that there are two levels of token invalidation relevant here.
The first level is when a consumer uses an oauth token and gets a 401;
in this case, the consumer *must* call Android's own
invalidateAuthToken. The second level is when the oauth client itself
gets a 401 trying to fetch an oauth token; in this case, the internal
state of the Firefox Account needs to be pushed back.
========
e4e2247b4e
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:43:26 2015 -0700
Bug 1142596 - Part 2: Extract login state machine delegate encapsulating expirations.
========
f1f716cc88
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:14:47 2015 -0700
Bug 1142596 - Part 1: Surface Reading List authentication errors.
========
5833cbbf71
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:01:46 2015 -0700
Bug 1142596 - Pre: Add note about deleting cached oauth tokens.
Deleting cached oauth tokens is tracked by Bug 1147245.
========
b0165a6c14
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:06:49 2015 -0700
Bug 1142596 - Pre: Trim imports.
========
afcbbba32c
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1147473 - Part 2: Make it possible to toggle Firefox Accounts debug / PII logging at runtime.
Tap the email address in the Firefox Account settings activity 5 times.
Only available when:
!defined(MOZILLA_OFFICIAL) || defined(NIGHTLY_BUILD) || defined(MOZ_DEBUG)
========
261f912d12
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:10:05 2015 -0700
Bug 1147473 - Part 1: Add additional (dangerous!) debug commands.
These make it easier to test oauth token authorization, especially using
stage servers.
========
c1509baa77
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:06:43 2015 -0700
Bug 1142596 - Pre: Move constants around.
========
2c676500c3
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Mar 26 11:28:22 2015 -0700
Bug 1142596 - Pre: Make it easier to construct intermediate states.
========
575d80fddb
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Mar 25 16:35:26 2015 -0700
Bug 1140810 - Part 2: Upload material (non-status) modifications.
========
a86e734ef1
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Mar 25 10:56:07 2015 -0700
Bug 1140810 - Part 1: Add storage test for material (non-status) modifications.
========
2259378d08
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Mar 25 13:33:13 2015 -0700
Bug 1140810 - Part 0: Add and use HTTP PATCH.
========
0222d53d98
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Mar 25 14:49:19 2015 -0700
Bug 1140810 - Pre: Don't fail in status upload when there are no failures.
========
7f2feede3b
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Mar 25 14:53:45 2015 -0700
Bug 1140810 - Pre: convert 4 spaces to 2 spaces.
========
49e80d271e
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Mar 25 10:40:26 2015 -0700
Bug 1140810 - Pre: Fix whitespace.
========
8b1d353ee8
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 10:01:35 2015 -0700
Bug 1148504 - Part 2: Make updating Firefox Account state happen in a critical section.
It's worth noting that the two consumers of the shared state lock will
only race for a very short window -- essentially only when creating or
re-connecting an account.
That's because Reading List oauth tokens are long-lived and do not
expire (yet) in response to remote Account state changes, such as
updating the Account password. So Sync and RL will race to initialize
the Account state; eventually RL will get an oauth token; and that token
will be cached forever until RL produces a 401 for the token or Android
expires the token.
Since Sync requests a token server token at the start of every sync, the
lock will be constantly exercised, but should never block.
========
d7a8611810
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 08:27:28 2015 -0700
Bug 1148504 - Part 1: Reduce scope of section that may set Account state.
The only place that might throw a TokenServerException is the token
server client code itself. By handling such an exception earlier, we
reduce the scope of the section that may update the Firefox Account
state. (This comes at the cost of threading AndroidFxAccount into
syncWithAssertion, but c'est la vie.)
This does not interact with the exist handling of 401s that we might see
from the storage endpoint. Those 401s never generated
TokenServerExceptions; in fact, they were (essentially) ignored. Since
we fetch a fresh token every Sync, what was (and is) expected is that
such 401s would be transient and fixed by authenticating with a fresher
token.
Test plan: manually verify that remotely changing the Firefox Account's
password while the device is in the Married state does the following:
1) uses the cached certificate to generate a local assertion;
2) the assertion produces a 401 from the TokenServerException, since the
certificate is no longer fresh;
3) the TokenServerException drives the Account state to Cohabiting;
4) the state machine discovers it cannot /sign, driving the Account
state to Separated.
========
9b406122ef
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Mar 26 14:13:58 2015 -0700
Bug 1142596 - Post: Use production OAuth and Reading List endpoints.
========
9e5368b4aa
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:00:34 2015 -0700
Bug 1142596 - Part 4: Make ReadingListSyncAdapter use oauth tokens produced and cached by the authenticator.
========
fbef93698d
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:49:52 2015 -0700
Bug 1142596 - Part 3: Implement getAuthToken with token types of the form oauth::scope.
Be aware that there are two levels of token invalidation relevant here.
The first level is when a consumer uses an oauth token and gets a 401;
in this case, the consumer *must* call Android's own
invalidateAuthToken. The second level is when the oauth client itself
gets a 401 trying to fetch an oauth token; in this case, the internal
state of the Firefox Account needs to be pushed back.
========
e4e2247b4e
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:43:26 2015 -0700
Bug 1142596 - Part 2: Extract login state machine delegate encapsulating expirations.
========
f1f716cc88
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:14:47 2015 -0700
Bug 1142596 - Part 1: Surface Reading List authentication errors.
========
5833cbbf71
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:01:46 2015 -0700
Bug 1142596 - Pre: Add note about deleting cached oauth tokens.
Deleting cached oauth tokens is tracked by Bug 1147245.
========
b0165a6c14
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:06:49 2015 -0700
Bug 1142596 - Pre: Trim imports.
========
afcbbba32c
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:24:27 2015 -0700
Bug 1147473 - Part 2: Make it possible to toggle Firefox Accounts debug / PII logging at runtime.
Tap the email address in the Firefox Account settings activity 5 times.
Only available when:
!defined(MOZILLA_OFFICIAL) || defined(NIGHTLY_BUILD) || defined(MOZ_DEBUG)
========
261f912d12
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:10:05 2015 -0700
Bug 1147473 - Part 1: Add additional (dangerous!) debug commands.
These make it easier to test oauth token authorization, especially using
stage servers.
========
c1509baa77
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:06:43 2015 -0700
Bug 1142596 - Pre: Move constants around.
========
2c676500c3
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Mar 26 11:28:22 2015 -0700
Bug 1142596 - Pre: Make it easier to construct intermediate states.
Also took the opportunity to center the text because it now frequently will
take up two lines.
--HG--
extra : rebase_source : 1acd0d5af158982aee5b28631ad474eae16b0272
I was not sure how to handle the order wrt Menu.CATEGORY_SECONDARY. Hope I'm right.
--HG--
extra : amend_source : 1bb996da467c8881124a9eb481b03e4f343df0dc
Toasts are unclickable (http://stackoverflow.com/a/20698525) so this button
never actually did anything. If we want to add this functionality, we'd have to
use a new toasting API (dialog was suggested) and potentially create a new
Activity (so it can be shown over another underlying Activity).
We could implement this but it'd be better to spend time creating system
notifications to show tab sending progress (bug 1145434).
--HG--
extra : rebase_source : 179069f2757650000640af8bed6693572efb34a7
extra : histedit_source : 94f511ba2b0fe63f33abaedc1a5c9e2250634172
The Activity can be re-used in Android L (bug 1137928) so we have to reset any
changed state.
--HG--
extra : rebase_source : e297ec9abf3e93bd321d0446fd3374e83b1b7bfe