Fix the consistency of connection status displayed on Wi-Fi card
- Refresh slice in WifiTracker.onConnectedChanged - Only expose notifySliceChange to child in SliceBackgroundWorker Fixes: 123270015 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi.slice Change-Id: Id5540ebae2746e58e14924665c5e62bf437ebcf0
This commit is contained in:
@@ -59,10 +59,6 @@ public abstract class SliceBackgroundWorker<E> implements Closeable {
|
||||
mUri = uri;
|
||||
}
|
||||
|
||||
protected Uri getUri() {
|
||||
return mUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of the {@link SliceBackgroundWorker} for specified {@link Uri}
|
||||
* if exists
|
||||
@@ -148,7 +144,14 @@ public abstract class SliceBackgroundWorker<E> implements Closeable {
|
||||
|
||||
if (needNotify) {
|
||||
mCachedResults = results;
|
||||
mContext.getContentResolver().notifyChange(mUri, null);
|
||||
notifySliceChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify that data was updated and attempt to sync changes to the Slice.
|
||||
*/
|
||||
protected void notifySliceChange() {
|
||||
mContext.getContentResolver().notifyChange(mUri, null);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user