Fix more flashing of Wifi entries on rescans

ag/25238657 resulted in another cause of flashing settings UI, which was masked by b/308486484. This refinement limits removing of preference on refresh to when it was attached to a different parent previously, as a result of wifi fragment being closed and reopened.

BUG=308486484
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:08589f1948157c7e46da00bd0251cb5ea633c8a4)
Merged-In: I727220736831a31530460d5923f954829c3b7c3d
Change-Id: I727220736831a31530460d5923f954829c3b7c3d
1 file changed