diff --git a/packages/SystemUI/res/drawable/stat_sys_roaming.xml b/packages/SystemUI/res/drawable/stat_sys_roaming.xml index 4baa472acb88d..bd2edf39d9291 100644 --- a/packages/SystemUI/res/drawable/stat_sys_roaming.xml +++ b/packages/SystemUI/res/drawable/stat_sys_roaming.xml @@ -14,11 +14,15 @@ Copyright (C) 2014 The Android Open Source Project limitations under the License. --> + android:width="@dimen/signal_icon_size" + android:height="@dimen/signal_icon_size" + android:viewportWidth="24" + android:viewportHeight="24"> - + android:pathData="M7.8,7.2L9,10H7L5.87,7.33H4V10H2V2h5c1.13,0,2,0.87,2,2v1.33C9,6.13,8.47,6.87,7.8,7.2z M7,4H4v1.33h3V4z" /> + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/mobile_signal_group.xml b/packages/SystemUI/res/layout/mobile_signal_group.xml index 2e92042cc1c26..2da03d2590e74 100644 --- a/packages/SystemUI/res/layout/mobile_signal_group.xml +++ b/packages/SystemUI/res/layout/mobile_signal_group.xml @@ -51,33 +51,26 @@ android:layout_width="wrap_content" android:layout_gravity="center_vertical" android:visibility="gone" /> + - diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index e30b86a6c4efe..cb3c282f703ba 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -637,6 +637,10 @@ type icon is wide. --> 2dp + + 2dp + 2dp diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java index 0f5e71e5235ac..55a23e3dc0ea7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java @@ -611,12 +611,14 @@ public class SignalClusterView extends LinearLayout implements NetworkController private String mMobileDescription, mMobileTypeDescription; private ViewGroup mMobileGroup; - private ImageView mMobile, mMobileDark, mMobileType, mMobileRoaming; + private ImageView mMobile, mMobileType, mMobileRoaming; + private View mMobileRoamingSpace; public boolean mRoaming; private ImageView mMobileActivityIn; private ImageView mMobileActivityOut; public boolean mActivityIn; public boolean mActivityOut; + private SignalDrawable mMobileSignalDrawable; public PhoneState(int subId, Context context) { ViewGroup root = (ViewGroup) LayoutInflater.from(context) @@ -628,23 +630,19 @@ public class SignalClusterView extends LinearLayout implements NetworkController public void setViews(ViewGroup root) { mMobileGroup = root; mMobile = root.findViewById(R.id.mobile_signal); - mMobileDark = root.findViewById(R.id.mobile_signal_dark); mMobileType = root.findViewById(R.id.mobile_type); mMobileRoaming = root.findViewById(R.id.mobile_roaming); + mMobileRoamingSpace = root.findViewById(R.id.mobile_roaming_space); mMobileActivityIn = root.findViewById(R.id.mobile_in); mMobileActivityOut = root.findViewById(R.id.mobile_out); - // TODO: Remove the 2 instances because now the drawable can handle darkness. - mMobile.setImageDrawable(new SignalDrawable(mMobile.getContext())); - SignalDrawable drawable = new SignalDrawable(mMobileDark.getContext()); - drawable.setDarkIntensity(1); - mMobileDark.setImageDrawable(drawable); + mMobileSignalDrawable = new SignalDrawable(mMobile.getContext()); + mMobile.setImageDrawable(mMobileSignalDrawable); } public boolean apply(boolean isSecondaryIcon) { if (mMobileVisible && !mIsAirplaneMode) { if (mLastMobileStrengthId != mMobileStrengthId) { mMobile.getDrawable().setLevel(mMobileStrengthId); - mMobileDark.getDrawable().setLevel(mMobileStrengthId); mLastMobileStrengthId = mMobileStrengthId; } @@ -666,15 +664,13 @@ public class SignalClusterView extends LinearLayout implements NetworkController mMobile.setPaddingRelative( mIsMobileTypeIconWide ? mWideTypeIconStartPadding : mMobileDataIconStartPadding, 0, 0, 0); - mMobileDark.setPaddingRelative( - mIsMobileTypeIconWide ? mWideTypeIconStartPadding : mMobileDataIconStartPadding, - 0, 0, 0); if (DEBUG) Log.d(TAG, String.format("mobile: %s sig=%d typ=%d", (mMobileVisible ? "VISIBLE" : "GONE"), mMobileStrengthId, mMobileTypeId)); mMobileType.setVisibility(mMobileTypeId != 0 ? View.VISIBLE : View.GONE); mMobileRoaming.setVisibility(mRoaming ? View.VISIBLE : View.GONE); + mMobileRoamingSpace.setVisibility(mRoaming ? View.VISIBLE : View.GONE); mMobileActivityIn.setVisibility(mActivityIn ? View.VISIBLE : View.GONE); mMobileActivityOut.setVisibility(mActivityOut ? View.VISIBLE : View.GONE); @@ -689,9 +685,7 @@ public class SignalClusterView extends LinearLayout implements NetworkController } public void setIconTint(int tint, float darkIntensity, Rect tintArea) { - applyDarkIntensity( - DarkIconDispatcher.getDarkIntensity(tintArea, mMobile, darkIntensity), - mMobile, mMobileDark); + mMobileSignalDrawable.setDarkIntensity(darkIntensity); setTint(mMobileType, DarkIconDispatcher.getTint(tintArea, mMobileType, tint)); setTint(mMobileRoaming, DarkIconDispatcher.getTint(tintArea, mMobileRoaming, tint));