Commit Graph

19008 Commits

Author SHA1 Message Date
Shih-Chiang Chien
c3e400ba96 Bug 1129785 - support video sharing via Presentation API. r=mfinkle. 2016-02-06 18:15:22 -08:00
Nick Alexander
1aaa667c0e Backed out changeset 746468f5d979 (bug 1233882). 2016-02-05 21:19:13 -08:00
Nick Alexander
04f2d28f94 Bug 1234629 - Post: Add simple bouncer APK docs. r=me 2016-02-04 15:54:12 -08:00
Nick Alexander
1c6c3b60c1 Bug 1234629 - Post: Add Gradle support for bouncer. r=me 2016-01-26 11:54:00 -08:00
Nick Alexander
6b67826901 Bug 1234629 - Part 3: Make bouncer's <intent-filter> set a larger subset of Fennec's <intent-filter> set. r=margaret 2016-01-27 15:44:29 -08:00
Nick Alexander
522820bdb3 Bug 1234629 - Part 1: Create bouncer APK for OTA distribution installs. r=margaret,gps
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.
2016-01-27 15:28:31 -08:00
Nick Alexander
45d70f711a Bug 1234629 - Part 0: Make Distribution look in /data/data/$PACKAGE/distribution last. r=rnewman
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.
2016-02-04 17:41:54 -08:00
Nick Alexander
5f4e1f9723 Backed out changeset 10dfe5e3ded1 (bug 1242213) 2016-02-05 16:35:45 -08:00
Michael Comella
601cfe71c0 Bug 1246314 - Add comment to explain why we don't log exceptions. r=me 2016-02-05 16:38:05 -08:00
Michael Comella
393beacaa7 Bug 1246314 - Don't log exception when throwing in client ID. r=ahunt 2016-02-05 16:07:15 -08:00
Nick Alexander
19001498af Bug 1233882 - Fold base Gradle project into app Gradle project. r=sebastian,mcomella
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.
2016-01-17 21:52:46 -08:00
Sebastian Kaspari
a6af4aa824 Bug 1219078 - Delegate OMA downloads to external app (if available). r=mfinkle
This patch will prevent Firefox from downloading OMA download descriptors on
its own. Instead it will prompt to complete the action with an external app
if available. An error will be shown if no external app can handle the download.
2015-12-17 14:49:37 +01:00
Abhishek Potnis
c61a989102 Bug 1243930 - Removed redundant statement of |obj.icon| assignment in |_setListItems|. r=mcomella 2016-02-05 23:32:14 +05:30
Nigel Babu
2682409fe4 Backed out 10 changesets (bug 1234629, bug 1233882) for bustage on Android rc tests
Backed out changeset 9aa32d9a25df (bug 1234629)
Backed out changeset d73d36c9619b (bug 1234629)
Backed out changeset a7f63b3721cd (bug 1233882)
Backed out changeset c79f4a8c3e86 (bug 1234629)
Backed out changeset 400c030d3c01 (bug 1234629)
Backed out changeset 54a3d0851bc6 (bug 1234629)
Backed out changeset f80912ecfa87 (bug 1234629)
Backed out changeset 50bcadca2131 (bug 1234629)
Backed out changeset aaa420ed66d7 (bug 1234629)
Backed out changeset 7a62e97f07c2 (bug 1234629)
2016-02-05 15:42:28 +05:30
Nick Alexander
7042d638e5 Bug 1234629 - Follow-up: clear distributions from /data/data during test. r=bustage
On a CLOSED TREE

I don't understand why I didn't see this in local testing or try
builds, but I didn't.  Simple enough: we now load a distribution from
/data/data as a matter of course, which means that tests that install
such a distribution need to remove it when they are done.  This patch
does that.
2016-02-04 17:41:54 -08:00
Nick Alexander
2f4cc4cba4 Bug 1168175 - Follow-up: Guard against null contexts. r=bustage
On a CLOSED TREE.

So, apparently we race to have a non-null application context from the
target context.  No matter, we can use the target context directly.
2016-02-04 17:17:07 -08:00
Nick Alexander
779ea83d1f Bug 1234629 - Follow-up: Add forgotten documentation file. r=me
Documentation only: DONTBUILD NPOTB
2016-02-04 15:54:12 -08:00
Nick Alexander
bf5ea4d671 Bug 1233882 - Fold base Gradle project into app Gradle project. r=sebastian,mcomella
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.
2016-01-17 21:52:46 -08:00
Mark Finkle
0b7adf0a42 Bug 1227662 - Fix code and add tests for fetching video mimetypes r=margaret 2016-02-04 18:19:59 -05:00
Nick Alexander
7048631bca Bug 1242213 - Part 3: Use android:packageName="org.mozilla.gecko" and --rename-manifest-package. r=mfinkle
ON A CLOSED TREE

I have manually verified that this results in a byte-identical
gecko.ap_.  This is because after the earlier patches there are no
definitions (or aliases) that are package-local (like .App or
.Webapp), which are the only things (other than the Android package
name) that get rewritten by --rename-manifest-package.
2016-01-24 22:00:30 -08:00
Nick Alexander
7c9eb55ac0 Bug 1242213 - Part 2: Fold App <activity-alias> into BrowserApp <activity>. r=mfinkle
Way back in Fennec 33 (Bug 929865, see
https://hg.mozilla.org/mozilla-central/rev/a4f39c9db1d9) we replaced
org.mozilla.gecko.App with org.mozilla.gecko.BrowserApp and introduced
the .App <activity-alias>.  Per the entry for android:name of
http://developer.android.com/guide/topics/manifest/activity-element.html,
.App translates to $ANDROID_PACKAGE_NAME.App.  We haven't referenced
an Activity qualified with a non-org.mozilla.gecko *class* name (for
example, from bookmark shortcuts) since well before Fennec 33, so this
probably never did what it was intended to do: we wanted to redirect
org.mozilla.gecko.App to org.mozilla.gecko.BrowserApp, but it instead
has been redirecting org.mozilla.fennec.App to
org.mozilla.gecko.BrowserApp.  I don't think we've been referring to
$ANDROID_PACKAGE_NAME.App since well before Fennec 29, if ever.

The <activity-alias> has been servicing essentially all
<intent-filter> invocations of Fennec by passing them directly to
org.mozilla.gecko.BrowserApp.

This pushes a long programme of simplification forward.  Fallout might
look like very old homescreen shortcuts failing to launch, but I'm
quite confident that won't actually happen.
2016-01-24 22:00:29 -08:00
Nick Alexander
2d1aa73a7f Bug 1242213 - Part 1: Remove old-style Webapp entry-point. r=mfinkle f=myk
This <activity> and <activity-alias> support old-style homescreen
shortcuts to old-style Webapps.  Such shortcuts must have been
produced at least 18 months ago, and pre-date the new-style synthetic
APK Webapps entirely.  New-style APK Webapps are slated to be removed
from the product entirely, and there's no reason to keep their even
less viable predecessor around.

Telemetry from http://mzl.la/23kXGV5 shows that there were no launches
of webapps (old-style or new-style) for Fennec 43 release.  Telemetry
from http://mzl.la/23kXFAs shows that there were 40.7k launches of
webapps (again, old-style or new-style) for Fennec 44 beta (of 39.0M
total -- for 0.1% total).  We cannot distinguish old-style from
new-style, but it is safe to assume it's a tiny proportion.

Users with such homescreen shortcuts will see a bogus "App isn't
installed" message and need to delete and re-create their shortcut in
some way.

The org.mozilla.gecko.Webapp class cannot be removed until new-style
APK Webapps are removed.
2016-01-24 22:00:29 -08:00
Andrzej Hunt
18ee77d9f8 Bug 1245516 - Don't shadow originHost, so we can process appOrigin correctly r=margaret 2016-02-03 15:27:35 -08:00
Nick Alexander
85450c9ba9 Bug 1234629 - Post: Add simple bouncer APK docs. r=me 2016-02-04 11:23:27 -08:00
Nick Alexander
c2377a3cbe Bug 1234629 - Post: Make bouncer APK Java package org.mozilla.gecko, like the main APK. r=me
This small change is a follow-up to Bug 1242213, which did the same
for the main package.  This is a nod to the future and Gradle, which
cleanly splits the internal Java package (org.mozilla.gecko) from the
external Android package (org.mozilla.fennec and friends).
2016-01-27 15:28:12 -08:00
Nick Alexander
5590b049e3 Bug 1234629 - Post: Add Gradle support for bouncer. r=me 2016-01-26 11:54:00 -08:00
Nick Alexander
2533b6a1c6 Bug 1234629 - Part 3: Make bouncer's <intent-filter> set a larger subset of Fennec's <intent-filter> set. r=margaret 2016-01-27 15:44:29 -08:00
Nick Alexander
a390c29b80 Bug 1234629 - Part 1: Create bouncer APK for OTA distribution installs. r=margaret,gps
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.
2016-01-27 15:28:31 -08:00
Nick Alexander
ca190092a3 Bug 1234629 - Pre: Make Distribution look in /data/data/$PACKAGE/distribution last. r=rnewman
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.
2016-01-26 17:06:27 -08:00
Nick Alexander
e075d1ad5b Bug 1168175 - Turn on screen and disable keyboard before running each test. r=gbrown 2016-02-04 09:54:12 -08:00
Nick Alexander
d8104a59cd Bug 1163082 - Part 2: Extract Android distribution from packaged assets rather than APK root. r=rnewman
This reads from "assets/distribution/**" in the APK and writes to
"distribution/**" in the data directory.  That output is the same, but
the input used to read from "distribution/**", which is not really
supported by modern build tooling (Gradle), which doesn't allow to
write files directly into the APK root.

I manually tested this without issue.  I see no way to add meaningful
tests to our current Robocop test suite; the long term testing
approach is to develop a new test for this functionality and only run
it against the "distribution" build type that was added in Bug
1163080.  However, that's a larger project than I have time for now.
2016-01-26 10:36:09 -08:00
Nick Alexander
61ddcc0a51 Bug 1163082 - Part 1: Add --with-android-distribution-directory. r=gps
This simply packs the assets/ subdirectory of the distribution
directory into the assets/ directory of the Android APK using existing
mechanisms.  It also removes the older method of manually pushing
files into dist/bin/distribution, from where they would be packaged
into the APK under distribution/.
2016-01-27 12:25:04 -08:00
Michael Comella
043c63414a Bug 1245711 - Update Adjust proguard cfg to match docs. r=mfinkle 2016-02-03 16:49:30 -08:00
Carsten "Tomcat" Book
2a07da30de Merge mozilla-central to fx-team 2016-02-04 12:08:00 +01:00
Carsten "Tomcat" Book
f84c32592e merge mozilla-inbound to mozilla-central a=merge 2016-02-04 12:02:05 +01:00
Nick Alexander
212a46e40e Backed out 2 changesets (bug 1163082) for Robocop rc1 failures.
Backed out changeset baf25be8d491 (bug 1163082)
Backed out changeset e228040a044b (bug 1163082)
2016-02-03 23:15:00 -08:00
Mark Finkle
5f9cd7a039 Bug 1245576 - Add missing unsave.1 UI Telemetry for removing bookmarks and readinglist items from Home Panels r=margaret 2016-02-04 02:45:02 -05:00
Nick Alexander
59ab1804e4 Bug 1163082 - Part 2: Extract Android distribution from packaged assets rather than APK root. r=rnewman
This reads from "assets/distribution/**" in the APK and writes to
"distribution/**" in the data directory.  That output is the same, but
the input used to read from "distribution/**", which is not really
supported by modern build tooling (Gradle), which doesn't allow to
write files directly into the APK root.

I manually tested this without issue.  I see no way to add meaningful
tests to our current Robocop test suite; the long term testing
approach is to develop a new test for this functionality and only run
it against the "distribution" build type that was added in Bug
1163080.  However, that's a larger project than I have time for now.
2016-01-26 10:36:09 -08:00
Nick Alexander
406f06596d Bug 1163082 - Part 1: Add --with-android-distribution-directory. r=gps
This simply packs the assets/ subdirectory of the distribution
directory into the assets/ directory of the Android APK using existing
mechanisms.  It also removes the older method of manually pushing
files into dist/bin/distribution, from where they would be packaged
into the APK under distribution/.
2016-01-27 12:25:04 -08:00
Nick Alexander
040223ed15 Bug 1243855 - Add Java client for interacting with autopush endpoint service. r=rnewman,sebastian
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.
2016-01-29 13:47:20 -08:00
Andrzej Hunt
39237fa17b Bug 1243307 - Post: convert AsyncTask to ThreadUtils.postToBackgroundThread r=liuche 2016-02-01 15:38:35 -08:00
Andrzej Hunt
9b1ca4ca41 Bug 1243307 - Post: clarify where onPromptFinished is run r=liuche 2016-02-01 15:37:47 -08:00
Andrzej Hunt
ca01440bdb Bug 1243307 - Part 2: Ensure homescreen shortcut creation happens on background thread r=liuche 2016-02-01 15:36:38 -08:00
Andrzej Hunt
ff01801dc7 Bug 1243307 - Part 1: Make onPromptFinished run in the UI thread again r=liuche
This seems more consistent with what Android UI callbacks do. This commit also
means all callees must be adapted to use the background thread if needed.
2016-02-01 15:07:47 -08:00
Michael Comella
65c9462b35 Bug 1244293 - Don't upload telemetry if user opts out. r=mfinkle
I'm slightly concerned we're providing too much configuration information in
the debugging statements.
2016-01-29 15:21:50 -08:00
Margaret Leibovic
fde5c8e182 Bug 1241566 - Put malware download protection behind a switchboard flag. r=liuche 2016-01-29 16:30:35 -05:00
Carsten "Tomcat" Book
a636b23432 merge mozilla-inbound to mozilla-central a=merge 2016-02-03 11:59:20 +01:00
Ting-Yu Lin
103832f156 Bug 1240917 - Tweak ActionBar behavior when selection is collapsed. r=snorp
* Long pressing on empty input -> show the ActionBar.
* Single tapping on input (either empty or non-empty) -> do not show the
  ActionBar.
2016-02-02 14:32:31 +08:00
Ting-Yu Lin
5327de631c Bug 1240917 - Turn off caret timeout on Fennec. r=snorp 2016-02-02 14:32:31 +08:00
Andrzej Hunt
ba6b13ff04 Bug 1240500 - Don't repeatedly create ArrayLists when searching for occurrences r=margaret 2016-02-01 17:24:28 -08:00