Fix the bug of "Connecting" is rarely appearing on Wi-Fi slice
- AccessPoint treats connected and connecting as equal so slice doesn't refresh in this case - Add a new method to determine if two lists are the same in SliceBackgroundWorker - WifiScanWorker overrides this method to check the access point states Fixes: 123941320 Test: robotest Change-Id: I78d610da4b6b1d40f5785ba6701fb71b987fe31c
This commit is contained in:
@@ -146,7 +146,7 @@ public abstract class SliceBackgroundWorker<E> implements Closeable {
|
||||
needNotify = true;
|
||||
}
|
||||
} else {
|
||||
needNotify = !results.equals(mCachedResults);
|
||||
needNotify = !areListsTheSame(results, mCachedResults);
|
||||
}
|
||||
|
||||
if (needNotify) {
|
||||
@@ -155,6 +155,10 @@ public abstract class SliceBackgroundWorker<E> implements Closeable {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean areListsTheSame(List<E> a, List<E> b) {
|
||||
return a.equals(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify that data was updated and attempt to sync changes to the Slice.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user