diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 842f12d1cbaad..f84c5e8cc8d16 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -59,7 +59,6 @@ @string/status_bar_mobile @string/status_bar_airplane @string/status_bar_no_calling - @string/status_bar_call_strength @string/status_bar_battery @string/status_bar_sensors_off @@ -97,7 +96,6 @@ camera airplane no_calling - call_strength sensors_off screen_record diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index beed9a3fe1c5f..2f2bb4363e592 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2973,7 +2973,6 @@ - diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java index 562d0ec06a633..268f3484354a6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java @@ -110,7 +110,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue mDarkIconManager.setShouldLog(true); mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_volume)); mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_alarm_clock)); - mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_call_strength)); mDarkIconManager.setBlockList(mBlockedIcons); Dependency.get(StatusBarIconController.class).addIconGroup(mDarkIconManager); mSystemIconArea = mStatusBar.findViewById(R.id.system_icon_area); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java index 2d760e6fc1769..3f8e9d372d829 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java @@ -189,7 +189,6 @@ public class KeyguardStatusBarView extends RelativeLayout Resources r = getResources(); mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_volume)); mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_alarm_clock)); - mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_call_strength)); } private void updateVisibilities() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java index 93b83d3cbcbd6..89e701606c1ae 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java @@ -71,10 +71,6 @@ public interface StatusBarIconController { void setSignalIcon(String slot, WifiIconState state); /** */ void setMobileIcons(String slot, List states); - /** - * Display the no calling & SMS icons. - */ - void setCallStrengthIcons(String slot, List states); /** * Display the no calling & SMS icons. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java index 75900a2bffa12..068ded32bbdb4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java @@ -223,33 +223,6 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu } } - /** - * Accept a list of CallIndicatorIconStates, and show the call strength icons. - * @param slot StatusBar slot for the call strength icons - * @param states All of the no Calling & SMS icon states - */ - @Override - public void setCallStrengthIcons(String slot, List states) { - Slot callStrengthSlot = getSlot(slot); - int callStrengthSlotIndex = getSlotIndex(slot); - Collections.reverse(states); - for (CallIndicatorIconState state : states) { - if (!state.isNoCalling) { - StatusBarIconHolder holder = callStrengthSlot.getHolderForTag(state.subId); - if (holder == null) { - holder = StatusBarIconHolder.fromCallIndicatorState(mContext, state); - setIcon(callStrengthSlotIndex, holder); - } else { - holder.setIcon(new StatusBarIcon(UserHandle.SYSTEM, mContext.getPackageName(), - Icon.createWithResource(mContext, state.callStrengthResId), 0, 0, - state.callStrengthDescription)); - setIcon(callStrengthSlotIndex, holder); - } - } - setIconVisibility(slot, !state.isNoCalling, state.subId); - } - } - /** * Accept a list of CallIndicatorIconStates, and show the no calling icons. * @param slot StatusBar slot for the no calling icons diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java index af342dd31a764..4ca71f081c0e8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java @@ -86,11 +86,9 @@ public class StatusBarIconHolder { Context context, CallIndicatorIconState state) { StatusBarIconHolder holder = new StatusBarIconHolder(); - int resId = state.isNoCalling ? state.noCallingResId : state.callStrengthResId; - String contentDescription = state.isNoCalling - ? state.noCallingDescription : state.callStrengthDescription; holder.mIcon = new StatusBarIcon(UserHandle.SYSTEM, context.getPackageName(), - Icon.createWithResource(context, resId), 0, 0, contentDescription); + Icon.createWithResource(context, state.noCallingResId), + 0, 0, state.noCallingDescription); holder.mTag = state.subId; return holder; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java index 3445826eefbe8..b57d8766854ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java @@ -22,7 +22,6 @@ import android.telephony.SubscriptionInfo; import android.util.ArraySet; import android.util.Log; -import com.android.settingslib.mobile.TelephonyIcons; import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.statusbar.policy.NetworkController; @@ -50,7 +49,6 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba private final String mSlotEthernet; private final String mSlotVpn; private final String mSlotNoCalling; - private final String mSlotCallStrength; private final Context mContext; private final StatusBarIconController mIconController; @@ -84,8 +82,6 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba mSlotEthernet = mContext.getString(com.android.internal.R.string.status_bar_ethernet); mSlotVpn = mContext.getString(com.android.internal.R.string.status_bar_vpn); mSlotNoCalling = mContext.getString(com.android.internal.R.string.status_bar_no_calling); - mSlotCallStrength = - mContext.getString(com.android.internal.R.string.status_bar_call_strength); mActivityEnabled = mContext.getResources().getBoolean(R.bool.config_showActivity); mIconController = iconController; @@ -211,14 +207,9 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba if (statusIcon.icon == R.drawable.ic_qs_no_calling_sms) { state.isNoCalling = statusIcon.visible; state.noCallingDescription = statusIcon.contentDescription; - } else { - state.callStrengthResId = statusIcon.icon; - state.callStrengthDescription = statusIcon.contentDescription; + mIconController.setNoCallingIcons(mSlotNoCalling, + CallIndicatorIconState.copyStates(mCallIndicatorStates)); } - mIconController.setCallStrengthIcons(mSlotCallStrength, - CallIndicatorIconState.copyStates(mCallIndicatorStates)); - mIconController.setNoCallingIcons(mSlotNoCalling, - CallIndicatorIconState.copyStates(mCallIndicatorStates)); } @Override @@ -305,7 +296,6 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba mIconController.removeAllIconsForSlot(mSlotMobile); mIconController.removeAllIconsForSlot(mSlotNoCalling); - mIconController.removeAllIconsForSlot(mSlotCallStrength); mMobileStates.clear(); List noCallingStates = new ArrayList(); noCallingStates.addAll(mCallIndicatorStates); @@ -420,15 +410,12 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba public static class CallIndicatorIconState { public boolean isNoCalling; public int noCallingResId; - public int callStrengthResId; public int subId; public String noCallingDescription; - public String callStrengthDescription; private CallIndicatorIconState(int subId) { this.subId = subId; this.noCallingResId = R.drawable.ic_qs_no_calling_sms; - this.callStrengthResId = TelephonyIcons.MOBILE_CALL_STRENGTH_ICONS[0]; } @Override @@ -440,26 +427,21 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba CallIndicatorIconState that = (CallIndicatorIconState) o; return isNoCalling == that.isNoCalling && noCallingResId == that.noCallingResId - && callStrengthResId == that.callStrengthResId && subId == that.subId - && noCallingDescription == that.noCallingDescription - && callStrengthDescription == that.callStrengthDescription; + && noCallingDescription == that.noCallingDescription; } @Override public int hashCode() { - return Objects.hash(isNoCalling, noCallingResId, - callStrengthResId, subId, noCallingDescription, callStrengthDescription); + return Objects.hash(isNoCalling, noCallingResId, subId, noCallingDescription); } private void copyTo(CallIndicatorIconState other) { other.isNoCalling = isNoCalling; other.noCallingResId = noCallingResId; - other.callStrengthResId = callStrengthResId; other.subId = subId; other.noCallingDescription = noCallingDescription; - other.callStrengthDescription = callStrengthDescription; } private static List copyStates( diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java index 8ad6271bfc7e8..64127b9d1e6e1 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java +++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java @@ -65,10 +65,6 @@ public class FakeStatusBarIconController extends BaseLeakChecker public void setMobileIcons(String slot, List states) { } - @Override - public void setCallStrengthIcons(String slot, List states) { - } - @Override public void setNoCallingIcons(String slot, List states) { }