diff options
author | Roman Birg <roman@cyngn.com> | 2016-03-14 09:44:36 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2016-03-16 16:15:56 -0700 |
commit | 7f4697c2889bb8fef2c0951513a5952a74329e58 (patch) | |
tree | 94ed2f92588f6bdc18a046c2b8df9dba4bca7a07 /packages/SystemUI | |
parent | 01ba664b696c3f5ad711842a69bf9c8259525c67 (diff) | |
download | frameworks_base-7f4697c2889bb8fef2c0951513a5952a74329e58.zip frameworks_base-7f4697c2889bb8fef2c0951513a5952a74329e58.tar.gz frameworks_base-7f4697c2889bb8fef2c0951513a5952a74329e58.tar.bz2 |
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: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java index f83bbf4..cd608d6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java @@ -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; } |