[flutter] remove elevation checker (#86837)
This commit is contained in:
@@ -167,12 +167,6 @@ class CommandHelp {
|
||||
'debugDumpApp',
|
||||
);
|
||||
|
||||
late final CommandHelpOption z = _makeOption(
|
||||
'z',
|
||||
'Toggle elevation checker.',
|
||||
'debugCheckElevationsEnabled',
|
||||
);
|
||||
|
||||
// When updating the list above, see the notes above the list regarding order
|
||||
// and tests.
|
||||
|
||||
|
||||
@@ -738,22 +738,6 @@ abstract class ResidentHandlers {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Toggle the "elevation check" debugging feature.
|
||||
Future<bool> debugToggleDebugCheckElevationsEnabled() async {
|
||||
if (!supportsServiceProtocol) {
|
||||
return false;
|
||||
}
|
||||
for (final FlutterDevice device in flutterDevices) {
|
||||
final List<FlutterView> views = await device.vmService.getFlutterViews();
|
||||
for (final FlutterView view in views) {
|
||||
await device.vmService.flutterToggleDebugCheckElevationsEnabled(
|
||||
isolateId: view.uiIsolate.id,
|
||||
);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Toggle the performance overlay.
|
||||
///
|
||||
/// This is not supported in web mode.
|
||||
@@ -1426,7 +1410,6 @@ abstract class ResidentRunner extends ResidentHandlers {
|
||||
commandHelp.I.print();
|
||||
commandHelp.o.print();
|
||||
commandHelp.b.print();
|
||||
commandHelp.z.print();
|
||||
} else {
|
||||
commandHelp.S.print();
|
||||
commandHelp.U.print();
|
||||
@@ -1659,9 +1642,6 @@ class TerminalHandler {
|
||||
case 'w':
|
||||
case 'W':
|
||||
return residentRunner.debugDumpApp();
|
||||
case 'z':
|
||||
case 'Z':
|
||||
return residentRunner.debugToggleDebugCheckElevationsEnabled();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -613,10 +613,6 @@ class FlutterVmService {
|
||||
@required String isolateId,
|
||||
}) => _flutterToggle('debugPaint', isolateId: isolateId);
|
||||
|
||||
Future<Map<String, dynamic>> flutterToggleDebugCheckElevationsEnabled({
|
||||
@required String isolateId,
|
||||
}) => _flutterToggle('debugCheckElevationsEnabled', isolateId: isolateId);
|
||||
|
||||
Future<Map<String, dynamic>> flutterTogglePerformanceOverlayOverride({
|
||||
@required String isolateId,
|
||||
}) => _flutterToggle('showPerformanceOverlay', isolateId: isolateId);
|
||||
|
||||
@@ -72,7 +72,6 @@ void _testMessageLength({
|
||||
expect(commandHelp.s.toString().length, lessThanOrEqualTo(expectedWidth));
|
||||
expect(commandHelp.t.toString().length, lessThanOrEqualTo(expectedWidth));
|
||||
expect(commandHelp.w.toString().length, lessThanOrEqualTo(expectedWidth));
|
||||
expect(commandHelp.z.toString().length, lessThanOrEqualTo(expectedWidth));
|
||||
}
|
||||
|
||||
void main() {
|
||||
@@ -123,7 +122,6 @@ void main() {
|
||||
expect(commandHelp.s.toString(), startsWith('\x1B[1ms\x1B[22m'));
|
||||
expect(commandHelp.t.toString(), startsWith('\x1B[1mt\x1B[22m'));
|
||||
expect(commandHelp.w.toString(), startsWith('\x1B[1mw\x1B[22m'));
|
||||
expect(commandHelp.z.toString(), startsWith('\x1B[1mz\x1B[22m'));
|
||||
});
|
||||
|
||||
testWithoutContext('commands that should have a grey bolden parenthetical text', () {
|
||||
@@ -144,7 +142,6 @@ void main() {
|
||||
expect(commandHelp.p.toString(), endsWith('\x1B[90m(debugPaintSizeEnabled)\x1B[39m\x1B[22m'));
|
||||
expect(commandHelp.t.toString(), endsWith('\x1B[90m(debugDumpRenderTree)\x1B[39m\x1B[22m'));
|
||||
expect(commandHelp.w.toString(), endsWith('\x1B[90m(debugDumpApp)\x1B[39m\x1B[22m'));
|
||||
expect(commandHelp.z.toString(), endsWith('\x1B[90m(debugCheckElevationsEnabled)\x1B[39m\x1B[22m'));
|
||||
});
|
||||
|
||||
testWithoutContext('should not create a help text longer than maxLineWidth without ansi support', () {
|
||||
@@ -208,7 +205,6 @@ void main() {
|
||||
expect(commandHelp.t.toString(), equals('\x1B[1mt\x1B[22m Dump rendering tree to the console. \x1B[90m(debugDumpRenderTree)\x1B[39m\x1B[22m'));
|
||||
expect(commandHelp.v.toString(), equals('\x1B[1mv\x1B[22m Open Flutter DevTools.'));
|
||||
expect(commandHelp.w.toString(), equals('\x1B[1mw\x1B[22m Dump widget hierarchy to the console. \x1B[90m(debugDumpApp)\x1B[39m\x1B[22m'));
|
||||
expect(commandHelp.z.toString(), equals('\x1B[1mz\x1B[22m Toggle elevation checker. \x1B[90m(debugCheckElevationsEnabled)\x1B[39m\x1B[22m'));
|
||||
});
|
||||
|
||||
testWithoutContext('should create the correct help text without ansi support', () {
|
||||
@@ -240,7 +236,6 @@ void main() {
|
||||
expect(commandHelp.t.toString(), equals('t Dump rendering tree to the console. (debugDumpRenderTree)'));
|
||||
expect(commandHelp.v.toString(), equals('v Open Flutter DevTools.'));
|
||||
expect(commandHelp.w.toString(), equals('w Dump widget hierarchy to the console. (debugDumpApp)'));
|
||||
expect(commandHelp.z.toString(), equals('z Toggle elevation checker. (debugCheckElevationsEnabled)'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1239,7 +1239,6 @@ void main() {
|
||||
commandHelp.I,
|
||||
commandHelp.o,
|
||||
commandHelp.b,
|
||||
commandHelp.z,
|
||||
commandHelp.P,
|
||||
commandHelp.a,
|
||||
commandHelp.M,
|
||||
|
||||
@@ -600,7 +600,6 @@ void main() {
|
||||
'I Toggle oversized image inversion. (debugInvertOversizedImages)',
|
||||
'o Simulate different operating systems. (defaultTargetPlatform)',
|
||||
'b Toggle platform brightness (dark and light mode). (debugBrightnessOverride)',
|
||||
'z Toggle elevation checker. (debugCheckElevationsEnabled)',
|
||||
'P Toggle performance overlay. (WidgetsApp.showPerformanceOverlay)',
|
||||
'a Toggle timeline events for all widget build methods. (debugProfileWidgetBuilds)',
|
||||
'M Write SkSL shaders to a unique file in the project directory.',
|
||||
|
||||
Reference in New Issue
Block a user