Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f4697c2 authored by Roman Birg's avatar Roman Birg Committed by Steve Kondik
Browse files

Cast Tile: only scan while in detail view



Small optimization, otherwise we'd scan until the user closed the status
bar.

Change-Id: I8d9d933287e0225a8557a7aec06eb60392464fa7
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 01ba664b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -208,12 +208,14 @@ public class CastTile extends QSTile<QSTile.BooleanState> {
                    @Override
                    public void onViewAttachedToWindow(View v) {
                        if (DEBUG) Log.d(TAG, "onViewAttachedToWindow");
                        mController.setDiscovering(true);
                    }

                    @Override
                    public void onViewDetachedFromWindow(View v) {
                        if (DEBUG) Log.d(TAG, "onViewDetachedFromWindow");
                        mVisibleOrder.clear();
                        mController.setDiscovering(false);
                    }
                });
            }
@@ -221,7 +223,6 @@ public class CastTile extends QSTile<QSTile.BooleanState> {
                    R.string.quick_settings_cast_detail_empty_text);
            mItems.setCallback(this);
            updateItems(mController.getCastDevices());
            mController.setDiscovering(true);
            return mItems;
        }