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
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
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
Use available Context or GeckoActivityMonitor to derive an Activity
instance, instead of using GeckoInterface.getActivity().
MozReview-Commit-ID: GHLMtnQkr2l
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.
Convert the "FilePicker:Show" event used in FilePicker and
testFilePicker to use GeckoBundle/BundleEventListener. UI event is used
because the listener performs Intent operations, which is best for the
UI thread. "FilePicker:Result" notification is removed in favor of
using a callback.