diff options
| author | 2024-08-05 08:59:43 +0000 | |
|---|---|---|
| committer | 2024-08-05 08:59:43 +0000 | |
| commit | f3c2f400383daca0abebeffcc7a6bc429d0e6750 (patch) | |
| tree | a954c569dbae668121bdc7e3366db08ad7120899 | |
| parent | 583a109a46a39a553553f5471d5b436d53bb98e1 (diff) | |
| parent | 5a1bf547615a68070c34543882693bd6af9804af (diff) | |
Merge "Clean up launched bug fix flag "truncated_status_bar_icons_fix"" into main
5 files changed, 12 insertions, 81 deletions
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig index 1435172c9a9f..197dc6a67249 100644 --- a/packages/SystemUI/aconfig/systemui.aconfig +++ b/packages/SystemUI/aconfig/systemui.aconfig @@ -352,17 +352,6 @@ flag { } 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 6d3cad5aadf8..3a3b05bdd71d 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.Dependency.TIME_TICK_HANDLER_NAME; 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; @@ -1933,11 +1932,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { 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 6b47ac113928..8115c36c31e2 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 @@ public class PhoneStatusBarView extends FrameLayout { Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mClock); if (updateDisplayParameters()) { updateLayoutForCutout(); - if (truncatedStatusBarIconsFix()) { - updateWindowHeight(); - } + updateWindowHeight(); } } @@ -135,9 +132,7 @@ public class PhoneStatusBarView extends FrameLayout { 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 bd9cccd3458a..a6b27294546c 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 @@ -1157,22 +1157,13 @@ public class CentralSurfacesImplTest extends SysuiTestCase { } @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 e670884eff17..eae4f23c59d6 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.View 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.android.systemui.util.mockito.whenever 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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { } @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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { } @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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { @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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { @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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { @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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { @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 @@ class PhoneStatusBarViewTest : SysuiTestCase() { @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) |