Test color mapping equivalent in O(n)
Relies on the ordering in SparseIntArray, as it's documented as ordered. Bug: 187852819 Test: Manual Change-Id: I3942a7f3826c173d99544ac0b4f81266b4ca3cc1
This commit is contained in:
@@ -909,7 +909,8 @@ public class AppWidgetHostView extends FrameLayout {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < oldColors.size(); i++) {
|
||||
if (oldColors.valueAt(i) != newColors.get(oldColors.keyAt(i))) {
|
||||
if (oldColors.keyAt(i) != newColors.keyAt(i)
|
||||
|| oldColors.valueAt(i) != newColors.valueAt(i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user