Commit Graph

14121 Commits

Author SHA1 Message Date
arthur.iakab
4fa098883c Backed out changeset 29becdf09eb6 (bug 1444776) for lint bustage on Android 2018-05-30 22:08:53 +03:00
Andrei Lazar
3fe5b24454 Bug 1444776 - Tab Queue prompt needs to use APPLICATION_OVERLAY window type when targeting (and running on) Android O. r=JanH
Now using the the TYPE_APPLICATION_OVERLAY window type to display alert windows for devices running on Android O.

MozReview-Commit-ID: 7pdquyowbsB
***

--HG--
extra : rebase_source : c8ccb6d9c8bb681ee32d71b58c95f6efd933d34a
2018-05-14 15:25:38 +03:00
Makoto Kato
8b264ece4d Bug 1455006 - Use Looper to get main thread instead of main thread name. r=jchen
Actually, Gecko uses thread name "main" to find main thread.  But Android
has Looper object to get main loop.  So we should use it instead.

MozReview-Commit-ID: 9oVqftqLZmh

--HG--
extra : rebase_source : 84593b794f9055739a10a08ca2b4fa737043100c
2018-05-24 20:46:18 +09:00
Petru Lingurar
393c825916 Bug 1462594 - Allow accessing all Settings menus on tablets; r=mcomella
Bug details:
The problem stemmed from the now called GeckoPreferences.trySwitchToHeader(int id) which could be called with an invalid id, constant with the same value as the id of the last available setting.
(GeckoPreferenceFragment().getHeader() would return valid ids only for preference screens that are launched directly. Otherwise it would return: -1)
By chance the id for the last available setting - vendor was not set and so Android saw it with an invalid header id: -1.
GeckoPreferences.trySwitchToHeader(int id) would just switch to showing the vendor setting because that is what he has been instructed to whenever the user tried to access other settings than the ones which can be launched directly.

Cleaned the code a bit:
- renamed GeckoPreferences.switchToHeader(..) to trySwitchToHeader(..) as it won't always perform that action
- removed the call to activity.showBreadCrumbs(..) as in my tests it didn't have any effect and the documentation says "This will normally be called for you".

Tested on An Android 8 tablet, on an Android 8 phone, on an Android 5.0.1 phone and all works ok.

MozReview-Commit-ID: 2sbfcuRHgZd

--HG--
extra : rebase_source : 51f4629e89846d01224a0cd7dd8b3fba93657f40
2018-05-24 14:09:22 +03:00
s37syed
0ba5ea93ce Bug 1411198 - Unlabeled voice input button. r=mcomella
Made QR string consistent with respect to other url related strings

MozReview-Commit-ID: 432jaONccer

--HG--
extra : rebase_source : 44b50664e9602a11d82a1c1759b3e35e9f25e075
2018-05-17 01:05:47 -04:00
s37syed
f7413006a4 Bug 1411198 - Unlabeled voice input button. r=mcomella
Added localization notes and more verbose strings for non-visual users.

MozReview-Commit-ID: FiOcDJrgRIy

--HG--
extra : rebase_source : 3fcaafc16e7bdbbeab881d16270b036b0a781cf4
2018-05-17 00:52:41 -04:00
s37syed
374a1d8e61 Bug 1411198 - Unlabeled voice input button. r=mcomella
Added contentDescription strings for QR Code and Voice Input

MozReview-Commit-ID: 6tpoewhPxev

--HG--
extra : rebase_source : 3ed1f0263f108ad63131f99168ee9879f83fbdb2
2018-05-14 21:35:34 -04:00
Petru Lingurar
9d1cf91350 Bug 1454686 - Respond to changes in the new preference state state; r=mcomella
Because Mma cannot work if Health Report is disabled by the user (Settings - Privacy)
we will treat toggling Health Report on/off the same as we treat toggling the new preference from Settings - Notifications.
Toggling Health Report on will inform about the need to start LeanPlum (useful if the user did not explicitly stopped LP notifications but only Health Report which in turn disabled LeanPlum also) but there are other checks made afterwards (BrowserAp() is informed about this which calls GeckoPreferences.isMmaAvailable(..)) to decide if LP can and should be enabled.

Toggling any of these preferences will trigger an event caught by BrowserApp which can either
    - immediately initialize LeanPlum (if the toggle was off LP is not running) as it would normally do when the app first starts
    - stop LeanPlum reporting to servers, flush the per-session available messages
      and resets the LP started status so that it can be restarted in the same app session (like if the user toggles the feature again)

MozReview-Commit-ID: 1SmhN0NucWW
***

--HG--
extra : rebase_source : b461677fd8a07d7c0c463e55c33bae1a3a973a1f
2018-05-16 15:54:13 +03:00
Petru Lingurar
4c52d88b03 Bug 1454686 - Small refactoring of Mma related methods; r=mcomella
With the adding of the new preference that Mma depends on we need to have only one place where all the conditions for considering if Mma is available are checked - GeckoPreferences.isMmaAvailableAndEnabled()
Added only one place from where the availability of the LP experiments should be checked as that currently involves two checks - MmaDelegate.isMmaExperimentEnabled(..)
Also renamed isMmaEnabled() from MmaDelegate() and initSwitchboard from BrowserApp() to better express what those methods do.

MozReview-Commit-ID: BCJqM9b5JbW
***

--HG--
extra : rebase_source : 3c4b1707f69bfa5b39fe12ff45d8961b713f2291
2018-05-17 18:55:38 +03:00
Petru Lingurar
ef1c73d1d6 Bug 1454686 - MmaLeanPlumImp().stop() will now stop LP, stop showing messages and allow restart in same app session; r=mcomella
According to current LP documentation there are no SDK APIs to allow users to fully stop LP: events reporting and message displaying there.
After extensive testing and investigations I think I found the least intrusive way to offer that.

We will use internal methods but which are public so I hope they will be supported in the future also. Nevertheless we will need to maintain this in regards to future SDK updates.

MozReview-Commit-ID: Ke3HGAyCqVA
***

--HG--
extra : rebase_source : e6510e12777ee3286742f00ae75d8ca69296989e
2018-05-17 18:45:01 +03:00
Petru Lingurar
753b481522 Bug 1454686 - Add a new preference under Settings - Notifications; r=mcomella
The behavior of this new preference is dynamic in that:
- it will be hidden if LeanPlum is not available for the device
- it will be toggled off and disabled if Health Report is disabled by the user

MozReview-Commit-ID: 1x9zZukyygr
***

--HG--
extra : rebase_source : c31ad02cbbb106613914634b5192f856aad185b7
2018-05-16 11:49:35 +03:00
Michael Kaply
96b8767c2a Bug 1461432 - Use list.json instead of browsersearch.json. r=nalexander
MozReview-Commit-ID: ISmBoFe45Co

--HG--
extra : rebase_source : f6cdc3ee4d063d9413cb3f6306f9f9f59fff1681
2018-05-17 12:51:16 -05:00
Petru Lingurar
dc645158f1 Bug 1434603 - Settings Header not changed when visiting sub-menus on Oreo; r=mcomella
The ActionBar's title will always be updated with the title of the visiting PreferenceScreen.

MozReview-Commit-ID: b5MyrSaWFC

--HG--
extra : rebase_source : 1ad23955ba940935898a4331debb5554a61b4359
2018-05-15 13:03:44 +03:00
William Lachance
7580f75456 Bug 1461772 - Submit display version as a property of the fennec core ping r=gsvelto
MozReview-Commit-ID: BFwgwOOo83s

--HG--
extra : rebase_source : 986add321c25e233702f1540127c19babd365797
2018-05-15 15:11:35 -04:00
Dylan Roeh
cecb3eb9fb Bug 1459513 - Handle null uri components gracefully in WebAppManifest. r=snorp 2018-05-11 16:28:51 -05:00
James Willcox
83a9f5c1e1 Bug 1433968 - Use GeckoRuntime to launch Gecko in Fennec r=jchen
MozReview-Commit-ID: AUrvsFWDuhY
2018-05-10 16:42:23 -05:00
James Willcox
bc73d8b2e0 Bug 1433968 - Add CrashReporterService for GeckView r=jchen
The Fennec CrashReporter class is also renamed to
CrashReporterActivity. When running in Fennec, the Activity will be used
which retains what we do today, prompting for comments, email, etc. When
used in standalone GeckoView, we report the crash without user
interaction if the appropriate GeckoRuntimeSetting was set. The app will
want to ask for user permission at least once in order to set this.

We do not collect the URL, email, or logcat with GeckoView crashes.
Logcat and URL would be nice to have, but it's not clear what the API
for those would look like, and they can be addressed in followup
patches.

MozReview-Commit-ID: C5ROsUKreRe
2018-05-10 16:42:20 -05:00
Tiberius Oros
5245fb43e0 Backed out 6 changesets (bug 1433968) for Android failures on GeckoRuntimeSettings on a CLOSED TREE
Backed out changeset bba1deb626b5 (bug 1433968)
Backed out changeset 7a8616427aea (bug 1433968)
Backed out changeset c94c48d76350 (bug 1433968)
Backed out changeset 64cccb490a2a (bug 1433968)
Backed out changeset 62f865eed952 (bug 1433968)
Backed out changeset 5ed1e3af37ba (bug 1433968)
2018-05-10 18:11:55 +03:00
James Willcox
9520a60bbd Bug 1433968 - Use GeckoRuntime to launch Gecko in Fennec r=jchen
MozReview-Commit-ID: AUrvsFWDuhY
2018-05-10 08:34:07 -05:00
James Willcox
05a3f8ac8e Bug 1433968 - Add CrashReporterService for GeckView r=jchen
The Fennec CrashReporter class is also renamed to
CrashReporterActivity. When running in Fennec, the Activity will be used
which retains what we do today, prompting for comments, email, etc. When
used in standalone GeckoView, we report the crash without user
interaction if the appropriate GeckoRuntimeSetting was set. The app will
want to ask for user permission at least once in order to set this.

We do not collect the URL, email, or logcat with GeckoView crashes.
Logcat and URL would be nice to have, but it's not clear what the API
for those would look like, and they can be addressed in followup
patches.

MozReview-Commit-ID: C5ROsUKreRe
2018-05-10 08:34:06 -05:00
Jan Henning
60fdddd5ed Bug 1335148 - Part 3: Notify Gecko and turn bfcache back on when Fennec memory pressure decays to 0. r=snorp
MozReview-Commit-ID: 6Oyu7Lx1gFQ

--HG--
extra : rebase_source : f2cf0d587f0eaa60033539a9506fde6b0494b3a8
2018-05-06 13:40:05 +02:00
Kris Maglione
4900714df7 Bug 1457321: Part 1 - Add bundled dictionaries to built_in_addons.json. r=ted,rhelmer
MozReview-Commit-ID: GxCSXXaz8kz

--HG--
extra : rebase_source : a334cfbeee786aeaca373b5a7fc8107fa44c2243
2018-04-27 15:42:55 -07:00
arthur.iakab
f2042a4c1f Merge inbound to mozilla-central a=merge 2018-05-08 15:42:06 +03:00
Andrew Gaul
80f292e771 Bug 1436271 - Replace calls to String.getBytes(String) with String.getBytes(Charset). r=nalexander
Also replace calls to String(byte[], String) with String(byte[], Charset).  This
removes some cannot-happen exception handling.
2018-02-06 22:12:33 -08:00
Narcis Beleuzu
323d4a4185 Backed out 3 changesets (Bug 1433968) for causing Bug 1459349. a=backout
Backed out changeset 82b765c5a02f (bug 1433968)
Backed out changeset 73ec9bb3e17e (bug 1433968)
Backed out changeset 0812ac0376da (bug 1433968)

--HG--
extra : amend_source : 2748b297418eea9b7d3c2be11a8e7e300f8d709c
extra : histedit_source : 6428453bbe80ad044661d01e5127d924fffed1a3%2Cd2e712ac6c597784343ff08f75199851c07be4e7
2018-05-07 17:06:30 +03:00
Gabriele Svelto
b711bd404a Bug 1458643 - Use 'Android' as the OS name for Fennec crash pings; r=jchen
MozReview-Commit-ID: 4yPsDbmt1sZ

--HG--
extra : rebase_source : 2f9225b294ae23583ba077b6dbad7d72709636da
2018-05-02 21:54:23 +02:00
Petru Lingurar
5f4a0e0b4c Bug 1380850 - Track when Focus or Klar get installed; r=mcomella
Added a static broadcast receiver that will inform us as soon as possible of any installed packages.
Because mma methods are static, if LeanPlum is enabled, the event will be tracked even if the app was not running when the new package was installed
and as per LeanPlum's internal workings the event will be reported to the dashboard when the application resumes.

MozReview-Commit-ID: AGNsQn7LuCz
***

--HG--
extra : rebase_source : 3d40a9f85036c0495b110409bff86e56f8b7c465
2018-05-02 13:32:43 +03:00
Jim Chen
cdd3e5ab7e Bug 1457255 - 2. Fix Java warnings; r=me
Fix all Java warnings in the Android codebase except deprecation and
serial warnings, and warnings in third-party code.

There is one required change to exoplayer2 code under thirdparty,
because that code is included directly in the geckoview project, instead
of the thirdparty project. I think I'll just make a pull-request to
upstream the change, instead of separating exoplayer2 into a
gv-thirdparty project.

--HG--
extra : amend_source : 29419a24db9b956a7f3ee573a63f7a055ed90636
2018-05-01 00:22:54 -04:00
shindli
0ceedb430c Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-02 01:58:30 +03:00
Noemi Erli
5b7edf8bba Backed out 4 changesets (bug 1457255) for kotlin warnings/errors are not being parsed by Treeherder a=backout
Backed out changeset 9c42ce50a911 (bug 1457255)
Backed out changeset 524a0f9fb978 (bug 1457255)
Backed out changeset a49833bfd519 (bug 1457255)
Backed out changeset 4eccde5dfbef (bug 1457255)
2018-05-02 01:16:57 +03:00
Jim Chen
225b0afd64 Bug 1457255 - 4. Fix remaining Java warnings; r=me on CLOSED TREE 2018-05-01 01:01:00 -04:00
Jim Chen
0ce1010182 Bug 1457255 - 2. Fix Java warnings; r=me
Fix all Java warnings in the Android codebase except deprecation and
serial warnings, and warnings in third-party code.

There is one required change to exoplayer2 code under thirdparty,
because that code is included directly in the geckoview project, instead
of the thirdparty project. I think I'll just make a pull-request to
upstream the change, instead of separating exoplayer2 into a
gv-thirdparty project.
2018-05-01 00:22:54 -04:00
James Willcox
bae31b8761 Bug 1433968 - Add CrashReporterService for GeckView r=jchen
The Fennec CrashReporter class is also renamed to
CrashReporterActivity. When running in Fennec, the Activity will be used
which retains what we do today, prompting for comments, email, etc. When
used in standalone GeckoView, we report the crash without user
interaction if the appropriate GeckoRuntimeSetting was set. The app will
want to ask for user permission at least once in order to set this.

We do not collect the URL, email, or logcat with GeckoView crashes.
Logcat and URL would be nice to have, but it's not clear what the API
for those would look like, and they can be addressed in followup
patches.

MozReview-Commit-ID: C5ROsUKreRe
2018-05-01 10:43:22 -05:00
Eugen Sawin
2711cb3a4d Bug 1439013 - [2.0] Add onLoadRequest load flags. r=snorp,droeh 2018-04-27 20:49:54 +02:00
Dylan Roeh
1ecdb851b4 Bug 1454228 - Ignore onSecurityChange for initial about:blank load in PWAs. r=jchen 2018-04-27 12:56:29 -05:00
Petru Lingurar
7932a610e4 Bug 1445798 - Add Leanplum settings opt-out strings needed for bug #1454686; r=mcomella
To allow users to opt-out from receiving LeanPlum messages we need a new setting added.
This are the Strings for the title and summary of that setting.

Localization notes also added as this Strings will ship before the feature.

Decided to suppress all UnusedResources Lint errors for android strings until the patch for #1454686 lands as using in-line suppression caused other errors.
Ran Lint locally, the build passed.

MozReview-Commit-ID: 9Kx567ruY3n
***

--HG--
extra : rebase_source : acb555719b4da9199364ca737ff140012dacb47c
2018-04-23 19:09:13 +03:00
Vlad Baicu
fe8e33968a Bug 1405192 - Return if onResume has already been called and onPause hasn't. Add telemetry ping for future investigations. r=mcomella
After investigating and analyzing the crash reports this type of scenario can occur due to multi-window or some popups. We are tracking this scenario for further investiagion with a telemetry event. Also added a constant for the hardcoded telemetry event when onPause gets called before onResume.

MozReview-Commit-ID: 2qXCYFyjlce

--HG--
extra : rebase_source : 9883fbc38864d93e653d27f270667b3976bbfbf9
2018-04-25 18:56:55 +03:00
Nick Alexander
397ff33d16 Bug 1456487 - Update Firefox Account's first run UUID when re-connecting. r=rnewman
The behaviour of Android Firefox Account instances recently changed in
the face of system "Clear data" commands.  To align more closely with
common Apps like Dropbox and Whatsapp (which generally don't use
Android Account instances), after a "Clear data" a Firefox Account is
moved to the Separated state, requiring the user to re-connect them
with a password challenge.  To achieve this, newly created accounts
include a first run UUID; after a "Clear data", the App is killed and
restarted, Sync sees a different first run UUID, and the Account is
moved to the Separated state.  (I honestly don't know what happens if
the Sync code never sees a different first run UUID, but that's for
another day.)  If the user then, in the same first run session,
re-connects the Firefox Account... the Sync code will again see the
different first run UUID and move the Account to the Separated state.

This patch updates the first run UUID when the Account is
re-connected, breaking that cycle.

MozReview-Commit-ID: 9jcO9Ym54an

--HG--
extra : rebase_source : be92a7ab0f36563e7b3af69f42095dc2b244bdd2
2018-04-25 12:17:05 -07:00
Brindusan Cristian
59f801793b Merge inbound to mozilla-central. a=merge 2018-04-25 00:50:59 +03:00
Eugen Sawin
d0a67d958e Bug 1437551 - [3.2] Move generic callback out of GeckoSession. r=snorp,jchen 2018-04-24 18:23:08 +02:00
Jim Chen
c401054171 Bug 1454441 - 3. Move remote debugging setting to runtime; r=esawin,snorp
Move the remote debugging setting to GeckoRuntimeSettings and use it in
geckoview_example.

MozReview-Commit-ID: G2IINILQAOm

--HG--
extra : rebase_source : fad2c96241593c6ce8898691ebf03c224815f339
2018-04-23 12:07:34 -04:00
Andreea Pavel
4109ce94c2 Backed out 4 changesets (bug 1454441) for android-lint failure on a CLOSED TREE
Backed out changeset d4fcd301a168 (bug 1454441)
Backed out changeset 79fa5c2950a3 (bug 1454441)
Backed out changeset deb0e12bfbd7 (bug 1454441)
Backed out changeset fad6be573021 (bug 1454441)
2018-04-23 20:16:29 +03:00
Sylvestre Ledru
aefcd1c84b Bug 1448934 - Fix some spelling mistakes in locales/en-US r=flod
MozReview-Commit-ID: vGVudVgB31

--HG--
extra : rebase_source : cdc39375a3485a3133878c4dbbffe60c0b26e917
2018-04-24 10:26:35 +02:00
Jim Chen
75e138adb8 Bug 1454441 - 3. Move remote debugging setting to runtime; r=esawin,snorp
Move the remote debugging setting to GeckoRuntimeSettings and use it in
geckoview_example.

MozReview-Commit-ID: G2IINILQAOm

--HG--
extra : rebase_source : fad2c96241593c6ce8898691ebf03c224815f339
2018-04-23 12:07:34 -04:00
Petru Lingurar
f90e036199 Bug 1445798 - Add Leanplum settings opt-out strings needed for bug #1454686; r=mcomella
To allow users to opt-out from receiving LeanPlum messages we need a new setting added.
This are the Strings for the title and summary of that setting.

Localization notes also added as this Strings will ship before the feature.

MozReview-Commit-ID: 9Kx567ruY3n

--HG--
extra : source : 9dece6b7a5949d4c56415ee7ed6f4e03c3eb8e42
2018-04-18 10:59:16 +03:00
Dorel Luca
34a70ebeae Backed out 4 changesets (bug 1454441) for Android Mochitest failure on mobile/android/tests/browser/chrome/test_debugger_server.html. CLOSED TREE
Backed out changeset d924aed50460 (bug 1454441)
Backed out changeset 976d9622bf5c (bug 1454441)
Backed out changeset 99fa43f0686e (bug 1454441)
Backed out changeset fbcb2eee69fc (bug 1454441)
2018-04-21 01:01:06 +03:00
Jim Chen
51abedf496 Bug 1454441 - 3. Move remote debugging setting to runtime; r=esawin,snorp
Move the remote debugging setting to GeckoRuntimeSettings and use it in
geckoview_example.

MozReview-Commit-ID: LW4f4qenUrx

--HG--
extra : rebase_source : 3664b00d6b66a835063a8333e0151760f7aa8bcb
2018-04-20 15:51:30 -04:00
Cosmin Sabou
10f4083749 Backed out changeset 9dece6b7a594 (bug 1445798) for permafailing on Android lint. a=backout 2018-04-20 01:50:10 +03:00
Petru Lingurar
b0505dfb57 Bug 1445798 - Add Leanplum settings opt-out strings needed for bug #1454686; r=mcomella
To allow users to opt-out from receiving LeanPlum messages we need a new setting added.
This are the Strings for the title and summary of that setting.

Localization notes also added as this Strings will ship before the feature.

MozReview-Commit-ID: 9Kx567ruY3n

--HG--
extra : rebase_source : 67bd840c00b9cc3dfa0d80152f0960c51f5f39eb
2018-04-18 10:59:16 +03:00
Petru Lingurar
73c9b40a82 Bug 1423045 - Drop an event when User changes default browser to Firefox; r=mcomella
Use SharedPreference to ensure we won't loose previous state if Fennec is killed, set as default, restarted.
The default browser status will only be set once, when the app is resumed, as it cannot change while the app is in foreground.
We will track "E_Changed_Default_To_Fennec" only if Fennec wasn't previously the default browser.
The method to track the event is safe to be called even before the mma init process is finished as LeanPlum postpones the track operation until it has actually been started.

Refactored MmaDelegate to not use a WeakReference for application context anymore as that should exist for the entire time the app is open, and only in that timeframe the MmaDelegate methods that use that context can be called.

MozReview-Commit-ID: JMJJclWj9fq

--HG--
extra : rebase_source : a6b3c6b097dfacb348a4fd0bbf054dd0c14b2d4a
2018-04-18 15:21:12 +03:00