An async task was trying to get the context
in an InstrumentedFragment. This could return
null if the context disappears before the new
thread gets to that line. Logging will now
be aborted if context is null to avoid this.
Test: Manual/Monkey Stability Test
Bug: 31058928
Change-Id: Iae97d389e58a76b0f213a2749415501894ebf649
(cherry picked from commit 566b66e27c)
The show/hide settings suggestions events are logged every time Settings
is shown. Save the logged events into the state bundle so that when the
fragment is resumed, it does not re-log the suggestions events.
Also move the logging for the show suggestion event to when the suggestion
is loaded, as the suggestions can be empty when the fragment starts.
Change-Id: I644ea0012bad309e59fed0d48171915c955779cc
Fixes: 30108142
In DashboardSummary, when async task finishes running, ensure that the
fragment is still associated with the activity before getting the
dashboard categories from the activity.
Change-Id: If23cd27a0d3e3429d900ae41ef6f24ed03b9e8d6
Fixes: 30278854
In DashboardSummary.rebuildUI(), we first update the adapter with the
current categories, then run the async task to update the adapter with
the suggestions. This causes the adapter to first layout the existing
categories, and relayout when the suggestions is available. This causes
the suggestions view and categories view to overlap before the
relayout is complete.
Since categories and suggestions are borh set each time we try to
rebuild the UI, delaying the update for categories until the suggestions
are ready will avoid the unnecessary relayout of the list elements.
Ran app launch test for Settings app with the change and launch time is
between 412ms and 486ms in 10 runs, which does not show much delay in
app launch time with delaying updating the categories.
Bug: 29318104
Change-Id: I03ae2386392315f28fe2c361682f2f3252e9f827
1. Save the suggestion list and the category list into the instance
state so that it will be available on warm start, and avoid the need
to reload the data.
2. Add the condition list to the constructor parameters for
DashboardAdapter, so that it does not need to setConditions()
separately which will trigger notifyDataSetChanged()
Bug: 30055644
Change-Id: Ia04fa3a25b13d2dacf6baf5f412d662a595fb6dd
Turns out most things expect the conditions to be loaded immediately
so if the dashboard hasn't been hit, they crash. Instead load
immediately for everything but the dashboard.
Change-Id: Iaa1114c88b3766e2ac513acb417ef2a55a0f4e7f
Fixes: 28952354
am: 76f95e82b8
* commit '76f95e82b861441bccb9f452fe77e1c47acc1d3c':
Protect against case when suggestions haven't loaded
Change-Id: Ie0bc3aa3e696efcec5560860284b457e636bd5bc
am: a50a14a23a
* commit 'a50a14a23a4f57203d01489ddef607f46f485518':
Make sure TileAdapter always has a SuggestionParser
Change-Id: I87ee80fa989079c554c60870b9ddc70d3b36c5e4
Push more stuff to backround threads (this will cause conditions/suggestions
to load slightly slower than normal content) and cache more info.
Fixes: 28613950
Bug: 28435146
Change-Id: I1080930e8f31c7f12a2d89f266bfd3236979cf40
- Cut down on amount stored in conditions xml
- Remove extra work from dashboard startup
- Move summary to min priority
Change-Id: I51ca3828e4446632d6faa60dcfbab3446d19d335
Fixes: 28134360
Moved HelpUtils to SettingsLib in frameworks/base so it can be shared by
packageinstaller as well.
Bug: b/22096093
Change-Id: I8d620abcde8279a3b4d11bbcff8ae9b6f46a1895
Also, fixes a bug where the suggested activity stayed on screen
after the component was disabled causing a crash.
bug:25246207
bug:26770556
Change-Id: I28d784cdc57e464e49887483690ab514ca3bc46a
Use an XML to define the categories that Settings will look for,
and surface enabled activities under those categories as suggestions.
When clicked on the activity will be started for result. If the result
is not cancelled, then the operation is assumed successful and the
suggestion is disabled. Users can also use an overflow -> remove
flow to get rid of unwanted suggestions.
Change-Id: I767abf8efe103af0509bc6b6b55888ae82643512
- Handle a backup URI, so that if the specified URI is not available,
another can be used.
- Add some data to help intents when they are intent URIs
- Fill in the context with a classname when it isn't present
Bug: 15475009
Change-Id: I7050fa61121901929e650b20bd7a0ae21e8ba207
Allow help uris to be either an intent uri or as uri (as they were
before). Also add a default help uri, and specific helps for several
screens.
Bug: 15475009
Change-Id: Iff982892973f01d32ff61ea88d4844e9a7153500
Allow system apps to add a tile to the top level of settings that
links to an activity through adding a filter for a specific action.
Determine the info for the tile based off manifest info for the
activity. Also allow the same for managed profiles, but show a dialog
in between to select which profile.
The category in which the item is to be placed must be in meta-data.
The icon and title can be specified through meta-data as well or
if unspecified the activity's label and icon will be used.
Also added an optional <external-tiles> tag to the dashboard
category xml, this allows Settings to put external tiles
in the middle of some categories (Personal does this).
Bug: 19443117
Change-Id: Idc9938d1549d181103a3030a8784b527215a8399
- remove that HomePackageReceiver from the AndroidManifest
that could force Settings to run
- use a HomePackageReceiver into HomeSettings and DashboardSummary
- fix also the BatteryInfoReceiver for refreshing the Dashboard
Change-Id: Id3891529fc176e7e4c450f2ce723f8ac2af66c58
- follow UX spec
- update also the Search Panels (suggestions / results) to
follow the same specs
See bug: #15384992 Setting Dashboard - padding updates
Change-Id: I3d27a3b3d9779644f8ea123990a0c7bed8d4ba74
- prevent loading categories twice
- add some logging to see the time taken for building the Dashboard titles
Change-Id: I31724c0e66fe3b453a87f12476f58db84c73423f