Clean up launched bug fix flag "truncated_status_bar_icons_fix"
Flag: EXEMPT removing com.android.systemui.truncated_status_bar_icons_fix
Test: N/A
Bug: 323299264
Change-Id: I221313ed902d31d4992e06da71cde474798a54e3
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index eb9d0ab..f88db99 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -363,17 +363,6 @@
}
flag {
- name: "truncated_status_bar_icons_fix"
- namespace: "systemui"
- description: "Fixes the status bar icons being trunacted due to the status bar window height "
- "not being updated after certain rotations"
- bug: "323299264"
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
-
-flag {
name: "status_bar_monochrome_icons_fix"
namespace: "systemui"
description: "Fixes the status bar icon size when drawing InsetDrawables (ie. monochrome icons)"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 462ae7a..05641c3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -30,7 +30,6 @@
import static com.android.systemui.Flags.keyboardShortcutHelperRewrite;
import static com.android.systemui.Flags.lightRevealMigration;
import static com.android.systemui.Flags.newAodTransition;
-import static com.android.systemui.Flags.truncatedStatusBarIconsFix;
import static com.android.systemui.charging.WirelessChargingAnimation.UNKNOWN_BATTERY_LEVEL;
import static com.android.systemui.flags.Flags.SHORTCUT_LIST_SEARCH_LAYOUT;
import static com.android.systemui.statusbar.NotificationLockscreenUserManager.PERMISSION_SELF;
@@ -1936,11 +1935,6 @@
mQSPanelController.updateResources();
}
- if (!truncatedStatusBarIconsFix()) {
- if (mStatusBarWindowController != null) {
- mStatusBarWindowController.refreshStatusBarHeight();
- }
- }
if (mShadeSurface != null) {
mShadeSurface.updateResources();
}
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 6b47ac1..8115c36 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.phone;
-import static com.android.systemui.Flags.truncatedStatusBarIconsFix;
import android.annotation.Nullable;
import android.content.Context;
@@ -108,9 +107,7 @@
Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mClock);
if (updateDisplayParameters()) {
updateLayoutForCutout();
- if (truncatedStatusBarIconsFix()) {
- updateWindowHeight();
- }
+ updateWindowHeight();
}
}
@@ -135,9 +132,7 @@
updateLayoutForCutout();
requestLayout();
}
- if (truncatedStatusBarIconsFix()) {
- updateWindowHeight();
- }
+ updateWindowHeight();
}
void onDensityOrFontScaleChanged() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
index d2540a6..7cd446d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
@@ -1155,22 +1155,13 @@
}
@Test
- @EnableFlags(com.android.systemui.Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
- public void updateResources_flagEnabled_doesNotUpdateStatusBarWindowHeight() {
+ public void updateResources_doesNotUpdateStatusBarWindowHeight() {
mCentralSurfaces.updateResources();
verify(mStatusBarWindowController, never()).refreshStatusBarHeight();
}
@Test
- @DisableFlags(com.android.systemui.Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
- public void updateResources_flagDisabled_updatesStatusBarWindowHeight() {
- mCentralSurfaces.updateResources();
-
- verify(mStatusBarWindowController).refreshStatusBarHeight();
- }
-
- @Test
@EnableSceneContainer
public void brightnesShowingChanged_flagEnabled_ScrimControllerNotified() {
mCentralSurfaces.registerCallbacks();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewTest.kt
index fd2dead..ab81598 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewTest.kt
@@ -30,7 +30,6 @@
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.test.filters.SmallTest
-import com.android.systemui.Flags
import com.android.systemui.Gefingerpoken
import com.android.systemui.SysuiTestCase
import com.android.systemui.plugins.DarkIconDispatcher
@@ -41,7 +40,6 @@
import com.google.common.truth.Truth.assertThat
import org.junit.Before
import org.junit.Test
-import org.mockito.Mockito.never
import org.mockito.Mockito.spy
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
@@ -123,36 +121,21 @@
}
@Test
- fun onAttachedToWindow_flagEnabled_updatesWindowHeight() {
- mSetFlagsRule.enableFlags(Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
-
+ fun onAttachedToWindow_updatesWindowHeight() {
view.onAttachedToWindow()
verify(windowController).refreshStatusBarHeight()
}
@Test
- fun onAttachedToWindow_flagDisabled_doesNotUpdateWindowHeight() {
- mSetFlagsRule.disableFlags(Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
-
- view.onAttachedToWindow()
-
- verify(windowController, never()).refreshStatusBarHeight()
- }
-
- @Test
- fun onConfigurationChanged_flagEnabled_updatesWindowHeight() {
- mSetFlagsRule.enableFlags(Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
-
+ fun onConfigurationChanged_updatesWindowHeight() {
view.onConfigurationChanged(Configuration())
verify(windowController).refreshStatusBarHeight()
}
@Test
- fun onConfigurationChanged_multipleCalls_flagEnabled_updatesWindowHeightMultipleTimes() {
- mSetFlagsRule.enableFlags(Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
-
+ fun onConfigurationChanged_multipleCalls_updatesWindowHeightMultipleTimes() {
view.onConfigurationChanged(Configuration())
view.onConfigurationChanged(Configuration())
view.onConfigurationChanged(Configuration())
@@ -162,29 +145,8 @@
}
@Test
- fun onConfigurationChanged_flagDisabled_doesNotUpdateWindowHeight() {
- mSetFlagsRule.disableFlags(Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
-
- view.onConfigurationChanged(Configuration())
-
- verify(windowController, never()).refreshStatusBarHeight()
- }
-
- @Test
- fun onConfigurationChanged_multipleCalls_flagDisabled_doesNotUpdateWindowHeight() {
- mSetFlagsRule.disableFlags(Flags.FLAG_TRUNCATED_STATUS_BAR_ICONS_FIX)
-
- view.onConfigurationChanged(Configuration())
- view.onConfigurationChanged(Configuration())
- view.onConfigurationChanged(Configuration())
- view.onConfigurationChanged(Configuration())
-
- verify(windowController, never()).refreshStatusBarHeight()
- }
-
- @Test
fun onAttachedToWindow_updatesLeftTopRightPaddingsBasedOnInsets() {
- val insets = Insets.of(/* left = */ 10, /* top = */ 20, /* right = */ 30, /* bottom = */ 40)
+ val insets = Insets.of(/* left= */ 10, /* top= */ 20, /* right= */ 30, /* bottom= */ 40)
whenever(contentInsetsProvider.getStatusBarContentInsetsForCurrentRotation())
.thenReturn(insets)
@@ -198,7 +160,7 @@
@Test
fun onConfigurationChanged_updatesLeftTopRightPaddingsBasedOnInsets() {
- val insets = Insets.of(/* left = */ 40, /* top = */ 30, /* right = */ 20, /* bottom = */ 10)
+ val insets = Insets.of(/* left= */ 40, /* top= */ 30, /* right= */ 20, /* bottom= */ 10)
whenever(contentInsetsProvider.getStatusBarContentInsetsForCurrentRotation())
.thenReturn(insets)
@@ -213,7 +175,7 @@
@Test
fun onConfigurationChanged_noRelevantChange_doesNotUpdateInsets() {
val previousInsets =
- Insets.of(/* left = */ 40, /* top = */ 30, /* right = */ 20, /* bottom = */ 10)
+ Insets.of(/* left= */ 40, /* top= */ 30, /* right= */ 20, /* bottom= */ 10)
whenever(contentInsetsProvider.getStatusBarContentInsetsForCurrentRotation())
.thenReturn(previousInsets)
context.orCreateTestableResources.overrideConfiguration(Configuration())
@@ -233,7 +195,7 @@
@Test
fun onConfigurationChanged_densityChanged_updatesInsets() {
val previousInsets =
- Insets.of(/* left = */ 40, /* top = */ 30, /* right = */ 20, /* bottom = */ 10)
+ Insets.of(/* left= */ 40, /* top= */ 30, /* right= */ 20, /* bottom= */ 10)
whenever(contentInsetsProvider.getStatusBarContentInsetsForCurrentRotation())
.thenReturn(previousInsets)
val configuration = Configuration()
@@ -256,7 +218,7 @@
@Test
fun onConfigurationChanged_fontScaleChanged_updatesInsets() {
val previousInsets =
- Insets.of(/* left = */ 40, /* top = */ 30, /* right = */ 20, /* bottom = */ 10)
+ Insets.of(/* left= */ 40, /* top= */ 30, /* right= */ 20, /* bottom= */ 10)
whenever(contentInsetsProvider.getStatusBarContentInsetsForCurrentRotation())
.thenReturn(previousInsets)
val configuration = Configuration()
@@ -291,7 +253,7 @@
@Test
fun onApplyWindowInsets_updatesLeftTopRightPaddingsBasedOnInsets() {
- val insets = Insets.of(/* left = */ 90, /* top = */ 10, /* right = */ 45, /* bottom = */ 50)
+ val insets = Insets.of(/* left= */ 90, /* top= */ 10, /* right= */ 45, /* bottom= */ 50)
whenever(contentInsetsProvider.getStatusBarContentInsetsForCurrentRotation())
.thenReturn(insets)