Commit Graph

88 Commits

Author SHA1 Message Date
Doris Ling
f0bb63f307 Fix NullPointerException in DashboardSummary. am: 797dd7440d am: 454dc3739a
am: 45a821105f

Change-Id: I39623232f80a9de2d2199af11585eaa61bce2e08
2016-08-26 23:03:39 +00:00
Doris Ling
45a821105f Fix NullPointerException in DashboardSummary. am: 797dd7440d
am: 454dc3739a

Change-Id: Id334c7b3f36d8fcfbb4e919007d0bf5789b605fb
2016-08-26 22:26:40 +00:00
Doris Ling
797dd7440d Fix NullPointerException in DashboardSummary.
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
2016-08-26 11:13:21 -07:00
Salvador Martinez
a54c3690a4 Added guard to logging in AsyncTask am: 030eeeee6d
am: 60bd509d4e

Change-Id: Ib1d37a0c9c68c01be0d59bff5d78cd37c083689f
2016-08-25 20:02:35 +00:00
Salvador Martinez
030eeeee6d Added guard to logging in AsyncTask
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)
2016-08-25 17:45:24 +00:00
TreeHugger Robot
e96d65deea Merge "Added guard to logging in AsyncTask" 2016-08-25 00:36:32 +00:00
Salvador Martinez
566b66e27c Added guard to logging in AsyncTask
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
2016-08-24 15:11:21 -07:00
Andrew Sapperstein
f36eac3889 resolve merge conflicts of 6890d53 to master
Change-Id: I61c1ed150fe311c4e07df524b5c0577f35d3bd60
2016-08-24 10:50:28 -04:00
Doris Ling
6890d538ae resolve merge conflicts of f757d1e to nyc-mr1-dev-plus-aosp
Change-Id: I1e53b78977bb32fe34462cf46bbfe66626574e65
2016-08-23 19:02:31 -07:00
Doris Ling
bfbb964cb1 Log settings suggestions events only once.
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
2016-08-23 13:25:06 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Doris Ling
b14d42080b Log settings suggestions events only once.
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
2016-08-02 17:01:39 -07:00
Doris Ling
4a6f8b967a Check for null activity before getting dashboard categories. am: b7e650c6f7
am: 4ec4b64b9d

Change-Id: Id96c017083cc49abbdc3cc6122ea277fe3c78755
2016-07-22 01:47:12 +00:00
Doris Ling
4ec4b64b9d Check for null activity before getting dashboard categories.
am: b7e650c6f7

Change-Id: I26f8c96189d3390055a7dd02680da57d2c2ed2cb
2016-07-22 01:42:47 +00:00
Doris Ling
b7e650c6f7 Check for null activity before getting dashboard categories.
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
2016-07-21 12:22:17 -07:00
Doris Ling
eacb97e3d7 Merge \\"Combine setCategories() and setSuggestions() in DashboardAdapter.\\" into nyc-mr1-dev am: 7e70fd1166
am: b3055b083a

Change-Id: I1c61400fee835a8297d754455596e530b1d006c2
2016-07-20 19:51:24 +00:00
Doris Ling
b3055b083a Merge \"Combine setCategories() and setSuggestions() in DashboardAdapter.\" into nyc-mr1-dev
am: 7e70fd1166

Change-Id: Id8f655e0a9b29369a57eea3c5140cf47def7cc36
2016-07-20 18:51:17 +00:00
Doris Ling
38d8582abe Combine setCategories() and setSuggestions() in DashboardAdapter.
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
2016-07-15 13:08:56 -07:00
Doris Ling
89b315568a resolve merge conflicts of 161093b to master
Change-Id: I14c74be54ca216b1f1e369685516a821a94ab30a
2016-07-13 11:18:28 -07:00
Doris Ling
161093bb0a Merge \"Reduce the number of times that dataset changed is triggerd in DashboardAdapter\" into nyc-mr1-dev
am: 8c50ced07c

Change-Id: I0989b7f8e122d5221757b57b1866d536a1657ae3
2016-07-13 17:25:16 +00:00
Doris Ling
b76de265a2 Reduce the number of times that dataset changed is triggerd in DashboardAdapter
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
2016-07-12 18:02:22 -07:00
Jason Monk
718c84f121 resolve merge conflicts of 67e87fa to nyc-mr1-dev
Change-Id: I8c5a79de3176912a1803a481b8b179faf1dad178
2016-06-01 16:20:01 -04:00
Jason Monk
350a930c68 onResume -> onStart, onPause -> onStop
For SettingsActivity and DashboardSummary

Bug: 28896214
Change-Id: I235d5c82b04b1363bf4416acb5cf5fc1c4db704f
2016-06-01 13:45:25 -04:00
Jason Monk
e5e4a555e7 Merge "Fix crash from battery saver switch" into nyc-dev am: 371aec1e92 am: e3b9c3dd63
am: 362287567e

* commit '362287567e1b66421c9bbdf1fd1ca7ae7c547113':
  Fix crash from battery saver switch

Change-Id: I01a71bf6f60c634baa2b4784dd757ca729b7075c
2016-05-26 18:02:56 +00:00
Jason Monk
e3b9c3dd63 Merge "Fix crash from battery saver switch" into nyc-dev
am: 371aec1e92

* commit '371aec1e92aa4b5cf6e4ed2b5f39faf180c17d1f':
  Fix crash from battery saver switch

Change-Id: I0416b92dbc9b18a97c9d6d0617cba636e310690b
2016-05-26 17:53:41 +00:00
Jason Monk
e4d0ed502d Fix crash from battery saver switch
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
2016-05-26 11:07:53 -04:00
Jason Monk
5c2a9d336b Merge "Protect against case when suggestions haven\'t loaded" into nyc-dev am: 76f95e82b8 am: f241ae5fcf
am: 2a5b456e69

* commit '2a5b456e69e029f101769e8465afc50939254780':
  Protect against case when suggestions haven't loaded

Change-Id: I085ab8cdb6650457ebc552afdb5218a3fe37ce0a
2016-05-11 15:21:29 +00:00
Jason Monk
f241ae5fcf Merge "Protect against case when suggestions haven\'t loaded" into nyc-dev
am: 76f95e82b8

* commit '76f95e82b861441bccb9f452fe77e1c47acc1d3c':
  Protect against case when suggestions haven't loaded

Change-Id: Ie0bc3aa3e696efcec5560860284b457e636bd5bc
2016-05-11 15:16:01 +00:00
Jason Monk
31ecec0ab1 Protect against case when suggestions haven't loaded
Change-Id: I7668ed8af3f1808b619f0fdbd77c2f85da98f607
Fixes: 28691636
2016-05-11 11:01:17 -04:00
Jason Monk
2e2f19d2eb resolve merge conflicts of 0496ffa to master
Change-Id: I61589b7e9f1190e19d48dbb421541ebc2891ee82
2016-05-10 16:34:48 -04:00
Jason Monk
0496ffad87 Merge "Make sure TileAdapter always has a SuggestionParser" into nyc-dev am: a50a14a23a
am: 4101ba4eb1

* commit '4101ba4eb1395988941f3f24bc2f502753036e2f':
  Make sure TileAdapter always has a SuggestionParser

Change-Id: Ic204cabd5cdbdd67f6bbdb53032a277da7fd34fa
2016-05-10 20:29:02 +00:00
Jason Monk
6e9867dcc9 Merge "Make sure TileAdapter always has a SuggestionParser" into nyc-dev
am: a50a14a23a

* commit 'a50a14a23a4f57203d01489ddef607f46f485518':
  Make sure TileAdapter always has a SuggestionParser

Change-Id: I87ee80fa989079c554c60870b9ddc70d3b36c5e4
2016-05-10 20:26:22 +00:00
Jason Monk
a41a8d05ab Make sure TileAdapter always has a SuggestionParser
Since it expects to have one

Change-Id: Ic0dccd2271c011cf7dc877e341af5a8bfea90c37
Fixes: 28689801
2016-05-10 13:03:35 -04:00
Jason Monk
572b3c82fc Merge "Dashboard performance work" into nyc-dev am: 04b25af149 am: 96eedcfdd2
am: fc5f0d4d20

* commit 'fc5f0d4d20817112d7d8d101f245ba50d45728e8':
  Dashboard performance work

Change-Id: I5daad812baf80d27ea6cf097bea15065fa581a7b
2016-05-09 13:48:48 +00:00
Jason Monk
96eedcfdd2 Merge "Dashboard performance work" into nyc-dev
am: 04b25af149

* commit '04b25af149ba8e4c38cfe17fe9caf246a598e8e3':
  Dashboard performance work

Change-Id: I41c9443c997428924b5ef6df2ad632c06bd416a8
2016-05-09 13:40:54 +00:00
Jason Monk
2386dfc18d Dashboard performance work
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
2016-05-06 13:17:47 -04:00
Fan Zhang
2869157ba9 Display setting and support in a tab layout - DO NOT MERGE
Bug: 28269035
Bug: 28139604
2016-04-20 11:42:15 -07:00
Jason Monk
c87aacb169 Work on settings startup speed
- Cut down on amount stored in conditions xml
 - Remove extra work from dashboard startup
 - Move summary to min priority

Change-Id: I51ca3828e4446632d6faa60dcfbab3446d19d335
Fixes: 28134360
2016-04-13 10:18:24 -04:00
Jason Monk
5673ced93c Work on settings startup speed
- Cut down on amount stored in conditions xml
 - Remove extra work from dashboard startup
 - Move summary to min priority

Change-Id: I51ca3828e4446632d6faa60dcfbab3446d19d335
Fixes: 28134360
2016-04-12 15:19:50 -04:00
Fan Zhang
872c61249b Revert "Add a RecyclerView adapter for first tab in settings."
This reverts commit 44e7be1289.

Change-Id: I1391f41a19526ebd02a0c06e628fb1e18d454a71
2016-04-11 09:13:16 -07:00
Jason Monk
c19eb986f3 Settings tweaks
Change-Id: I68829fa8e49534d4635a008c94dced3c7ab6f4b1
Fixes: 27834471
Fixes: 27834626
Fixes: 27567838
Fixes: 27834676
2016-04-11 09:21:24 -04:00
Jason Monk
db3fcfb7cb Merge "Settings tweaks" into nyc-dev 2016-04-08 20:46:49 +00:00
Jason Monk
be8d5aa2b9 Settings tweaks
Change-Id: I68829fa8e49534d4635a008c94dced3c7ab6f4b1
Fixes: 27834471
Fixes: 27834626
Fixes: 27567838
Fixes: 27834676
2016-04-08 16:44:31 -04:00
Fan Zhang
44e7be1289 Add a RecyclerView adapter for first tab in settings.
Bug: 27907841

The new adapter eventually will contain: conditionals, status,
suggestions.

Change-Id: I62f9db3db6557b16255ad94e2ce166b3c376e1bb
2016-04-06 10:13:38 -07:00
Suprabh Shukla
b84720c075 Moving HelpUtils to SettingsLib
Moved HelpUtils to SettingsLib in frameworks/base so it can be shared by
packageinstaller as well.

Bug: b/22096093
Change-Id: I8d620abcde8279a3b4d11bbcff8ae9b6f46a1895
2016-04-05 14:37:33 -07:00
Fan Zhang
d9d21d6cb1 Move actionbar menu from DashboardSummary to container.
Bug: 27751187
Change-Id: I7730f104805abcbb6d243fccac94e39fad26ddd2
2016-03-31 15:33:45 -07:00
Jason Monk
45fda2734a Add metrics for suggestions
Bug: 27851236
Change-Id: Ia5aa1d42a40ba09a19db3c3790f0a7342660e613
2016-03-30 16:05:29 -04:00
Jason Monk
f20c718f19 Add metrics for settings conditionals
Bug: 27851236
Change-Id: I400716457d3f628419410a02c2a457d41d19a067
2016-03-30 15:46:26 -04:00
Jason Monk
decc767f26 Guard against monkey crash.
Bug: 27784445
Change-Id: I4ba6e02e0cdb6857661a824ae0888feac6762a05
2016-03-22 09:17:12 -07:00
Jason Monk
d11cca0168 Fix Settings home lifecycle
Bug: 27330440
Bug: 26268813
Change-Id: Ibb3729c9872be2488db3741ec72ba5a43e66db5f
2016-03-16 14:27:12 -04:00