diff --git a/packages/SystemUI/res/layout/center_icon_area.xml b/packages/SystemUI/res/layout/center_icon_area.xml
deleted file mode 100644
index 21279e12fb4a6..0000000000000
--- a/packages/SystemUI/res/layout/center_icon_area.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 8b244c757649c..2c479889c314a 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -103,14 +103,6 @@
android:gravity="center_horizontal|center_vertical"
/>
-
-
mNotificationEntries = List.of();
protected View mNotificationIconArea;
private NotificationIconContainer mNotificationIcons;
private NotificationIconContainer mShelfIcons;
- protected View mCenteredIconArea;
- private NotificationIconContainer mCenteredIcon;
private NotificationIconContainer mAodIcons;
- private StatusBarIconView mCenteredIconView;
private final Rect mTintArea = new Rect();
private Context mContext;
@@ -159,8 +154,6 @@ public class NotificationIconAreaController implements
mNotificationIconArea = inflateIconArea(layoutInflater);
mNotificationIcons = mNotificationIconArea.findViewById(R.id.notificationIcons);
- mCenteredIconArea = layoutInflater.inflate(R.layout.center_icon_area, null);
- mCenteredIcon = mCenteredIconArea.findViewById(R.id.centeredIcon);
}
/**
@@ -208,10 +201,6 @@ public class NotificationIconAreaController implements
View child = mNotificationIcons.getChildAt(i);
child.setLayoutParams(params);
}
- for (int i = 0; i < mCenteredIcon.getChildCount(); i++) {
- View child = mCenteredIcon.getChildAt(i);
- child.setLayoutParams(params);
- }
if (mShelfIcons != null) {
for (int i = 0; i < mShelfIcons.getChildCount(); i++) {
View child = mShelfIcons.getChildAt(i);
@@ -247,13 +236,6 @@ public class NotificationIconAreaController implements
return mNotificationIconArea;
}
- /**
- * Returns the view that represents the centered notification area.
- */
- public View getCenteredNotificationAreaView() {
- return mCenteredIconArea;
- }
-
/**
* See {@link com.android.systemui.statusbar.policy.DarkIconDispatcher#setIconsDarkArea}.
* Sets the color that should be used to tint any icons in the notification area.
@@ -272,27 +254,12 @@ public class NotificationIconAreaController implements
mIconTint = iconTint;
}
- if (DarkIconDispatcher.isInArea(tintArea, mCenteredIconArea)) {
- mCenteredIconTint = iconTint;
- }
-
applyNotificationIconsTint();
}
protected boolean shouldShowNotificationIcon(NotificationEntry entry,
boolean showAmbient, boolean showLowPriority, boolean hideDismissed,
- boolean hideRepliedMessages, boolean hideCurrentMedia, boolean hideCenteredIcon,
- boolean hidePulsing, boolean onlyShowCenteredIcon) {
-
- final boolean isCenteredNotificationIcon = mCenteredIconView != null
- && entry.getIcons().getCenteredIcon() != null
- && Objects.equals(entry.getIcons().getCenteredIcon(), mCenteredIconView);
- if (onlyShowCenteredIcon) {
- return isCenteredNotificationIcon;
- }
- if (hideCenteredIcon && isCenteredNotificationIcon && !entry.isRowHeadsUp()) {
- return false;
- }
+ boolean hideRepliedMessages, boolean hideCurrentMedia, boolean hidePulsing) {
if (entry.getRanking().isAmbient() && !showAmbient) {
return false;
}
@@ -341,7 +308,6 @@ public class NotificationIconAreaController implements
Trace.beginSection("NotificationIconAreaController.updateNotificationIcons");
updateStatusBarIcons();
updateShelfIcons();
- updateCenterIcon();
updateAodNotificationIcons();
applyNotificationIconsTint();
@@ -358,9 +324,7 @@ public class NotificationIconAreaController implements
false /* hideDismissed */,
false /* hideRepliedMessages */,
false /* hideCurrentMedia */,
- false /* hide centered icon */,
- false /* hidePulsing */,
- false /* onlyShowCenteredIcon */);
+ false /* hidePulsing */);
}
public void updateStatusBarIcons() {
@@ -370,21 +334,7 @@ public class NotificationIconAreaController implements
true /* hideDismissed */,
true /* hideRepliedMessages */,
false /* hideCurrentMedia */,
- true /* hide centered icon */,
- false /* hidePulsing */,
- false /* onlyShowCenteredIcon */);
- }
-
- private void updateCenterIcon() {
- updateIconsForLayout(entry -> entry.getIcons().getCenteredIcon(), mCenteredIcon,
- false /* showAmbient */,
- true /* showLowPriority */,
- false /* hideDismissed */,
- false /* hideRepliedMessages */,
- false /* hideCurrentMedia */,
- false /* hide centered icon */,
- false /* hidePulsing */,
- true/* onlyShowCenteredIcon */);
+ false /* hidePulsing */);
}
public void updateAodNotificationIcons() {
@@ -397,9 +347,7 @@ public class NotificationIconAreaController implements
true /* hideDismissed */,
true /* hideRepliedMessages */,
true /* hideCurrentMedia */,
- true /* hide centered icon */,
- mBypassController.getBypassEnabled() /* hidePulsing */,
- false /* onlyShowCenteredIcon */);
+ mBypassController.getBypassEnabled() /* hidePulsing */);
}
@VisibleForTesting
@@ -421,15 +369,14 @@ public class NotificationIconAreaController implements
private void updateIconsForLayout(Function function,
NotificationIconContainer hostLayout, boolean showAmbient, boolean showLowPriority,
boolean hideDismissed, boolean hideRepliedMessages, boolean hideCurrentMedia,
- boolean hideCenteredIcon, boolean hidePulsing, boolean onlyShowCenteredIcon) {
+ boolean hidePulsing) {
ArrayList toShow = new ArrayList<>(mNotificationEntries.size());
// Filter out ambient notifications and notification children.
for (int i = 0; i < mNotificationEntries.size(); i++) {
NotificationEntry entry = mNotificationEntries.get(i).getRepresentativeEntry();
if (entry != null && entry.getRow() != null) {
if (shouldShowNotificationIcon(entry, showAmbient, showLowPriority, hideDismissed,
- hideRepliedMessages, hideCurrentMedia, hideCenteredIcon, hidePulsing,
- onlyShowCenteredIcon)) {
+ hideRepliedMessages, hideCurrentMedia, hidePulsing)) {
StatusBarIconView iconView = function.apply(entry);
if (iconView != null) {
toShow.add(iconView);
@@ -523,7 +470,6 @@ public class NotificationIconAreaController implements
/**
* Applies {@link #mIconTint} to the notification icons.
- * Applies {@link #mCenteredIconTint} to the center notification icon.
*/
private void applyNotificationIconsTint() {
for (int i = 0; i < mNotificationIcons.getChildCount(); i++) {
@@ -535,15 +481,6 @@ public class NotificationIconAreaController implements
}
}
- for (int i = 0; i < mCenteredIcon.getChildCount(); i++) {
- final StatusBarIconView iv = (StatusBarIconView) mCenteredIcon.getChildAt(i);
- if (iv.getWidth() != 0) {
- updateTintForIcon(iv, mCenteredIconTint);
- } else {
- iv.executeOnLayout(() -> updateTintForIcon(iv, mCenteredIconTint));
- }
- }
-
updateAodIconColors();
}
@@ -558,17 +495,6 @@ public class NotificationIconAreaController implements
v.setDecorColor(tint);
}
- /**
- * Shows the icon view given in the center.
- */
- public void showIconCentered(NotificationEntry entry) {
- StatusBarIconView icon = entry == null ? null : entry.getIcons().getCenteredIcon();
- if (!Objects.equals(mCenteredIconView, icon)) {
- mCenteredIconView = icon;
- updateNotificationIcons();
- }
- }
-
public void showIconIsolated(StatusBarIconView icon, boolean animated) {
mNotificationIcons.showIconIsolated(icon, animated);
}
@@ -603,7 +529,6 @@ public class NotificationIconAreaController implements
if (mAodIcons != null) {
mAodIcons.setAnimationsEnabled(mAnimationsEnabled && !inShade);
}
- mCenteredIcon.setAnimationsEnabled(mAnimationsEnabled && inShade);
mNotificationIcons.setAnimationsEnabled(mAnimationsEnabled && inShade);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index 1e71ceb8cae84..fb8397ba8f4fa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -50,8 +50,6 @@ public class PhoneStatusBarView extends FrameLayout {
private DarkReceiver mClock;
private int mRotationOrientation = -1;
@Nullable
- private View mCenterIconSpace;
- @Nullable
private View mCutoutSpace;
@Nullable
private DisplayCutout mDisplayCutout;
@@ -79,7 +77,6 @@ public class PhoneStatusBarView extends FrameLayout {
mBattery = findViewById(R.id.battery);
mClock = findViewById(R.id.clock);
mCutoutSpace = findViewById(R.id.cutout_space_view);
- mCenterIconSpace = findViewById(R.id.centered_icon_area);
updateResources();
}
@@ -228,12 +225,10 @@ public class PhoneStatusBarView extends FrameLayout {
boolean hasCornerCutout = mContentInsetsProvider.currentRotationHasCornerCutout();
if (mDisplayCutout == null || mDisplayCutout.isEmpty() || hasCornerCutout) {
- mCenterIconSpace.setVisibility(View.VISIBLE);
mCutoutSpace.setVisibility(View.GONE);
return;
}
- mCenterIconSpace.setVisibility(View.GONE);
mCutoutSpace.setVisibility(View.VISIBLE);
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mCutoutSpace.getLayoutParams();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
index 051fbaf62219e..2af0772558690 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
@@ -95,7 +95,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
private View mClockView;
private View mOngoingCallChip;
private View mNotificationIconAreaInner;
- private View mCenteredIconArea;
private int mDisabled1;
private int mDisabled2;
private DarkIconManager mDarkIconManager;
@@ -249,14 +248,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
}
notificationIconArea.addView(mNotificationIconAreaInner);
- ViewGroup statusBarCenteredIconArea = mStatusBar.findViewById(R.id.centered_icon_area);
- mCenteredIconArea = mNotificationIconAreaController.getCenteredNotificationAreaView();
- if (mCenteredIconArea.getParent() != null) {
- ((ViewGroup) mCenteredIconArea.getParent())
- .removeView(mCenteredIconArea);
- }
- statusBarCenteredIconArea.addView(mCenteredIconArea);
-
// #disable should have already been called, so use the disable values to set visibility.
updateNotificationIconAreaAndCallChip(mDisabled1, false);
}
@@ -441,12 +432,10 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
public void hideNotificationIconArea(boolean animate) {
animateHide(mNotificationIconAreaInner, animate);
- animateHide(mCenteredIconArea, animate);
}
public void showNotificationIconArea(boolean animate) {
animateShow(mNotificationIconAreaInner, animate);
- animateShow(mCenteredIconArea, animate);
}
public void hideOperatorName(boolean animate) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java
index db5fd262a1d1c..e9590b06c2c82 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java
@@ -98,8 +98,7 @@ public class HeadsUpAppearanceControllerTest extends SysuiTestCase {
mPanelView,
mHeadsUpStatusBarView,
new View(mContext),
- mOperatorNameView,
- new View(mContext));
+ mOperatorNameView);
mHeadsUpAppearanceController.setAppearFraction(0.0f, 0.0f);
}
@@ -180,7 +179,6 @@ public class HeadsUpAppearanceControllerTest extends SysuiTestCase {
mPanelView,
mHeadsUpStatusBarView,
new View(mContext),
- new View(mContext),
new View(mContext));
Assert.assertEquals(expandedHeight, newController.mExpandedHeight, 0.0f);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
index a630840fab0ea..5861617168299 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
@@ -348,17 +348,11 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
mMockNotificationAreaController = mock(NotificationIconAreaController.class);
mNotificationAreaInner = mock(View.class);
- View centeredNotificationAreaView = mock(View.class);
when(mNotificationAreaInner.getLayoutParams()).thenReturn(
new FrameLayout.LayoutParams(100, 100));
- when(centeredNotificationAreaView.getLayoutParams()).thenReturn(
- new FrameLayout.LayoutParams(100, 100));
when(mNotificationAreaInner.animate()).thenReturn(mock(ViewPropertyAnimator.class));
- when(centeredNotificationAreaView.animate()).thenReturn(mock(ViewPropertyAnimator.class));
- when(mMockNotificationAreaController.getCenteredNotificationAreaView()).thenReturn(
- centeredNotificationAreaView);
when(mMockNotificationAreaController.getNotificationInnerAreaView()).thenReturn(
mNotificationAreaInner);
}