summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff DeCew <jeffdq@google.com> 2023-04-05 13:40:02 -0400
committer Jeff DeCew <jeffdq@google.com> 2023-04-13 15:51:34 -0400
commitd9296629f0ef2f5449cc885c21c95c6d999f09b6 (patch)
treeb767685e1b9200fda284a5af6b46635e942036c7
parent502350b9f644c4c40f3bf6e1ec15113ae6edbe3c (diff)
Remove LEAVE_SHADE_OPEN_FOR_BUGREPORT flag
Test: atest SystemUITests Fixes: 265829279 Change-Id: I355d0330793e7185a14ac700fd2960c5721aab1d
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java28
5 files changed, 0 insertions, 50 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index d143c1660658..c995c47a358a 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 4be47ecb42d9..d3b6fc237084 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 0195d4532ae0..1e5e14071650 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 0ec20ca9a7e9..32c8c4dfa94b 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 48710a42f616..8ef5ca81354e 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
@@ -1206,34 +1206,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
}
@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);
setGoToSleepStates(FOLD_STATE_FOLDED);