Removed starting stumbler from onResume(), broadcasting the stumbler startup
pref happens only in DelayedStartup. To further minimize the startup impact,
and so as not to compete for CPU/thread-space with more important services that
also have a delayed startup, delay by an additional second sending the start
message to stumbler.
I'd like to make the DialogFragment show icons, last synced times,
number of tabs, etc; but AlertDialog does not handle multi-choice lists
backed by a custom list adapters. (It does handle single-choice lists
backed by custom list adapters.) We can implement our own dialog
fragment if and when we want better looks.
I've made this somewhat general so that we can use it from
ShareDialog/SendTab, which currently use AlertDialog. Using
DialogFragment has two advantages. First, it smoothly persists across
configuration changes; AlertDialog does not. Second, it allow us to use
AlertDialog until we implement the improved UI above.
This is quite delicate, due to the interactions between
ExpandableListView and the footer views. At the end of the day, this
uses an Adapter that handles header and footer views as separate
view-group types. That means working around Android's limitations; see
the comments in the code for the details.
The alternative would be to implement our own wrapping Adapter; or to
boil the specifics of our use case into RemoteTabsExpandableListAdapter.
This is certainly quicker than the former; and, I hope, less error prone
than the latter.
This is necessary to provide the list of clients to another Fragment:
the way to persist "final members" across configuration changes is to
provide the initial data in the Fragment's arguments bundle.
Note: I'd like to see RemoteClient replace ParcelableClientRecord, and
Fennec's clients table replace direct access to Sync's clients table;
but one step at a time.
Per discussion with antlam, we shrink the top margin on landscape phones
in the hopes of fitting the content in the window. On portrait phones
and all tablets, we maintain a larger top margin.
This patch does several things:
1) It wraps static panel content in a ScrollView.
2) It tightens the static panels vertically. We can fit landscape on
many high-end phones by reducing the space before the header and between
the header and the body text slightly.
3) It makes the body text just a little narrower than the button. The
idea is for the call to action button to dominate the page horizontally.
4) It caps the maximum width of the content in the ScrollView. I would
have used maxWidth, but that doesn't exist for LinearLayouts (or
ScrollViews). Instead, I set a maxWidth for every RemoteTabsPanelItem,
which combined with wrap_content on the containing LinearLayout achieves
the same goal. It's what I intended to do on tablets.