diff options
author | Jason Monk <jmonk@google.com> | 2014-12-01 17:50:16 -0500 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2014-12-08 09:31:00 -0500 |
commit | b27ec6d37d277fe54cb8b85590758a7ad1767ff0 (patch) | |
tree | 653161bcd7e4ae622dd0869fd8f1245b4463bf14 /packages/SystemUI/src/com/android/systemui/qs | |
parent | c5c93edd9354e956d9b0a4d85fc8372907e2b011 (diff) | |
download | frameworks_base-b27ec6d37d277fe54cb8b85590758a7ad1767ff0.zip frameworks_base-b27ec6d37d277fe54cb8b85590758a7ad1767ff0.tar.gz frameworks_base-b27ec6d37d277fe54cb8b85590758a7ad1767ff0.tar.bz2 |
QS Wifi panel show icon on secure networks
Bug: 18365695
Change-Id: Ib63822643a5b033d8b73591e9b379b3539b8865e
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java | 9 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java index ce0d5f4..a311d6e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java @@ -18,13 +18,13 @@ package com.android.systemui.qs; import android.content.Context; import android.content.res.Configuration; +import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -162,6 +162,12 @@ public class QSDetailItems extends FrameLayout { view.setVisibility(mItemsVisible ? VISIBLE : INVISIBLE); final ImageView iv = (ImageView) view.findViewById(android.R.id.icon); iv.setImageResource(item.icon); + iv.getOverlay().clear(); + if (item.overlay != null) { + item.overlay.setBounds(0, 0, item.overlay.getIntrinsicWidth(), + item.overlay.getIntrinsicHeight()); + iv.getOverlay().add(item.overlay); + } final TextView title = (TextView) view.findViewById(android.R.id.title); title.setText(item.line1); final TextView summary = (TextView) view.findViewById(android.R.id.summary); @@ -213,6 +219,7 @@ public class QSDetailItems extends FrameLayout { public static class Item { public int icon; + public Drawable overlay; public String line1; public String line2; public Object tag; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java index 699240c..a920624 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -326,7 +326,12 @@ public class WifiTile extends QSTile<QSTile.SignalState> { item.line2 = mContext.getString(ap.isConfigured ? R.string.quick_settings_connected : R.string.quick_settings_connected_via_wfa); + } else if (ap.networkId >= 0) { + // TODO: Set line 2 to wifi saved string here. } + item.overlay = ap.hasSecurity + ? mContext.getDrawable(R.drawable.qs_ic_wifi_lock) + : null; items[i] = item; } } |