Commit Graph
35 Commits
Author SHA1 Message Date
Jan Henning 2b0901ff9f Bug 1500906 - Suppress FileUriExposedExceptions when launching helper apps. r=jchen
Sharing tabs with file:// URIs is not possible, but users can still send them to
other apps via the helper app system in the URL bar/context menu. "Intent:Open"
and "Intent:OpenForResult" are both sent from Gecko by HelperApps.jsm.

The same reasoning as in bug 1450449 applies as to why for publicly accessible
files content:// URIs are more trouble than they're worth.

Differential Revision: https://phabricator.services.mozilla.com/D9420
2018-10-24 16:00:06 +00:00
Andrei Lazar 06c83463b9 Bug 1406903 Part 2: Added support for opening HTML files. r=JanH
Added support for opening HTML files from internal storage when user is choosing fennec in the dialog picker.

Depends on D7167

Differential Revision: https://phabricator.services.mozilla.com/D7490
2018-10-15 11:05:26 +00:00
Eugen Sawin e51a35e645 Bug 1480757 - [1.0] Move safe intent handling utilities from IntentHelper to IntentUtils to make them accessible in GeckoView. r=jchen 2018-08-09 16:27:31 +02:00
Vlad Baicu a31fe3a76c Bug 1477041 - Modified MediaControlService and notification flow. r=jchen
Created a new parcelable which is sent to MediaControlService where
the notification is created based on the data of this object instead of
referencing a static notification. Toggling the service is now done through
startService with a specific action for shutting down instead of calling
stopService due to concurrency issues where the service can be stopped before
having a chance to call startForeground.

MozReview-Commit-ID: 6qNPintkVy
2018-07-30 16:21:09 +03:00
Cosmin Sabou cc8f06ae94 Backed out changeset 06cdeb2fd522 (bug 1477041) for build bustages on MediaControlService. CLOSED TREE 2018-07-27 22:12:18 +03:00
Vlad Baicu 882706c3ca Bug 1477041 - Modified MediaControlService and notification flow. r=jchen
Created a new parcelable which is sent to MediaControlService where
the notification is created based on the data of this object instead of
referencing a static notification. Toggling the service is now done through
startService with a specific action for shutting down instead of calling
stopService due to concurrency issues where the service can be stopped before
having a chance to call startForeground.

MozReview-Commit-ID: 6qNPintkVy
2018-07-26 19:28:29 +03:00
Vlad Baicu 699efd1afc Bug 1476720 - Set MLS notification action. r=jchen
Added a content action which will open the privacy settings when
tapping the mozilla location services notification.

MozReview-Commit-ID: 9h85amcoF0T
2018-07-25 14:32:02 +03:00
Jan Henning 48c7f5cccf Bug 1450449 - Part 2: Use content:// URI for capturing images from FilePicker. r=jchen
Since it is only us and the camera app who have to deal with the content:// URI,
it should be safe enough to use content:// URIs on all supported versions.

MozReview-Commit-ID: JMIhBRlCiA4
2018-05-12 23:02:19 +02:00
Jan Henning f78fa895c2 Bug 1449504 - Part 1 - Truncate overly long text before sharing via an Intent. r=jchen
At least on some devices, there seems to exist some sort of intermediate danger
zone where the intent is no longer large enough to be rejected outright by the
OS, but still big enough to render Firefox inoperable through some sort of
resource exhaustion.

From Android 6.0 onwards, this doesn't matter as otherwise we would have crashed
anyway, but on previous Android versions a much too large intent will simply be
ignored, so if we truncate, but not enough, this actually makes matters worse.

The value used in this patch was chosen by attempting to share the whole
contents of planet.mozilla.org on a Samsumg S3 Mini running Android 4.1.2.
90k characters led to resource exhaustion and the screen turning black, while
85k characters still worked. On a more modern phone, even larger amounts (e.g.
100k characters, like Chrome) worked. Therefore, to have some additional margin,
a maximum limit of 80k characters will be used.

MozReview-Commit-ID: 6etHe0KUgig
2018-03-28 22:52:14 +02:00
Jan Henning 4d6dd48bca Bug 1449504 - Part 0 - Cleanup unused imports. r=JanH
MozReview-Commit-ID: FTcXEZVgU2M
2018-03-28 22:43:05 +02:00
Jan Henning 1bbc13aa37 Bug 1278581 - Part 3 - Don't load neterror page manually when protocol couldn't be handled. r=snorp
Our current way is somewhat convoluted - we manually create an about:neterror
URL in the Android UI and then load it from the ContentDispatchChooser by simply
setting window.location.href, which means that the page URL won't reflect the
actual URL we were trying to load and the rest of Gecko will think that the page
load succeeded (unless they're explicitly checking the URL for the presence of
about:neterror).

MozReview-Commit-ID: Z0LSSE6AGU
2018-03-21 22:47:17 +01:00
Andrew Gaul 937cdb7593 Bug 1419268: Make some static fields final r=nalexander
This allows compile-time initialization instead of runtime in clinit.
2017-11-20 21:01:10 -08:00
Jan Henning a9c38eb9e0 Bug 1410975 - Support recording audio via supported app from the file picker. r=nechen
Unlike capturing images/videos, the Android permission for recording audio is apparently only required if we want to record the audio ourselves, but not if we're merely calling out to some other app via MediaStore.Audio.Media.RECORD_SOUND_ACTION. Therefore we can drop that permission request for now.

MozReview-Commit-ID: 35vtm8Y78hh
2017-10-23 21:10:50 +02:00
Jan Henning f21a0bc33a Bug 1362919 - Allow falling back to basic file picker if permissions are denied. r=nechen
Theoretically this patch would also handle the case where the user has granted only some of the requested permissions, but at the moment our Permissions implementation doesn't make it easy to find out *which* permissions have been denied in the fallback case. So for the time being, we assume having no permissions at all in the fallback case.

MozReview-Commit-ID: EtxFfiLQONF
2017-10-23 18:43:45 +02:00
Dylan Roeh 2601456afb Bug 1399504 - Pass more information to Intent:OpenNoHandler callback so that fallback urls may always be handled correctly. r=jchen 2017-09-26 13:46:27 -05:00
Jim Chen 20aafbe443 Bug 1393128 - 1. Make IntentHelper available globally; r=nechen,sebastian
Instead of initializing IntentHelper in GeckoApp, initialize it in
GeckoApplication, and make it available globally. This will let custom
tabs / PWA use IntentHelper-provided services.

MozReview-Commit-ID: Icedph6KG4u
2017-08-28 23:56:43 -04:00
Jan Henning 5e72a2ed31 Bug 1366098 - Part 1 - Remove Fennec tab type infrastructure. r=walkingice
The new, preferred solution for displaying additional web content outside of our normal tab infrastructure and UI is to use a separate GeckoView instance. Therefore, the support for different having additional "tab" types that aren't displayed in the normal UI, as well as for multiple GeckoApp instances displaying different tabs is no longer needed and can be removed.

MozReview-Commit-ID: FNx0gJIKybr
2017-06-27 14:13:40 -07:00
Jim Chen ca42b6fe3a Bug 1373891 - Support Activities other than main Fennec Activity in openUriExternal; r=me
We may get an Activity that is not the main Fennec Activity in
IntentHelper.openUriExternal. In that case the Activity would not be a
FragmentActivity, and we should go through the fallback case. r=me for
trivial patch.

MozReview-Commit-ID: G5hiLBnrQlo
2017-06-28 20:24:36 -04:00
Eugen Sawin bce3c7aef1 Bug 1374200 - [1.0] Use custom URI scheme normalization to work around API level 16 restriction. r=rnewman 2017-06-21 22:49:45 +02:00
Wes Kocher 4db4c47d09 Merge m-c to autoland, a=merge
MozReview-Commit-ID: AVwPRGa5re9
2017-05-22 16:38:46 -07:00
Eugen Sawin fbfb5d0b95 Bug 1356893 - Reject opening intents with file data schemes. r=sebastian, r=nalexander 2017-05-22 09:50:40 -04:00
Jan Henning 3c65d21240 Bug 1359531 - Part 3 - Creating new intents is a job for IntentHelper. r=sebastian,walkingice
MozReview-Commit-ID: 9s7aP35Q0AJ
2017-04-28 22:35:29 +02:00
Jim Chen 8d4381582a Bug 1363167 - Remove GeckoInterface.getActivity; r=snorp
Use available Context or GeckoActivityMonitor to derive an Activity
instance, instead of using GeckoInterface.getActivity().

MozReview-Commit-ID: GHLMtnQkr2l
2017-05-15 23:11:11 -04: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
Jim Chen 4dcb146035 Bug 1333581 - Convert IntentHelper events to bundle events; r=sebastian
Convert events used in IntentHelper to bundle events. UI thread events
are used for most events because the listeners perform operations on
Intent objects, which is best done on the UI thread. For
"Intent:GetHandlers", use a Gecko thread event because it's possible we
want a synchronous callback response.
2017-01-25 18:57:31 -05:00
Tushar Saini (:shatur) 75462f42df Bug 1261041 - Remove feature11Plus-feature15Plus flags. r=sebastian
MozReview-Commit-ID: J4uXtUrjuKr
2016-09-22 21:20:23 +05:30
Phil Ringnalda 31ed29be45 Bug 1278581 followup, placate checkstyle
CLOSED TREE

MozReview-Commit-ID: Apt89thqPfX
2016-09-30 08:21:55 -07:00
James Willcox 5ad003924d Bug 1278581 - Show neterror page if you enter an unknown URI scheme into urlbar on Android r=sebastian 2016-09-29 08:27:54 -05:00
Makoto Kato e86bf6d5e0 Bug 1299400 - Remove WebActivities Android Backend. r=sebastian
WebActivities API has removed by bug 1284455, so we should remove Android backend.

MozReview-Commit-ID: IOYs1bM2u06
2016-08-31 17:16:22 +09:00
dragoslav.mlakar b24f9f39ba Bug 1282289 - Avoid crash when using Android add-on/HelperApps. r=nalexander 2016-07-28 07:19:57 +02:00
Nick Alexander 0a3cdcf4b5 Bug 1258450 - Automated (mostly) refactorings moving GeckoAppShell static methods into IntentHelper. r=snorp
MozReview-Commit-ID: JbfR3pVFxDK
2016-03-30 10:21:29 -07:00
Carsten "Tomcat" Book 5e3b0cfdc2 Backed out changeset 462e9e4314ef (bug 1258450) 2016-03-30 14:02:12 +02:00
Nick Alexander 6b140ee6ba Bug 1258450 - Automated (mostly) refactorings moving GeckoAppShell static methods into IntentHelper. r=snorp
MozReview-Commit-ID: JbfR3pVFxDK
2016-03-20 20:14:07 -07:00
Michael Comella 547ec8d580 Bug 1258605 - Don't show about:neterror when intents fail to load. r=margaret
Motivations are in the added comment.

MozReview-Commit-ID: 1EymB8rXzT5
2016-03-25 17:36:37 -07:00
Nick Alexander c682759005 Bug 1107811 - Part 1: Move Java code. r=mfinkle
#!/bin/bash
set -x
pushd mobile/android/base
# Can't be present in glob below.
rm -rf java/org/mozilla/gecko
for i in */ ; do
# But is necessary to copy into.
mkdir -p java/org/mozilla/gecko
hg mv $i java/org/mozilla/gecko ;
done
hg mv *.java java/org/mozilla/gecko
# Move back stuff we didn't want to move.
hg mv java/org/mozilla/gecko/crashreporter crashreporter
hg mv java/org/mozilla/gecko/docs docs
hg mv java/org/mozilla/gecko/locales locales
hg mv java/org/mozilla/gecko/resources resources
popd
2015-12-04 11:51:34 -08:00