Loading packages/SystemUI/res/drawable/stat_sys_roaming.xml +10 −6 Original line number Diff line number Diff line Loading @@ -14,11 +14,15 @@ Copyright (C) 2014 The Android Open Source Project limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="8.5dp" android:height="17dp" android:viewportWidth="6.0" android:viewportHeight="12.0"> android:width="@dimen/signal_icon_size" android:height="@dimen/signal_icon_size" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FFFFFFFF" android:pathData="M2.800000,7.900000l-1.000000,0.000000L1.800000,11.000000L0.200000,11.000000L0.200000,2.500000l2.700000,0.000000c0.900000,0.000000 1.500000,0.200000 2.000000,0.700000s0.700000,1.100000 0.700000,1.900000c0.000000,0.600000 -0.100000,1.100000 -0.300000,1.500000S4.800000,7.200000 4.400000,7.400000l1.500000,3.500000L5.900000,11.000000L4.100000,11.000000L2.800000,7.900000zM1.800000,6.500000l1.100000,0.000000c0.400000,0.000000 0.600000,-0.100000 0.800000,-0.400000S4.000000,5.600000 4.000000,5.200000c0.000000,-0.400000 -0.100000,-0.800000 -0.300000,-1.000000S3.300000,3.800000 2.900000,3.800000L1.800000,3.800000L1.800000,6.500000z"/> 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" /> <path android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" /> <path android:pathData="M0,0h24v24H0V0z" /> </vector> No newline at end of file packages/SystemUI/res/layout/mobile_signal_group.xml +7 −14 Original line number Diff line number Diff line Loading @@ -51,33 +51,26 @@ android:layout_width="wrap_content" android:layout_gravity="center_vertical" android:visibility="gone" /> <Space android:id="@+id/mobile_roaming_space" android:layout_height="match_parent" android:layout_width="@dimen/roaming_icon_start_padding" android:visibility="gone" /> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical"> <com.android.systemui.statusbar.AnimatedImageView android:theme="@style/DualToneLightTheme" android:id="@+id/mobile_signal" android:layout_height="wrap_content" android:layout_width="wrap_content" systemui:hasOverlappingRendering="false" /> <com.android.systemui.statusbar.AnimatedImageView android:theme="@style/DualToneDarkTheme" android:id="@+id/mobile_signal_dark" android:layout_height="wrap_content" android:layout_width="wrap_content" android:alpha="0.0" systemui:hasOverlappingRendering="false" /> <ImageView android:id="@+id/mobile_roaming" android:layout_width="wrap_content" android:layout_height="17dp" android:paddingStart="22dp" android:paddingTop="1.5dp" android:paddingBottom="3dp" android:scaleType="fitCenter" android:layout_height="wrap_content" android:src="@drawable/stat_sys_roaming" android:contentDescription="@string/data_connection_roaming" android:visibility="gone" /> Loading packages/SystemUI/res/values/dimens.xml +4 −0 Original line number Diff line number Diff line Loading @@ -637,6 +637,10 @@ type icon is wide. --> <dimen name="wide_type_icon_start_padding">2dp</dimen> <!-- Padding between the mobile signal indicator and the start icon when the roaming icon is displayed in the upper left corner. --> <dimen name="roaming_icon_start_padding">2dp</dimen> <!-- Extra padding between multiple phone signal icons. --> <dimen name="secondary_telephony_padding">2dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +8 −14 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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; } Loading @@ -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); Loading @@ -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)); Loading Loading
packages/SystemUI/res/drawable/stat_sys_roaming.xml +10 −6 Original line number Diff line number Diff line Loading @@ -14,11 +14,15 @@ Copyright (C) 2014 The Android Open Source Project limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="8.5dp" android:height="17dp" android:viewportWidth="6.0" android:viewportHeight="12.0"> android:width="@dimen/signal_icon_size" android:height="@dimen/signal_icon_size" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FFFFFFFF" android:pathData="M2.800000,7.900000l-1.000000,0.000000L1.800000,11.000000L0.200000,11.000000L0.200000,2.500000l2.700000,0.000000c0.900000,0.000000 1.500000,0.200000 2.000000,0.700000s0.700000,1.100000 0.700000,1.900000c0.000000,0.600000 -0.100000,1.100000 -0.300000,1.500000S4.800000,7.200000 4.400000,7.400000l1.500000,3.500000L5.900000,11.000000L4.100000,11.000000L2.800000,7.900000zM1.800000,6.500000l1.100000,0.000000c0.400000,0.000000 0.600000,-0.100000 0.800000,-0.400000S4.000000,5.600000 4.000000,5.200000c0.000000,-0.400000 -0.100000,-0.800000 -0.300000,-1.000000S3.300000,3.800000 2.900000,3.800000L1.800000,3.800000L1.800000,6.500000z"/> 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" /> <path android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" /> <path android:pathData="M0,0h24v24H0V0z" /> </vector> No newline at end of file
packages/SystemUI/res/layout/mobile_signal_group.xml +7 −14 Original line number Diff line number Diff line Loading @@ -51,33 +51,26 @@ android:layout_width="wrap_content" android:layout_gravity="center_vertical" android:visibility="gone" /> <Space android:id="@+id/mobile_roaming_space" android:layout_height="match_parent" android:layout_width="@dimen/roaming_icon_start_padding" android:visibility="gone" /> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical"> <com.android.systemui.statusbar.AnimatedImageView android:theme="@style/DualToneLightTheme" android:id="@+id/mobile_signal" android:layout_height="wrap_content" android:layout_width="wrap_content" systemui:hasOverlappingRendering="false" /> <com.android.systemui.statusbar.AnimatedImageView android:theme="@style/DualToneDarkTheme" android:id="@+id/mobile_signal_dark" android:layout_height="wrap_content" android:layout_width="wrap_content" android:alpha="0.0" systemui:hasOverlappingRendering="false" /> <ImageView android:id="@+id/mobile_roaming" android:layout_width="wrap_content" android:layout_height="17dp" android:paddingStart="22dp" android:paddingTop="1.5dp" android:paddingBottom="3dp" android:scaleType="fitCenter" android:layout_height="wrap_content" android:src="@drawable/stat_sys_roaming" android:contentDescription="@string/data_connection_roaming" android:visibility="gone" /> Loading
packages/SystemUI/res/values/dimens.xml +4 −0 Original line number Diff line number Diff line Loading @@ -637,6 +637,10 @@ type icon is wide. --> <dimen name="wide_type_icon_start_padding">2dp</dimen> <!-- Padding between the mobile signal indicator and the start icon when the roaming icon is displayed in the upper left corner. --> <dimen name="roaming_icon_start_padding">2dp</dimen> <!-- Extra padding between multiple phone signal icons. --> <dimen name="secondary_telephony_padding">2dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +8 −14 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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; } Loading @@ -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); Loading @@ -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)); Loading