OSDN Git Service

Fix jank in showing conditions and suggestions in cold start.
authorDoris Ling <dling@google.com>
Thu, 24 Aug 2017 20:09:57 +0000 (13:09 -0700)
committerDoris Ling <dling@google.com>
Thu, 24 Aug 2017 20:53:30 +0000 (13:53 -0700)
commit5b01294d8414cf03bbf7f4a2b30268537c03a0d7
tree547fdde789fbfeafedd4914d4d3a8f5ff3872bd5
parentefcc8be05c919ca0ac2b6cfb7810c7b722a0f66f
Fix jank in showing conditions and suggestions in cold start.

When we first initialize the dashboard view, and register the condition
listener, it will trigger the condition changed callback immediately.
This results in unnecessary refresh of the dashboard header. Add check
to not do the refresh when we first initialize the view.

Change-Id: If7c69637463734c150b7f5eb7f3c042cf73837fa
Fixes: 64811475
Test: make RunSettingsRoboTests
src/com/android/settings/dashboard/DashboardSummary.java
tests/robotests/src/com/android/settings/dashboard/DashboardSummaryTest.java