diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java index 8558762..61ac45b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java @@ -54,10 +54,12 @@ public class SignalClusterView private int mMobileStrengthId = 0, mMobileActivityId = 0, mMobileTypeId = 0; private boolean mIsAirplaneMode = false; private int mAirplaneIconId = 0; - private String mWifiDescription, mMobileDescription, mMobileTypeDescription; + private boolean mEtherVisible = false; + private int mEtherIconId = 0; + private String mWifiDescription, mMobileDescription, mMobileTypeDescription, mEtherDescription; ViewGroup mWifiGroup, mMobileGroup; - ImageView mWifi, mMobile, mWifiActivity, mMobileActivity, mMobileType, mAirplane; + ImageView mWifi, mMobile, mWifiActivity, mMobileActivity, mMobileType, mAirplane, mEther; View mSpacer; Handler mHandler; @@ -119,6 +121,7 @@ public class SignalClusterView mMobileType = (ImageView) findViewById(R.id.mobile_type); mSpacer = findViewById(R.id.spacer); mAirplane = (ImageView) findViewById(R.id.airplane); + mEther = (ImageView) findViewById(R.id.ethernet); apply(); } @@ -136,6 +139,7 @@ public class SignalClusterView mMobileType = null; mSpacer = null; mAirplane = null; + mEther = null; super.onDetachedFromWindow(); } @@ -173,6 +177,15 @@ public class SignalClusterView } @Override + public void setEtherIndicators(boolean visible, int etherIcon, String contentDescription) { + mEtherVisible = visible; + mEtherIconId = etherIcon; + mEtherDescription = contentDescription; + + apply(); + } + + @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { // Standard group layout onPopulateAccessibilityEvent() implementations // ignore content description, so populate manually @@ -218,6 +231,14 @@ public class SignalClusterView mAirplane.setVisibility(View.GONE); } + if (mEtherVisible) { + mEther.setVisibility(View.VISIBLE); + mEther.setImageResource(mEtherIconId); + mEther.setContentDescription(mEtherDescription); + } else { + mEther.setVisibility(View.GONE); + } + if (mMobileVisible && mWifiVisible && mIsAirplaneMode) { mSpacer.setVisibility(View.INVISIBLE); } else { |