Commit Graph
2909 Commits
Author SHA1 Message Date
Chenxia Liu d223e27eac Bug 1261527 - Move code around. r=sebastian
MozReview-Commit-ID: LjgydyMLVER
2016-04-22 16:13:26 -07:00
Chenxia Liu a781cb5055 Bug 1261527 - Combine Synced devices into a folder. r=sebastian
MozReview-Commit-ID: APsufVggdk0
2016-04-21 22:04:10 -07:00
Andrzej Hunt a0fc3b223c Bug 1260149 - Only show single status icon in TwoLinePageRow r=liuche
MozReview-Commit-ID: 3wjBRHGioH4
2016-04-27 21:25:10 +02:00
Andrzej Hunt 3c0e70f1c3 Bug 1247689 - Experiment: show prompt on third opening of reader view r=sebastian
MozReview-Commit-ID: CMxdWuFIe5e
2016-05-02 10:00:52 -07:00
Andrzej Hunt 519c571e9b Bug 1247689 - Pre: Move bookmark snackbars / helper UIs into BookmarkStateChangeDelegate r=sebastian
MozReview-Commit-ID: BRGMN0vE8nf
2016-05-02 10:04:06 -07:00
Andrzej Hunt 6e1310e482 Bug 1265433 - Move bookmarks star into top bar of menu r=sebastian
We do this by showing history items in the "share" menu item, and
removing the existing "quickshare" item that showed history items.

We also need to shuffle our icon sizes around: our xhdpi icon size matches
the hdpi icon sizes of the other icons in the top bar (modulo padding, which
we need to add as part of this commit), similarly our xxhdpi icon is shifted to
xhdpi. We don't supply an xxhdpi icon at all for any of the icons in the top bar
of the menu, hence that size is removed (and reused for the xhdpi icon, see above).

MozReview-Commit-ID: 7fabPQ5Tyst
2016-04-27 19:29:54 +02:00
Andrzej Hunt 6a2a867eae Bug 1265433 - Pre: remove unnecessary v11 checks r=me
MozReview-Commit-ID: LHg1QcxpwIF
2016-04-27 12:13:52 +02:00
Mouaad Aallam d6c21be189 Bug 1262275 - "Add ContextUtils.getCurrentPackageInfo". r=mcomella 2016-04-27 11:24:00 +02:00
Michael Comella 3b73d2373c Bug 1245493 - Don't animate when showing toolbar when FF is first unhidden. r=margaret
After this patch, I still occasionally see the toolbar positioned part
way down from the top of the screen. However, this state looks slightly
less janky without the animation I removed and I can't consistently
reproduce it anymore.  Given the DynamicToolbar.setVisible calls I make,
I'd guess this is likely to be a bug caused by BrowserApp.onTabChanged
(and thus DynamicToolbar.setVisible) not getting called instantly and
so the DynamicToolbar is initialized to a different location on screen.
I'd guess it's a bug in DynamicToolbar as to why it's positioned partially
off-screen.

There is a little bit of code duplication, but that is because the code
to load a url on a new intent is duplicated (i.e. once from GeckoApp.initialize
- the initial load - and once from GeckoApp.onNewIntent). This could
potentially be cleaned up if we moved the app loading code into onResume,
but that may not be possible since we need to wait for Gecko to start
up.

Additionally, this patch adds a lot of hard-to-follow global state, which is
also not good.

Preferred solution (bug 1269041): show the toolbar each time onStart is
called (i.e.  FF is unhidden).  This is good for the user - they'll be
more aware which page they're on - but it's janky with the current
implementation, where the page content does not scroll when the toolbar
is shown so previously visible content is hidden. Thus, I went with the
other approach.  fwiw, Chrome does this behavior, but scrolls the toolbar
offscreen shortly after it is shown.

This solution is blocked on bug 1245523.

MozReview-Commit-ID: 7JjCrIf4KTm
2016-03-28 18:50:52 -07:00
Michael Comella 3525432a9c Bug 1245493 - Add comments to existing code to clarify them. r=margaret
MozReview-Commit-ID: KwOy1KMoPaY
2016-03-28 18:41:34 -07:00
Wes Kocher 75831241f7 Merge inbound to m-c a=merge
MozReview-Commit-ID: BKbqwBtHrBR
2016-04-29 14:54:44 -07:00
Sebastian Kaspari 76bc52828b Bug 1263390 - Post: Add new unused resources to UnusedResourcesUtil. r=ahunt
This is a temporary fix. The new plugin is able to find more unused resources.
However we are not ready to remove all of them yet. Some of them will be in
use again soon.
This patch will add those files to UnusedResourcesUtil in order to suppress
the lint error.

MozReview-Commit-ID: 7X9Dee6hWDg
2016-04-28 10:24:57 +02:00
Sebastian Kaspari 0f0c3137b6 Bug 1263390 - Post: Fix new "Registered" lint errors. r=mcomella
* 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
2016-04-20 10:18:33 +02:00
Jan Henning 515c5b6666 Bug 1263110 - Part 2 - Implement crash loop detection in Java. r=mfinkle r=sebastian
Bug 701092 originally implemented some functionality to detect successive crashes and then turn off session restore for the next start, however that functionality got lost when parts of the startup session restore code were moved to Java.

This patch re-implements this functionality within the Java UI. Unlike the previous implementation, we don't reset the crash counter in onPause(), because often enough onPause() will execute even after a crash. Instead, we check in onResume() whether our last foreground activity cycle crashed or not.

To avoid cross-process writes and reads to shared preferences, the crash reporter no longer sets the relevant flags in GeckoApp's shared prefs directly, but instead writes an empty CRASHED file to the Mozilla directory as a flag, which is then checked for by the main process during startup.

Alternative solutions considered were:
- Using Context.MODE_MULTI_PROCESS for accessing the shared prefs. Works, but forces the shared preferences to always be re-read from storage and is also deprecated from API 23 onwards.
- Using a ContentProvider for managing the cross-process shared prefs as suggested in Google's documentation. Seems somewhat over-engineered for this use case.
- Sending a broadcast from the crash reporter to signal the main process, so it can update the relevant shared prefs from the correct process. Doesn't work reliably immediately after crashing - sometimes the broadcast never arrives.
- Setting the crash flags directly in the crash handling functions in GeckoAppShell. Could work even when not building the crash reporter, however doesn't work easily for native crashes, because those are handled internally by Gecko without going through the Java crash handling code.

MozReview-Commit-ID: 6g7AmnJhoQk
2016-04-19 13:51:06 +02:00
Jan Henning 3b58f89aeb Bug 1263110 - Part 1 - Move crash reporter settings into their own shared pref. r=mfinkle r=sebastian
The crash reporter runs in its own process but uses GeckoApp's shared prefs both to store its own settings and to signal to the main process that it has crashed, which can be somewhat problematic because each process might fail to notice settings changes made by the other process. As the simple solution of enabling Context.MODE_MULTI_PROCESS for accessing the shared prefs is now deprecated, we'll devise an alternative solution instead.

In Part 1 we move the settings that are used exclusively by the crash reporter into a separate shared prefs instance.


MozReview-Commit-ID: 1QWBAL2Xcn2
2016-04-18 18:56:28 +02:00
Shatur f635e8bb04 Bug 1252823 - Find-in-page doesn't give enough visual feedback when no matches are found. r=margaret 2016-04-22 23:26:13 +05:30
Wes Kocher ba6cc7c5e6 Backed out 3 changesets (bug 1265525) for android rc1 failures in testBrowserProvider
Backed out changeset 64ff3f5121d7 (bug 1265525)
Backed out changeset d34dc8387cd4 (bug 1265525)
Backed out changeset 0f659fc840cd (bug 1265525)

MozReview-Commit-ID: EeMHCLV0BMG
2016-04-27 15:49:20 -07:00
Michael Comella 62da8b3c06 Bug 1267468 - Replace FileUtils.getFileContents with read*FromFile. r=sebastian
Reasons for replacement:
 * The old method was untested
 * The Scanner class is supposedly slower than using Streams directly (which
the new methods do)
 * If possible, it's generally better not to duplicate solutions - using the
Scanner works around the infrastructure this changeset series built (i.e. using
Streams).

In the edge cases, getFileContents:
 * throws NoSuchElementException for empty files. The new behavior is to return
the empty string. Since getFileContents was always wrapped by `new JSONObject`
or similar, and we throw when the file is empty, the behavior should stay the
same.
 * throws NoSuchFileException for missing files. This is the same as the
new behavior.

MozReview-Commit-ID: 6ESPss29emU
2016-04-26 15:36:04 -07:00
Michael Comella 9ecf3277b1 Bug 1267468 - Add additional details & tests for writeStringToFile. r=sebastian
MozReview-Commit-ID: 5yJE4VMyBwV
2016-04-26 15:46:56 -07:00
Michael Comella e18f45a5b5 Bug 1267468 - Move readJSONObjectFromFile -> FileUtils. r=sebastian
MozReview-Commit-ID: GVlOS3UJ1HS
2016-04-26 15:16:07 -07:00
Michael Comella 17e620eb1a Bug 1267468 - Add readStringFromFile and test. r=sebastian
This method duplicates an existing method (readFileContents) which will later
be removed.

MozReview-Commit-ID: 2aVf74KvYyP
2016-04-26 15:14:52 -07:00
Michael Comella 3a40d1ccca Bug 1267468 - Add readStringFromInputStream... and test. r=sebastian
Javadoc in this commit references a method that is not yet added.

MozReview-Commit-ID: Hc0MSLYTQgD
2016-04-26 15:01:10 -07:00
Michael Comella 968fef6293 Bug 1267468 - Move test writeJSONObjectToFile -> FileUtils. r=sebastian
MozReview-Commit-ID: GRVzaHYbEhI
2016-04-25 17:25:48 -07:00
Michael Comella ec00871581 Bug 1267468 - Add FileUtils.writeString to Stream & file with tests. r=sebastian
I would have separated these methods but version control fail.

MozReview-Commit-ID: 7og2iBKqHiH
2016-04-26 11:53:41 -07:00
Grigory Kruglov 81f54bf85c Bug 1265525 - Part 2: Frecency calculation and top sites query updates r=sebastian
MozReview-Commit-ID: 7tqr4IT9635
2016-04-27 10:43:21 -07:00
Grigory Kruglov dfd5720b44 Bug 1265525 - Part 1: Combined view migration, add local/remote visit aggregates r=sebastian
MozReview-Commit-ID: 211xyvAJbtd
2016-04-19 12:40:12 -07:00
Carsten "Tomcat" Book 3d1ea53a9a Merge mozilla-central to fx-team 2016-04-27 13:56:49 +02:00
Sebastian Kaspari 2b65810904 Bug 1228680 - Replace default favicon with generated version. r=ahunt
MozReview-Commit-ID: L0vd0v8wOUK
2016-04-25 16:28:42 +02:00
Sebastian Kaspari bcced9a2ee Bug 1228680 - Introduce FaviconGenerator to generate favicons based on URLs. r=ahunt
MozReview-Commit-ID: Aww2wxSTfD6
2016-04-25 16:10:15 +02:00
Kartikaya Gupta c332fdab66 Bug 1268122 - Guard against layerview destruction between the compositor update task being posted and it running. r=snorp
MozReview-Commit-ID: HJIFbcduj6E
2016-04-28 15:03:02 -04:00
Sebastian Kaspari fd52c1573f Bug 1265497 - FaviconView: New favicon background with rounded corners. r=ahunt
MozReview-Commit-ID: Fj1YRU2fZYF
2016-04-20 17:28:48 +02:00
Mark Capella 75c82cf492 Bug 1267383 - Followup Telemetry from Bug 1257843, Text Selection Probe, r=sebastian 2016-04-26 04:09:21 -04:00
Wes Kocher d89a150490 Merge inbound to central, a=merge
MozReview-Commit-ID: 4igUgM6r0wO
2016-04-25 17:11:09 -07:00
Sebastian Kaspari 75cafd5e29 Bug 1266383 - Do not show HomeScreenPrompt if tab is not in foreground. r=ahunt
MozReview-Commit-ID: 1j7FKOfVt0X
2016-04-21 19:36:22 +02:00
Sebastian Kaspari d2245da9b6 Bug 1266383 - (Pre) BrowserAppDelegate - Add methods for tabs tray shown/hidden. r=ahunt
MozReview-Commit-ID: JGL9EtRBKy0
2016-04-21 17:51:42 +02:00
Sebastian Kaspari 1fa368087c Bug 1266477 - Migrate screenshot observer code to class extending BrowserAppDelegate. r=mcomella,ahunt
MozReview-Commit-ID: FoIfEhmd4mN
2016-04-21 16:20:32 +02:00
Sebastian Kaspari 43f6e102d4 Bug 1266477 - Migrate AddToHomeScreenPromotion to extend BrowserAppDelegate. r=mcomella,ahunt
MozReview-Commit-ID: 5YuudrL7hLh
2016-04-21 16:11:49 +02:00
Sebastian Kaspari bf48411145 Bug 1266477 - Introduce BrowserAppDelegate to extend the behavior of BrowserApp. r=mcomella,ahunt
MozReview-Commit-ID: 2voLpgEOcW
2016-04-21 15:40:20 +02:00
Jim Chen 4c92c73da0 Bug 1256147 - Initialize EditorInfo even when IME is not active; r=esawin
Initialize the EditorInfo object even when we return null in
onCreateInputConnection. This fixes the bug for the Samsung keyboard on
Galaxy S7.
2016-04-25 12:51:12 -04:00
Jim Chen e442275166 Bug 1256147 - Post to UI thread for all showSoftInput calls; r=esawin
Make showSoftInput always post to the UI thread for consistency.
2016-04-25 12:51:12 -04:00
Jim Chen 143ea2cc98 Bug 1256147 - Show/hide keyboard in onCreateInputConnection; r=esawin
Showing and hiding the keyboard in onCreatInputConnection avoids a
possible race with resetInput in notifyIMEContext, and it replaces the
"show keyboard on window refocus" hack that we had before.
2016-04-25 12:51:12 -04:00
Andrzej Hunt e328ce1d9a Bug 1263571 - Post: make checkstyle happy r=me
MozReview-Commit-ID: GvcUZz2Jd4w
2016-04-24 20:29:57 +02:00
Andrzej Hunt 2578c81985 Bug 1246238 - Post: make checkstyle happy r=me
MozReview-Commit-ID: JJ2PK3jka5e
2016-04-24 20:30:39 +02:00
Andrzej Hunt 7b1ead21ac Bug 1246238 - Show helper UI first time a reader view page is bookmarked r=sebastian
MozReview-Commit-ID: JeHr7eZTKc
2016-04-20 21:27:30 +02:00
Andrzej Hunt 2a65d502a5 Bug 1246238 - Pre: Implement SimpleHelperUI r=sebastian
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
2016-04-23 10:56:17 +02:00
Sebastian Kaspari 2103f4076c Bug 1264901 - Implement media-control front-end. r=ahunt
MozReview-Commit-ID: H6Py4Wd35db
2016-06-03 14:43:21 +02:00
Jim Chen cc80b2e35a Bug 1268125 - Order GeckoThread states by degree of initialization; r=snorp
Introduce a rank parameter to GeckoThread states that is used to compare
states based on the degree of initialization, i.e. the amount of
components or features available for use.
2016-05-24 12:18:04 -04:00
Jim Chen c913b43669 Bug 1270201 - Change first Gecko argument to package name; r=snorp
The first argument (argv[0]) to Gecko should be the program name, not
the apk name. For Android, the program name is the package name.
2016-05-05 11:39:03 -04:00
Andrzej Hunt a0d7394072 Bug 1263571 - Update switch-to-tab for reader view pages too r=liuche
MozReview-Commit-ID: 6qKDBy2P4nK
2016-04-12 10:58:10 -07:00
Andrzej Hunt e83ccc68d8 Bug 1263571 - Pre: onTabChanged data is always a String, declare it as such r=liuche
We're always using this as a String, we might as well make this explicit to avoid having to cast
anywhere. (We very rarely use the parameter, but some new code in the main part of Bug 1263571
would have to cast this to a String. We can avoid that if we just use the correct type.)

MozReview-Commit-ID: H8JdMzQtmRI
2016-04-23 10:32:54 +02:00