Merge "Fix QS wifi scan state" into oc-dr1-dev
This commit is contained in:
@@ -287,11 +287,17 @@ public class QSDetail extends LinearLayout {
|
||||
mScanState = state;
|
||||
final Animatable anim = (Animatable) mQsDetailHeaderProgress.getDrawable();
|
||||
if (state) {
|
||||
mQsDetailHeaderProgress.animate().alpha(1f);
|
||||
anim.start();
|
||||
mQsDetailHeaderProgress.animate().cancel();
|
||||
mQsDetailHeaderProgress.animate()
|
||||
.alpha(1)
|
||||
.withEndAction(anim::start)
|
||||
.start();
|
||||
} else {
|
||||
mQsDetailHeaderProgress.animate().alpha(0f);
|
||||
anim.stop();
|
||||
mQsDetailHeaderProgress.animate().cancel();
|
||||
mQsDetailHeaderProgress.animate()
|
||||
.alpha(0f)
|
||||
.withEndAction(anim::stop)
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -328,9 +328,6 @@ public class WifiTile extends QSTileImpl<SignalState> {
|
||||
filterUnreachableAPs();
|
||||
|
||||
updateItems();
|
||||
if (accessPoints != null && accessPoints.size() > 0) {
|
||||
fireScanStateChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
/** Filter unreachable APs from mAccessPoints */
|
||||
@@ -378,6 +375,12 @@ public class WifiTile extends QSTileImpl<SignalState> {
|
||||
|
||||
private void updateItems() {
|
||||
if (mItems == null) return;
|
||||
if ((mAccessPoints != null && mAccessPoints.length > 0)
|
||||
|| !mSignalCallback.mInfo.enabled) {
|
||||
fireScanStateChanged(false);
|
||||
} else {
|
||||
fireScanStateChanged(true);
|
||||
}
|
||||
|
||||
// Wi-Fi is off
|
||||
if (!mSignalCallback.mInfo.enabled) {
|
||||
|
||||
Reference in New Issue
Block a user