Add DiffCallback to handle Contextual Cards update.
Use DiffCallback in ContextualCardsAdapter to only update items that are changed instead of touching those unchanged ones. Also fix a bug where ConditionContexualCardCard#onStart is incorrectly skipped. Fixes: 112245748 Bug: 118165942 Test: robotests Change-Id: I7989d621764fe40a3fceb8c9f40baced840818ba
This commit is contained in:
@@ -107,12 +107,12 @@ public class ConditionManager {
|
||||
*/
|
||||
public void startMonitoringStateChange() {
|
||||
if (mIsListeningToStateChange) {
|
||||
Log.d(TAG, "Already listening to condition state changes, skipping");
|
||||
return;
|
||||
}
|
||||
mIsListeningToStateChange = true;
|
||||
for (ConditionalCardController controller : mCardControllers) {
|
||||
controller.startMonitoringStateChange();
|
||||
Log.d(TAG, "Already listening to condition state changes, skipping monitor setup");
|
||||
} else {
|
||||
mIsListeningToStateChange = true;
|
||||
for (ConditionalCardController controller : mCardControllers) {
|
||||
controller.startMonitoringStateChange();
|
||||
}
|
||||
}
|
||||
// Force a refresh on listener
|
||||
onConditionChanged();
|
||||
|
Reference in New Issue
Block a user