diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt index d143c1660658d..c995c47a358ac 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt @@ -604,8 +604,6 @@ object Flags { @JvmField val CLIPBOARD_REMOTE_BEHAVIOR = releasedFlag(1701, "clipboard_remote_behavior") // 1800 - shade container - @JvmField - val LEAVE_SHADE_OPEN_FOR_BUGREPORT = releasedFlag(1800, "leave_shade_open_for_bugreport") // TODO(b/265944639): Tracking Bug @JvmField val DUAL_SHADE = unreleasedFlag(1801, "dual_shade") diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java index 4be47ecb42d9a..d3b6fc2370845 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java @@ -1043,9 +1043,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene Log.w(TAG, "Bugreport handler could not be launched"); mIActivityManager.requestInteractiveBugReport(); } - // Maybe close shade (depends on a flag) so user sees the activity - mCentralSurfacesOptional.ifPresent( - CentralSurfaces::collapseShadeForBugreport); } catch (RemoteException e) { } } @@ -1064,8 +1061,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mMetricsLogger.action(MetricsEvent.ACTION_BUGREPORT_FROM_POWER_MENU_FULL); mUiEventLogger.log(GlobalActionsEvent.GA_BUGREPORT_LONG_PRESS); mIActivityManager.requestFullBugReport(); - // Maybe close shade (depends on a flag) so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShadeForBugreport); } catch (RemoteException e) { } return false; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index 0195d4532ae0a..1e5e140716505 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -422,9 +422,6 @@ public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwn void collapseShade(); - /** Collapse the shade, but conditional on a flag specific to the trigger of a bugreport. */ - void collapseShadeForBugreport(); - int getWakefulnessState(); boolean isScreenFullyOff(); 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 0ec20ca9a7e9a..32c8c4dfa94bb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -951,11 +951,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mUiModeManager = mContext.getSystemService(UiModeManager.class); mBubblesOptional.ifPresent(this::initBubbles); - // Do not restart System UI when the bugreport flag changes. - mFeatureFlags.addListener(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT, event -> { - event.requestNoRestart(); - }); - mStatusBarSignalPolicy.init(); mKeyguardIndicationController.init(); @@ -3502,13 +3497,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } } - @Override - public void collapseShadeForBugreport() { - if (!mFeatureFlags.isEnabled(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT)) { - collapseShade(); - } - } - @VisibleForTesting final WakefulnessLifecycle.Observer mWakefulnessObserver = new WakefulnessLifecycle.Observer() { @Override 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 48710a42f6160..8ef5ca81354eb 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 @@ -1205,34 +1205,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { verify(mShadeController, never()).animateCollapseShade(); } - @Test - public void collapseShadeForBugReport_callsanimateCollapseShade_whenFlagDisabled() { - // GIVEN the shade is expanded & flag enabled - mCentralSurfaces.onShadeExpansionFullyChanged(true); - mCentralSurfaces.setBarStateForTest(SHADE); - mFeatureFlags.set(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT, false); - - // WHEN collapseShadeForBugreport is called - mCentralSurfaces.collapseShadeForBugreport(); - - // VERIFY that animateCollapseShade is called - verify(mShadeController).animateCollapseShade(); - } - - @Test - public void collapseShadeForBugReport_doesNotCallanimateCollapseShade_whenFlagEnabled() { - // GIVEN the shade is expanded & flag enabled - mCentralSurfaces.onShadeExpansionFullyChanged(true); - mCentralSurfaces.setBarStateForTest(SHADE); - mFeatureFlags.set(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT, true); - - // WHEN collapseShadeForBugreport is called - mCentralSurfaces.collapseShadeForBugreport(); - - // VERIFY that animateCollapseShade is called - verify(mShadeController, never()).animateCollapseShade(); - } - @Test public void deviceStateChange_unfolded_shadeOpen_setsLeaveOpenOnKeyguardHide() { setFoldedStates(FOLD_STATE_FOLDED);