Make dashboard tile refresh more effcient.

Instead of removing and re-adding all dashboard tiles, figure out a diff
and rebind/add/remove as necessary.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I9d87ba30ab746257d0ea71282951348ebc4e8965
This commit is contained in:
Fan Zhang
2016-10-19 14:15:34 -07:00
parent 8b5bca5937
commit a1a84e6530
6 changed files with 256 additions and 79 deletions

View File

@@ -15,6 +15,7 @@
*/
package com.android.settings.dashboard;
import android.content.Context;
import android.support.v7.preference.Preference;
import com.android.settingslib.drawer.DashboardCategory;
@@ -53,4 +54,10 @@ public interface DashboardFeatureProvider {
* Returns an unique string key for the tile.
*/
String getDashboardKeyForTile(Tile tile);
/**
* Returns a {@link ProgressiveDisclosureMixin} for specified fragment.
*/
ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context,
DashboardFragment fragment);
}