Remove LEAVE_SHADE_OPEN_FOR_BUGREPORT flag
Test: atest SystemUITests Fixes: 265829279 Change-Id: I355d0330793e7185a14ac700fd2960c5721aab1d
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user