Merge "Fix Array Index out of bounds error." into oc-dev
am: 5c05814af4
Change-Id: I11b957781eaab2702b3c7f1466c89ce60a5c30c8
This commit is contained in:
@@ -124,7 +124,8 @@ public class WifiTracker {
|
|||||||
*/
|
*/
|
||||||
private final Object mLock = new Object();
|
private final Object mLock = new Object();
|
||||||
|
|
||||||
//visible to both worker and main thread. Guarded by #mInternalAccessPoints
|
//visible to both worker and main thread.
|
||||||
|
@GuardedBy("mLock")
|
||||||
private final AccessPointListenerAdapter mAccessPointListenerAdapter
|
private final AccessPointListenerAdapter mAccessPointListenerAdapter
|
||||||
= new AccessPointListenerAdapter();
|
= new AccessPointListenerAdapter();
|
||||||
|
|
||||||
@@ -1005,12 +1006,13 @@ public class WifiTracker {
|
|||||||
if (DBG) {
|
if (DBG) {
|
||||||
Log.d(TAG, "Starting to copy AP items on the MainHandler");
|
Log.d(TAG, "Starting to copy AP items on the MainHandler");
|
||||||
}
|
}
|
||||||
if (notifyListeners) {
|
|
||||||
notificationMap = mAccessPointListenerAdapter.mPendingNotifications.clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
mAccessPointListenerAdapter.mPendingNotifications.clear();
|
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
|
if (notifyListeners) {
|
||||||
|
notificationMap = mAccessPointListenerAdapter.mPendingNotifications.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
mAccessPointListenerAdapter.mPendingNotifications.clear();
|
||||||
|
|
||||||
for (AccessPoint internalAccessPoint : mInternalAccessPoints) {
|
for (AccessPoint internalAccessPoint : mInternalAccessPoints) {
|
||||||
AccessPoint accessPoint = oldAccessPoints.get(internalAccessPoint.mId);
|
AccessPoint accessPoint = oldAccessPoints.get(internalAccessPoint.mId);
|
||||||
if (accessPoint == null) {
|
if (accessPoint == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user