* GeckoActivity, LocaleAwareAppCompatActivity, LocaleAwareFragmentActivity, LocaleAwareActivity:
Those activities are never instantiated directly. Make them abstract.
* CrashReporter: This activity is only registered if MOZ_CRASHREPORTER is set. Supress warning.
Unfortunately I had to downgrade this lint check from "error" to "warning" because the current
gradle plugin doesn't recognize the SupressLint annotation for the "Registered" check:
https://code.google.com/p/android/issues/detail?id=204846
MozReview-Commit-ID: Hy56pZB8ZdB
--HG--
extra : rebase_source : 2f40d84792baaaffd4093e8cb2b17eb1155df5c3
This provides a basic helper UI that can be customised with images/text.
We need a very similar helper for both reader-view offline bookmarking related
helpers (Bug 1236328 and Bug 1247689), hence it's useful to have a common
class implementing most of the required functionality.
Most of the new helper is borrowed from the existing HomeScreenPrompt. I will
extract the common functionality in a followup Bug.
MozReview-Commit-ID: Byc5VnVFffj
--HG--
extra : rebase_source : 1e20ab501f47dbdfd17d243ce8db4676ac841ab4
extra : source : b52ab3637d1e0eadd3c465a541324a74e6461af3
1) Use prepared SQL insert statement for insertions
1.2) Use ON CONFLICT IGNORE for our inserts, to avoid failing on possible data clashes
2) Don't synthesize "visits since last sync" - it's bound to cause problems, for not much benefit
3) Fix up some minor issues, cleanup code and add sanity checks
4) If there's evidence Sync was enabled at some point, mark synthsized visits as remote. Otherwise, as local.
MozReview-Commit-ID: Gd94A6r4rW
--HG--
extra : rebase_source : e4f74e3d1d286e1107e5a1764ae8ea3fd5ff3ff2
Note: need to set package name in robolectric.properties so that Robolectric reads correct resources
MozReview-Commit-ID: 6wrh8kzJlXI
--HG--
extra : transplant_source : %86T%8BUB%ABe%0A%DF8%F0%81%0C%ACi%D1Rx%E2%EC
Our theming inheritance around Preferences still seems quite messy, however given we'll
need to uplift this I'm planning to tackle this in a separate bug.
We add the LocaleAwareAppCompatActivity in order to avoid affecting other consumers
of LocaleAwareFragementActivity (primarily the SearchActivity). We will investigate
those separately.
MozReview-Commit-ID: KVEZbDdza1s
--HG--
extra : amend_source : 3b296714b2f1d1aa2fd09f4ea8ee7641d0bb36fb
The checkstyle checks should pass now.
MozReview-Commit-ID: HMRC2D8u8JT
--HG--
extra : rebase_source : ea2c096114dd1830054eae4864ee4426dddda499
extra : histedit_source : bf0fe0b9d7b0b29bea7869c9816214c1f818bae3
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
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
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
The code at was duplicated for build reasons that no longer apply.
MozReview-Commit-ID: Hk7n9beobsY
--HG--
extra : rebase_source : 8ca84ecb2c837d14182b706014ab98022ce95acc
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
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
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
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
A few notes: the test is live, so I've marked it @Ignore, so that it
doesn't run during |mach gradle test|. There's some value in mocking
the service endpoint, but this is how I verify that the server works,
so it has more value right now as a live test than a mocked test. In
the future, that probably won't be true.
There are issues running the test locally because Robolectric doesn't
provide all the cipher suites we use in GlobalConstants: in
particular, the GCM suites aren't supported. This may improve as
Robolectric matures, or we may add a work-around in the code (like at
http://androidxref.com/4.4.4_r1/xref/libcore/support/src/test/java/libcore/java/security/StandardNames.java#68),
or we may add a test-specific flag. For now, I'm not going to address
it directly.
Finally, I put the code in mobile/android/services, simply because the
less that goes into base, the better our build times will be.
--HG--
extra : commitid : Gw8uCqVViMC
extra : rebase_source : 7d35b78cb776fbd3892a2a95190a61846e0a3291
extra : amend_source : dfa8168eaca0a44b05a71fe6fdf4952964460d79
I'm slightly concerned we're providing too much configuration information in
the debugging statements.
--HG--
extra : commitid : 6JfBA5lVkZ4
extra : rebase_source : 6cf1befef3aba37031e7fc3306b446e87114b601
This patch removes the bespoke SyncHints type in favour of using
Android's own flags to ignore backoff and request an expedited sync.
It also unifies a simpler request{Immediate,Eventual}Sync API for
sync-requesting consumers.
--HG--
extra : commitid : 8oerw1PEWuH
extra : rebase_source : ec5bcc03f5d78439ab8455a9c486326f1651947a