LoginsProvider is an all-Android implementation of PasswordsProvider.
PasswordsProvider is an SQLite database backed by the version of
SQLite that ships with Gecko. It is concurrently accessed from Gecko
and it runs with a special lifecycle that includes a separate
heavy-weight process. Eventually we'll migrate the Gecko-side
passwords interface to use the new Android-side LoginsProvider, but
for now we just want to get the new provider landed and the tests
running.
MozReview-Commit-ID: Bx19D68tMtI
***
Bug 946857 - Fold into part2: review nits.
MozReview-Commit-ID: LmPwIvebfrr
--HG--
extra : rebase_source : 0caccd0773f3e2feb80d72fb4b52ac086c25f7d2
Because --enable-application is the current way to do things, transpose
it to configure.py, but since --enable-application=js doesn't make
sense, make it an alias of a new --enable-project option.
This only partially moves --enable-application out of old-configure.in
because there are a lot of other things intertwined with it.
Added a simple robocop test to verify that it is possible to query disabledHosts with PasswordProviders.
MozReview-Commit-ID: K4j4Aczp2xv
--HG--
extra : rebase_source : 284ff094515d674e5e0389b089e3629296231e77
LoginsProvider is an all-Android implementation of PasswordsProvider.
PasswordsProvider is an SQLite database backed by the version of
SQLite that ships with Gecko. It is concurrently accessed from Gecko
and it runs with a special lifecycle that includes a separate
heavy-weight process. Eventually we'll migrate the Gecko-side
passwords interface to use the new Android-side LoginsProvider, but
for now we just want to get the new provider landed and the tests
running.
MozReview-Commit-ID: Bx19D68tMtI
***
Bug 946857 - Fold into part2: review nits.
MozReview-Commit-ID: LmPwIvebfrr
--HG--
extra : rebase_source : f660f1be9ee019eb86f5b564d21386f899c53224
Non-Mozilla distributors may wish to run their own autopush endpoint,
using a sender ID and corresponding Google API key that they control.
This simplifies that just a little bit, and gets Mozilla's release
engineering out of the business of managing non-sensitive secrets.
In the future, this sender ID will be baked into the Android APK's
string resources, in accordance with newer Google Play Services
library requirements.
MozReview-Commit-ID: AAxreEP73B0
--HG--
extra : rebase_source : 0a35d18a83558e4d27ac6a47b3833f1d69fed264
afaict, we don't currently support app indexing (bug 1252569) so this should be
okay to reduce the warning level. We can ignore it if we decide we don't want
to support this feature.
MozReview-Commit-ID: 2q4zqEHw2B5
--HG--
extra : rebase_source : d556e26607e6ad6c9d005f2d67e2d4b689cb9695
This is per request in bug 1097398 comment 18. The text selection
highlight should be fennec orange (#FF9500) and opacity 0.6.
This patch is derived from a WIP patch by Mark Capella
<markcapella@twcny.rr.com>
MozReview-Commit-ID: 9WXDluDQTFg
--HG--
extra : rebase_source : 6798f97bc65408f162b935192cf7ca8e2309cde0
The default AccessibleCaret CSS style is in layout/base/ua.css. We override them
in content.css to use the Android L style assets.
MozReview-Commit-ID: 6IEejkP7Moq
--HG--
extra : rebase_source : fce4d167628a02492f79993338d3596ac0d9dcdf
This is to support Firefox Android L style carets assets that the two
carets always look like tilt.
This patch is derived from a WIP patch by Mark Capella
<markcapella@twcny.rr.com>
MozReview-Commit-ID: H3nKLz6HcpM
--HG--
extra : rebase_source : b3a77b0bb8aaea8f010002f54fde075c9d469711
Otherwise we will crash with a java.util.ConcurrentModificationException on iterator.next()
after removing an item using list.remove(item).
MozReview-Commit-ID: KYebSw2zjVk
--HG--
extra : rebase_source : c2d43cfb94742f4c2675ab7ceca0796890646352
Currently tests version 27 to 28 and is abstract enough to test future
upgrades. Additionally, the test should fail if the database is upgraded but a
database for the old version is not supplied.
MozReview-Commit-ID: CpBiGETFacv
--HG--
extra : rebase_source : 15b0970474da780b86cc7817b62023d3e95d6c58
Flush IME changes when committing or canceling the composition, before
sending a notification, so that the Gecko and Java sides are on the same
page.
Also, use the GeckoEditableListener constants when calling notifyIME so
we don't rely on the Gecko platform constants having the same values as
our Java constants.
The finder component has a quirk that the first time it searches for a
string it may find text that's normally not included in the search
result (e.g. the placeholder text in an input element). I think rather
than fixing the quirk, which seems risky, it's better to work around it
by performing a fake dummy search when first showing the find bar. On
desktop, we also (I think unintentionally) perform a dummy search when
the find bar first appears.
This is a quick sanity check: a clean profile should return all the suggested
sites directly.
We should probably add further tests making sure that history items appear
in front of the suggested sites, that pinned sites work correctly,
and that suggested sites don't appear outside of the grid.
MozReview-Commit-ID: Ai8gTkv9E9w
--HG--
extra : rebase_source : e82943a71e7276c6da4b7757c3cc3f936d0c8f87
This means we now have only one open cursor for the topsites query, instead of 2 real cursors (and one
MatrixCursor). We still need a MergeCursor and MatrixCursor to supply blank tiles, this will
disappear as soon as the user has sufficient history items to fill the suggested sites grid.
MozReview-Commit-ID: LnJaSMIDM2O
--HG--
extra : rebase_source : c5665cf1346db31217f9f217d6cef1d4f615aebb
Note that this version only returns topsites, pinned sites, and suggested sites.
Blank tiles aren't supplied, and need to be added separately.
MozReview-Commit-ID: 5Vc5pXTewHi
--HG--
extra : rebase_source : 7ccf781991fe8237a046f7d6cea5d1867cc76cc7
We'll need access to the SuggestedSites in BrowserProvider when assembling the
topsites query there, hence we need to allow access via BrowserDB.
MozReview-Commit-ID: BkZghDhQGxr
--HG--
extra : rebase_source : 4010ad97a10c1685ebc155cc2244c50ed498c428
We'll need this to provide a number sequence for the single-query/cursor TopSites
implementation.
MozReview-Commit-ID: 8m21gNmY50D
--HG--
extra : rebase_source : 71f169eee743639630604723ad5b01b805695a60
This allows us to more easily append multiple sets of args.
TODO: is it worth naming this appendSelectionArgs? We should keep the
2-param version appendSelectionArgs since it's more efficient for that
case (and the vast majority of uses are with 2-params) - it's probably
simpler for development to have both versions have the same name, and
as far as I can tell the compiler will prefer the non varargs version
when possible.
MozReview-Commit-ID: LcI6zNwpIxh
--HG--
extra : rebase_source : f782a7c830aed605cdcc18df9f3cd63605dfcc3b
Setting GRADLE_USER_HOME in this way ensures all Gradle invocations in
automation have the right flags, rather than just the ones we
remember.
MozReview-Commit-ID: IL53nZVsFuV
--HG--
extra : rebase_source : dafc3c19e75e067481603b6f80692fcea0141b67
This is per-package, so there's no cross-package definition needed.
MozReview-Commit-ID: 8qy2SGJtCh1
--HG--
extra : rebase_source : 5e3cb1959ac560137487d5d0c12002820212aed7
extra : histedit_source : ac2404805e7afc2776c02414ab464d24d3057063
This is cleaning up after Bug 1220906, which removed Old Sync.
MozReview-Commit-ID: EmP4RTMIZ9
--HG--
extra : rebase_source : d97e09ca50dbd2c214c0618d50b7418378697dde
extra : histedit_source : 5148e7d8f5c8f10c36f1fa319ac04fea28432450
Added a simple robocop test to verify that it is possible to query disabledHosts with PasswordProviders.
MozReview-Commit-ID: K4j4Aczp2xv
--HG--
extra : rebase_source : b911c3e42bf3ed4f2e55185dbaa4fe4b23ab7588
Set the prompted pref along with the enabled prefs so that we don't have
to detect setting the enabled pref elsewhere in order to set the
prompted pref.
The code at was duplicated for build reasons that no longer apply.
MozReview-Commit-ID: Hk7n9beobsY
--HG--
extra : rebase_source : 8ca84ecb2c837d14182b706014ab98022ce95acc
DONTBUILD NPOTB
Android Studio (and IntelliJ) does not correctly handle &entity;
definitions in Android strings.xml files. Strings with entities (in
Fennec, all of them) are rendered in the IDE as blank. This patch
expands the entities when copying for use by Gradle, improving the IDE
integration.
MozReview-Commit-ID: 2T6CzoKc7v8
--HG--
extra : rebase_source : 75b2c9e20392d03b8077d2c313538c5fccc9cb34
extra : amend_source : 5b409cc858e08e5be2eef2ded1bc907f2d088e2d
extra : histedit_source : f702d4eb831af75f6374718efaffcf95f974731c
DONTBUILD NPOTB
Using the real Android manifest tripped up Robolectric, so I've taken
the easy way out and added a dummy TestGeckoApplication; see comment
in the code.
MozReview-Commit-ID: 4fCY504UgPu
--HG--
rename : mobile/android/app/base/lint.xml => mobile/android/app/lint.xml
rename : mobile/android/tests/background/junit4/resources/robolectric.properties => mobile/android/app/src/main/resources/robolectric.properties
extra : rebase_source : 689e879dd4ec4402d5e7f948fa5f8be256284a88
extra : intermediate-source : 746468f5d9798ff404a80cd957664e2b69a0e97c
extra : source : a7f63b3721cd3ba105990bbb37a87044383d26d9
extra : histedit_source : 6bdcfa36ddb45bbfd518c5459e4940e29a30f1c2%2C4bfef3b752a85174f1aa1f2226a286ac30bae25a
This commit adds the GzipNonChunkedCompressingEntity which is necessary because
the telemetry servers don't support chunked uploading, which the built in
GzipCompressingEntity does.
I tested this on my local device and logs for successful uploads were sent for
both the testing gzip server as well as the official telemetry server. My data
correctly appears on the former and I did not check the latter.
MozReview-Commit-ID: 4bCNiRYyqFD
--HG--
extra : rebase_source : 28f877258fdf25a098bc5f1634c060b3fd53fe39
Similar to gfritzsche's suggestion in bug 1244295 comment 26.
MozReview-Commit-ID: Agqyj47uSZR
--HG--
extra : rebase_source : 24032f7cd46e7c2cd7143dc822677e51d5445cc6
Added testGetDir to sanity check how the profile is set up for the test and
left it in as a bonus.
Additionally, changed access levels on the ensureParentDirs method because it
only needed to be `protected` for testing.
MozReview-Commit-ID: CDVQjyf3yP2
--HG--
extra : rebase_source : e427eb8356ac71adb8a672869ee297a0ffc5b1dc
Additionally, we log some of the Exceptions thrown while retrieving the client
ID to make it clearer what is happening. The underlying GeckoProfile methods
ensure the profile path is not printed so we don't have to worry about leaking
that.
MozReview-Commit-ID: 3o0rvXDRZzM
--HG--
extra : rebase_source : 81cff9a199365623b16efe21a12509b8bf7b3c6e
Additionally, we'll try to migrate the client ID from FHR if it doesn't already
exist.
MozReview-Commit-ID: B9vfefeVi2i
--HG--
extra : rebase_source : f5acdba8f276f5cbc04a8877a0589f4ce8155e49
Fennec enables sCaretsExtendedVisibility which uses
Appearance::NormalNotShown instead of Appearance::None to keep actionbar
shown during scrolling. This breaks selection mode update when the
positions of the carets are not changed after scrolling.
To fix this, we need to implement appearance recovering for selection
mode scrolling like we did for cursor mode in bug 1212732, and make
UpdateCaretsForSelectionMode() respects UpdateCaretsHint.
MozReview-Commit-ID: LkfUIGKHL0h
--HG--
extra : rebase_source : 2e68786e09046967f7c6af16fa6b393f133dc12c
When using physical keyboards, we get key events on the UI thread. To
improve performance, and to support key listeners better, we should
switch the IC thread to the UI thread in that case.
Right now, processKey uses a IC-thread proxy in order to handle key
events on the UI thread. This patch makes it post the key event to the
IC thread and avoid the proxy entirely.
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check
- the outdated 0666 octal constant is still parsed correctly,
- the outdated 0666 octal constant raises syntax error flag
in strict mode, etc.
So leave them alone.
Opt-in by adding --enable-gradle-mobile-android-builds.
Gradle dependencies (including the Android-Gradle plugin) are assumed
to be present. Local developers will fetch them from the jcentral
repository.
Android-specific Maven dependencies are shipped as "extras" with the
Android SDK, and should be found automatically by the Android-Gradle
plugin.
MozReview-Commit-ID: 966XgddWgEu
--HG--
extra : rebase_source : 8e8c6156e1d06813c250662e104fd14c621d91ab
extra : source : 306cf0271d3e3a344fcbfd2baf75e0450c288cf1
extra : histedit_source : d17446714236c408699a0953882e84ac3a192380%2Cc21b166af79ef1e00215748820bc2670405ac1dc
When doCreateShortcut was first created, it also handled webapp intents. This required additional
work, meaning doCreateShortcut had to be run on the background thread. We now only
create an Android Intent, with no additional work, hence we can run directly on the UI thread.
MozReview-Commit-ID: BFrAuNfDiFj
Fennec enables sCaretsExtendedVisibility which uses
Appearance::NormalNotShown instead of Appearance::None to keep actionbar
shown during scrolling. This breaks selection mode update when the
positions of the carets are not changed after scrolling.
To fix this, we need to implement appearance recovering for selection
mode scrolling like we did for cursor mode in bug 1212732, and make
UpdateCaretsForSelectionMode() respects UpdateCaretsHint.
MozReview-Commit-ID: LkfUIGKHL0h
--HG--
extra : rebase_source : 0ef8d28ce55c3ddd29ea32ee6888ee7fe14c34ad
extra : source : bc3e37b63defca87d0de165fe167ef7f8a7db651
Opt-in by adding --enable-gradle-mobile-android-builds.
Gradle dependencies (including the Android-Gradle plugin) are assumed
to be present. Local developers will fetch them from the jcentral
repository.
Android-specific Maven dependencies are shipped as "extras" with the
Android SDK, and should be found automatically by the Android-Gradle
plugin.
MozReview-Commit-ID: 966XgddWgEu
--HG--
extra : rebase_source : ff1cf18a59c7c5633e238090cb6a9abb307ed4fb
This fixes a crash, since Bug 1242213 removed the .App
<activity-alias> that browser_intent_class references.
I debated just updating the strings, and decided that it was best to
remove a pattern that is used only once in our codebase, even though
it moves more functionality to code.
MozReview-Commit-ID: 4Wgw0oITgue
--HG--
extra : rebase_source : 51cfb3e9d537b06a5303d74eeb4823723e4a7c0a
extra : amend_source : d09015b4b1356e42846ecd75ebbec4d3debd7bbd
When Java is changing the composition, we should ignore the Gecko
selection. However, when Gecko is committing its composition, we should
not be ignoring the corresponding Gecko selection change. In other
words, we should only ignore selection changes when we know the change
is from Java.
See
https://android-developers.blogspot.com/2013/08/some-securerandom-thoughts.html
for a thorough discussion.
It's very expensive (at least 200ms on modern devices) to do this in
Application.onCreate, so we'll do this just before generating DSA keys.
In exchange, we accept some risk that we'll introduce the same issue
again. As we lint more aggressively in automation, this risk will
decrease.
Google licenses the fixes file very permissively. I have added some
serialization IDs to prevent certain compile warnings.
--HG--
extra : commitid : 2GRwurnHhvE
extra : rebase_source : 8d28b7d6541579d5f51f5173f7fe9a16ca39a982
extra : amend_source : ae37a4afa0754775fd0ccf94dc3718081dd37eb3
This patch adds 2 workarounds for the fact that getProfileCreationDate
returns -1 when it can't find a creation date. Returning -1 turned
out to be not particularly robust but I did it this way to avoid
adding too many additional versions of methods in order to have
optional parameters such as profileCreationDate. The workarounds
are added as TODOs w/ bug #'s in the code and mentioned in the
comments of bug 1246816 itself.
A future implementation should probably add a Builder to pass a
single Object as the argument to TelemetryPingGenerator.createCorePing
to prevent the argument list from growing unreasonably large and
to properly operate on optional parameters. I didn't do this in
this patch in order to simplify the uplifted code.
--HG--
extra : commitid : EbxIxtpDLIL
extra : rebase_source : 1f19eca9bc7a7847418fa8d4e87308e1e112aa2c
Retrieving the profile creation date from the filesystem is not strictly
necessary to upload this data and returns -1 until it is implemented. If the
decision is r+'d here, it will be implemented in bug 1246816.
--HG--
extra : commitid : EyjmshzbkwO
extra : rebase_source : 7b8fde6ae768b99a970db30eee352e2c84e901dd
On a CLOSED TREE because this is Android only.
When we switched to fine-grained Google Play Services bundling (Bug
1115004), we stopped shipping com.google.android.gms.analytics. That
silently breaks Adjust, which queries the Google Ad ID using
reflection: now the package isn't present! This patch restores the
Play Services libraries that Adjust relies on. (Sadly, this bloats
our APK tremendously.)
There is some hijinkery, however: the Play Services libraries
reference a library (org.apache.http) that is deprecated in Android
23! However, the library is still present on Android 23 devices,
which buys Google time to replace the offending code. This compiles
just fine, breaks the Proguard global optimization pass. To give
Proguard the information, we add the library as a Proguard "library
JAR". This is equivalent to the Google-provided Gradle `useLibrary`
directive.
--HG--
extra : commitid : I4rTyC8lxLd
extra : rebase_source : 96f30d735e898cb9853d53f236ac8e2337186814
extra : amend_source : 3e4d68789b3ef980e4e1d7f743e332bdbb6be176
This commit produces an "install bouncer" APK which is a "hollow
shell" that looks like the main Fennec APK. In particular, both APKs have:
* the same Android package name (application id); and
* the same set of <permission>, <uses-permission>, and <uses-feature>
blocks in their manifests.
The bouncer APK must always have an android:versionCode smaller than
the main Fennec APK; for now, we will just bump that manually
mobile/android/bouncer/moz.build.
--HG--
rename : mobile/android/javaaddons/Makefile.in => mobile/android/bouncer/Makefile.in
rename : mobile/android/app/assets/example_asset.txt => mobile/android/bouncer/assets/example_asset.txt
rename : mobile/android/javaaddons/moz.build => mobile/android/bouncer/moz.build
rename : mobile/android/base/resources/drawable-v21/logo.xml => mobile/android/bouncer/res/drawable-v21/logo.xml
rename : mobile/android/base/resources/drawable/logo.xml => mobile/android/bouncer/res/drawable/logo.xml
extra : commitid : 1XkuX1F0pMb
extra : rebase_source : c49ac53697927b0f3d1ee47bc1e7035c1b465e99
extra : source : aaa420ed66d754ecc17b19f5a12297d24371f1ca
extra : histedit_source : 0e3e2fa225c48ba48df72ff116fd62a7b1ef5ed2
Call a distribution in /data/data/$PACKAGE/distribution a "data
distribution". Right now we read data distributions only in response
to writing them via another code path (extracting from APK, or
downloading). We don't recognize a data distribution in the same way
that we recognize a system distribution (in /system/.../distribution)
in the Java code, simply because we don't look for it; and I haven't
investigated, but I think that Gecko may in fact recognize a data
distribution in this case.
This patch simply recognizes data distributions after looking for
other distributions. That way data distributions written by the
bouncer APK are recognized and initialized, but not given precedence
over other distribution channels.
--HG--
extra : histedit_source : f2edefc209e653331b1afd731383e43b1e2cb320%2C3a5870bed776214d8656e530e4cb29fd7ddf02e8
extra : rebase_source : 7df42cfb75713b4630ed5e60583bcd9ab9612849
extra : commitid : HnKxkzVG9TW
extra : source : 7a62e97f07c2c90d9f34c2c7de40f3cb193f6312
extra : amend_source : e581fa3a30abdeaa903be04e48a296c8da4ed482
This works due to string conversions, but it's not elegant. Let's
just define the API we want, and work to improve the implementation
when we remove org.json.simple entirely.
MozReview-Commit-ID: GseI427PeDi
--HG--
extra : rebase_source : b8dc7083a896526512746607095b8b51f3afd539
extra : histedit_source : eddb40fdfef92ac5c771937c5b76d59fa75ef768
One step further on the path of removing dependence on
org.json.simple: don't expose its exceptions to consumers of EJO. We
re-purpose the existing UnexpectedJSONException classes to incorporate
what were once ParseException instances.
MozReview-Commit-ID: KOwM3cf0fm
--HG--
extra : rebase_source : e722fbefb69dfb0b96b66f070e0241a389dfbf87
extra : histedit_source : 162ded0f62e064f4ca5c9bcba5534813e29dca0a
This is safe because the single consumer of `MetaGlobal.fetch` is
`FetchMetaGlobalStage.execute`, which already expects to be called on
a thread and have another thread waiting for the callback.
MozReview-Commit-ID: 5XXd5aBkljc
--HG--
extra : rebase_source : 46282899d6338f4828ec01fe54f9a53efc8c7cb5
extra : histedit_source : fe4b11004d81a436f09fea3369a10edf4a3da91e
DONTBUILD NPOTB
Using the real Android manifest tripped up Robolectric, so I've taken
the easy way out and added a dummy TestGeckoApplication; see comment
in the code.
--HG--
rename : mobile/android/app/base/lint.xml => mobile/android/app/lint.xml
rename : mobile/android/tests/background/junit4/resources/robolectric.properties => mobile/android/app/src/main/resources/robolectric.properties
extra : commitid : 2aEbQRv0D7m
extra : rebase_source : c0f014e3fba7008967f8f9782125f940fcc89fe6
extra : amend_source : 46bfdfb116c026da490750a23a9c9188ab4cdf9a
extra : source : a7f63b3721cd3ba105990bbb37a87044383d26d9