Loading packages/SystemUI/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ <!-- Extra padding between the mobile data type icon and the strength indicator when the data type icon is wide for the tile in quick settings. --> <dimen name="wide_type_icon_start_padding_qs">3dp</dimen> <dimen name="wide_type_icon_start_padding_qs">8dp</dimen> <!-- The maximum width of the navigation bar ripples. --> <dimen name="key_button_ripple_max_width">95dp</dimen> Loading packages/SystemUI/src/com/android/systemui/qs/QSIconView.java +11 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ImageView.ScaleType; import com.android.systemui.R; import com.android.systemui.statusbar.policy.MobileSignalController; import java.util.Objects; Loading @@ -35,9 +36,19 @@ public class QSIconView extends ViewGroup { protected final int mTilePaddingBelowIconPx; private boolean mAnimationEnabled = true; private final int STATUS_BAR_STYLE_ANDROID_DEFAULT = 0; protected final int STATUS_BAR_STYLE_EXTENDED = 4; protected int mStyle = STATUS_BAR_STYLE_ANDROID_DEFAULT; public QSIconView(Context context) { super(context); if (MobileSignalController.isCarrierOneSupported()) { mStyle = STATUS_BAR_STYLE_EXTENDED; } else { mStyle = mContext.getResources().getInteger(R.integer.status_bar_style); } final Resources res = context.getResources(); mIconSizePx = res.getDimensionPixelSize(R.dimen.qs_tile_icon_size); mTilePaddingBelowIconPx = res.getDimensionPixelSize(R.dimen.qs_tile_padding_below_icon); Loading packages/SystemUI/src/com/android/systemui/qs/QSTile.java +10 −1 Original line number Diff line number Diff line Loading @@ -653,6 +653,8 @@ public abstract class QSTile<TState extends State> { public int overlayIconId; public boolean filter; public boolean isOverlayIconWide; public boolean isShowRoaming; public int subId; @Override public boolean copyTo(State other) { Loading @@ -660,13 +662,18 @@ public abstract class QSTile<TState extends State> { final boolean changed = o.connected != connected || o.activityIn != activityIn || o.activityOut != activityOut || o.overlayIconId != overlayIconId || o.isOverlayIconWide != isOverlayIconWide; || o.isOverlayIconWide != isOverlayIconWide || o.isShowRoaming != isShowRoaming || o.subId != subId; o.connected = connected; o.activityIn = activityIn; o.activityOut = activityOut; o.overlayIconId = overlayIconId; o.filter = filter; o.isOverlayIconWide = isOverlayIconWide; o.isShowRoaming = isShowRoaming; o.subId = subId; return super.copyTo(other) || changed; } Loading @@ -679,6 +686,8 @@ public abstract class QSTile<TState extends State> { rt.insert(rt.length() - 1, ",overlayIconId=" + overlayIconId); rt.insert(rt.length() - 1, ",filter=" + filter); rt.insert(rt.length() - 1, ",wideOverlayIcon=" + isOverlayIconWide); rt.insert(rt.length() - 1, ",isShowRoaming=" + isShowRoaming); rt.insert(rt.length() - 1, ",subId=" + subId); return rt; } } Loading packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java +14 −5 Original line number Diff line number Diff line Loading @@ -66,13 +66,19 @@ public final class SignalTileView extends QSIconView { mSignal = new ImageView(mContext); mIconFrame.addView(mSignal); mOverlay = new ImageView(mContext); if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons)) { if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons) || mStyle == STATUS_BAR_STYLE_EXTENDED) { mRoaming = new ImageView(mContext); mRoaming.setImageResource(R.drawable.ic_qs_signal_r); mRoaming.setVisibility(View.GONE); LinearLayout iconLayout = new LinearLayout(mContext); if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons)) { iconLayout.addView(mRoaming, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); iconLayout.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } else { iconLayout.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); iconLayout.addView(mRoaming, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } mIconFrame.addView(iconLayout, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } else { mIconFrame.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); Loading Loading @@ -140,10 +146,13 @@ public final class SignalTileView extends QSIconView { final boolean shown = isShown(); setVisibility(mIn, shown, s.activityIn); setVisibility(mOut, shown, s.activityOut); if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons)) { if ((mRoaming != null) && getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons) || mStyle == STATUS_BAR_STYLE_EXTENDED) { TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); mRoaming.setVisibility(tm.isNetworkRoaming()? View.VISIBLE : View.GONE); mRoaming.setVisibility( tm.isNetworkRoaming(s.subId) && s.isShowRoaming ? View.VISIBLE : View.GONE); } } Loading packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +5 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,9 @@ public class CellularTile extends QSTile<QSTile.SignalState> { : R.drawable.ic_qs_signal_no_signal; state.icon = ResourceIcon.get(iconId); state.isOverlayIconWide = cb.isDataTypeIconWide; state.isShowRoaming = (!(cb.noSim || !cb.enabled || cb.airplaneModeEnabled) && cb.mobileSignalIconId > 0); state.subId = cb.subId; state.autoMirrorDrawable = !cb.noSim; state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) ? cb.dataTypeIconId : 0; state.filter = iconId != R.drawable.ic_qs_no_sim; Loading Loading @@ -183,6 +186,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> { String enabledDesc; boolean noSim; boolean isDataTypeIconWide; int subId; } private final class CellSignalCallback extends SignalCallbackAdapter { Loading Loading @@ -212,6 +216,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> { mInfo.activityOut = activityOut; mInfo.enabledDesc = description; mInfo.isDataTypeIconWide = qsType != 0 && isWide; mInfo.subId = subId; refreshState(mInfo); } Loading Loading
packages/SystemUI/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ <!-- Extra padding between the mobile data type icon and the strength indicator when the data type icon is wide for the tile in quick settings. --> <dimen name="wide_type_icon_start_padding_qs">3dp</dimen> <dimen name="wide_type_icon_start_padding_qs">8dp</dimen> <!-- The maximum width of the navigation bar ripples. --> <dimen name="key_button_ripple_max_width">95dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/qs/QSIconView.java +11 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ImageView.ScaleType; import com.android.systemui.R; import com.android.systemui.statusbar.policy.MobileSignalController; import java.util.Objects; Loading @@ -35,9 +36,19 @@ public class QSIconView extends ViewGroup { protected final int mTilePaddingBelowIconPx; private boolean mAnimationEnabled = true; private final int STATUS_BAR_STYLE_ANDROID_DEFAULT = 0; protected final int STATUS_BAR_STYLE_EXTENDED = 4; protected int mStyle = STATUS_BAR_STYLE_ANDROID_DEFAULT; public QSIconView(Context context) { super(context); if (MobileSignalController.isCarrierOneSupported()) { mStyle = STATUS_BAR_STYLE_EXTENDED; } else { mStyle = mContext.getResources().getInteger(R.integer.status_bar_style); } final Resources res = context.getResources(); mIconSizePx = res.getDimensionPixelSize(R.dimen.qs_tile_icon_size); mTilePaddingBelowIconPx = res.getDimensionPixelSize(R.dimen.qs_tile_padding_below_icon); Loading
packages/SystemUI/src/com/android/systemui/qs/QSTile.java +10 −1 Original line number Diff line number Diff line Loading @@ -653,6 +653,8 @@ public abstract class QSTile<TState extends State> { public int overlayIconId; public boolean filter; public boolean isOverlayIconWide; public boolean isShowRoaming; public int subId; @Override public boolean copyTo(State other) { Loading @@ -660,13 +662,18 @@ public abstract class QSTile<TState extends State> { final boolean changed = o.connected != connected || o.activityIn != activityIn || o.activityOut != activityOut || o.overlayIconId != overlayIconId || o.isOverlayIconWide != isOverlayIconWide; || o.isOverlayIconWide != isOverlayIconWide || o.isShowRoaming != isShowRoaming || o.subId != subId; o.connected = connected; o.activityIn = activityIn; o.activityOut = activityOut; o.overlayIconId = overlayIconId; o.filter = filter; o.isOverlayIconWide = isOverlayIconWide; o.isShowRoaming = isShowRoaming; o.subId = subId; return super.copyTo(other) || changed; } Loading @@ -679,6 +686,8 @@ public abstract class QSTile<TState extends State> { rt.insert(rt.length() - 1, ",overlayIconId=" + overlayIconId); rt.insert(rt.length() - 1, ",filter=" + filter); rt.insert(rt.length() - 1, ",wideOverlayIcon=" + isOverlayIconWide); rt.insert(rt.length() - 1, ",isShowRoaming=" + isShowRoaming); rt.insert(rt.length() - 1, ",subId=" + subId); return rt; } } Loading
packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java +14 −5 Original line number Diff line number Diff line Loading @@ -66,13 +66,19 @@ public final class SignalTileView extends QSIconView { mSignal = new ImageView(mContext); mIconFrame.addView(mSignal); mOverlay = new ImageView(mContext); if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons)) { if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons) || mStyle == STATUS_BAR_STYLE_EXTENDED) { mRoaming = new ImageView(mContext); mRoaming.setImageResource(R.drawable.ic_qs_signal_r); mRoaming.setVisibility(View.GONE); LinearLayout iconLayout = new LinearLayout(mContext); if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons)) { iconLayout.addView(mRoaming, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); iconLayout.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } else { iconLayout.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); iconLayout.addView(mRoaming, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } mIconFrame.addView(iconLayout, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } else { mIconFrame.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); Loading Loading @@ -140,10 +146,13 @@ public final class SignalTileView extends QSIconView { final boolean shown = isShown(); setVisibility(mIn, shown, s.activityIn); setVisibility(mOut, shown, s.activityOut); if (getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons)) { if ((mRoaming != null) && getContext().getResources().getBoolean(R.bool.show_roaming_and_network_icons) || mStyle == STATUS_BAR_STYLE_EXTENDED) { TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); mRoaming.setVisibility(tm.isNetworkRoaming()? View.VISIBLE : View.GONE); mRoaming.setVisibility( tm.isNetworkRoaming(s.subId) && s.isShowRoaming ? View.VISIBLE : View.GONE); } } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +5 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,9 @@ public class CellularTile extends QSTile<QSTile.SignalState> { : R.drawable.ic_qs_signal_no_signal; state.icon = ResourceIcon.get(iconId); state.isOverlayIconWide = cb.isDataTypeIconWide; state.isShowRoaming = (!(cb.noSim || !cb.enabled || cb.airplaneModeEnabled) && cb.mobileSignalIconId > 0); state.subId = cb.subId; state.autoMirrorDrawable = !cb.noSim; state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) ? cb.dataTypeIconId : 0; state.filter = iconId != R.drawable.ic_qs_no_sim; Loading Loading @@ -183,6 +186,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> { String enabledDesc; boolean noSim; boolean isDataTypeIconWide; int subId; } private final class CellSignalCallback extends SignalCallbackAdapter { Loading Loading @@ -212,6 +216,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> { mInfo.activityOut = activityOut; mInfo.enabledDesc = description; mInfo.isDataTypeIconWide = qsType != 0 && isWide; mInfo.subId = subId; refreshState(mInfo); } Loading