In onSaveInstanceState(), move saving the suggestions logging lists to
the top so that it will be saved to the bundle even when layout manager
is null.
Test: run monkey
Change-Id: I248563a255158feadeb85898a920af96a1565fa9
Fixes:31111795
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)
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.
Bug: 31058928
Change-Id: Iae97d389e58a76b0f213a2749415501894ebf649
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
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
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: 2a5b456e69
* commit '2a5b456e69e029f101769e8465afc50939254780':
Protect against case when suggestions haven't loaded
Change-Id: I085ab8cdb6650457ebc552afdb5218a3fe37ce0a
am: 76f95e82b8
* commit '76f95e82b861441bccb9f452fe77e1c47acc1d3c':
Protect against case when suggestions haven't loaded
Change-Id: Ie0bc3aa3e696efcec5560860284b457e636bd5bc
am: 4101ba4eb1
* commit '4101ba4eb1395988941f3f24bc2f502753036e2f':
Make sure TileAdapter always has a SuggestionParser
Change-Id: Ic204cabd5cdbdd67f6bbdb53032a277da7fd34fa
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
- 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