diff --git a/engine/src/flutter/ci/bin/format.dart b/engine/src/flutter/ci/bin/format.dart index 8b317acad2..eea6031745 100644 --- a/engine/src/flutter/ci/bin/format.dart +++ b/engine/src/flutter/ci/bin/format.dart @@ -475,6 +475,7 @@ class JavaFormatChecker extends FormatChecker { path.absolute( path.join( srcDir.absolute.path, + 'flutter', 'third_party', 'android_tools', 'google-java-format', diff --git a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java index 595a8e490f..c576eacda8 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java @@ -646,12 +646,12 @@ import java.util.List; // See https://github.com/flutter/flutter/issues/93276 previousVisibility = flutterView.getVisibility(); flutterView.setVisibility(View.GONE); - if (flutterEngine != null) { - // When an Activity is stopped it won't have its onTrimMemory callback invoked. Normally, - // this isn't a problem but because of a bug in some builds of Android 14 we must act as - // if the onTrimMemory callback has been called. - flutterEngine.getRenderer().onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_BACKGROUND); - } + if (flutterEngine != null) { + // When an Activity is stopped it won't have its onTrimMemory callback invoked. Normally, + // this isn't a problem but because of a bug in some builds of Android 14 we must act as + // if the onTrimMemory callback has been called. + flutterEngine.getRenderer().onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_BACKGROUND); + } } /** diff --git a/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java b/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java index 780ed5261c..109721300c 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java @@ -502,11 +502,11 @@ public class PlatformViewsChannel { /** The number of pointers (e.g, fingers) involved in the touch event. */ public final int pointerCount; /** - * Properties for each pointer, encoded in a raw format. - * Expected to be formatted as a List[List[Integer]], where each inner list has two items: - * - An id, at index 0, corresponding to {@link android.view.MotionEvent.PointerProperties#id} - * - A tool type, at index 1, corresponding to {@link android.view.MotionEvent.PointerProperties#toolType}. - * */ + * Properties for each pointer, encoded in a raw format. Expected to be formatted as a + * List[List[Integer]], where each inner list has two items: - An id, at index 0, corresponding + * to {@link android.view.MotionEvent.PointerProperties#id} - A tool type, at index 1, + * corresponding to {@link android.view.MotionEvent.PointerProperties#toolType}. + */ @NonNull public final Object rawPointerPropertiesList; /** Coordinates for each pointer, encoded in a raw format. */ @NonNull public final Object rawPointerCoords; diff --git a/engine/src/flutter/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java b/engine/src/flutter/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java index 76fdffc8f2..0ecc09838b 100644 --- a/engine/src/flutter/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java +++ b/engine/src/flutter/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java @@ -371,28 +371,21 @@ public class PlatformViewsControllerTest { // Construct a PlatformViewTouch.rawPointerPropertiesList by doing the inverse of // PlatformViewsController.parsePointerPropertiesList. List> pointerProperties = - Arrays.asList( - Arrays.asList( - original.getPointerId(0), - original.getToolType(0) - ) - ); + Arrays.asList(Arrays.asList(original.getPointerId(0), original.getToolType(0))); // Construct a PlatformViewTouch.rawPointerCoords by doing the inverse of // PlatformViewsController.parsePointerCoordsList. List> pointerCoordinates = + Arrays.asList( Arrays.asList( - Arrays.asList( - (double) original.getOrientation(), - (double) original.getPressure(), - (double) original.getSize(), - (double) original.getToolMajor(), - (double) original.getToolMinor(), - (double) original.getTouchMajor(), - (double) original.getTouchMinor(), - (double) original.getX(), - (double) original.getY() - ) - ); + (double) original.getOrientation(), + (double) original.getPressure(), + (double) original.getSize(), + (double) original.getToolMajor(), + (double) original.getToolMinor(), + (double) original.getTouchMajor(), + (double) original.getTouchMinor(), + (double) original.getX(), + (double) original.getY())); // Make a platform view touch from the motion event. PlatformViewTouch frameWorkTouchNonVd = new PlatformViewTouch( diff --git a/engine/src/flutter/tools/engine_tool/lib/src/commands/format_command.dart b/engine/src/flutter/tools/engine_tool/lib/src/commands/format_command.dart index d9cc7f2399..3eac47f95c 100644 --- a/engine/src/flutter/tools/engine_tool/lib/src/commands/format_command.dart +++ b/engine/src/flutter/tools/engine_tool/lib/src/commands/format_command.dart @@ -124,7 +124,7 @@ class _FormatStreamer { return; } final String l = line.trim(); - if (l == 'To fix, run `et format` or:') { + if (l == 'To fix, run `et format --all` or:') { inADiff = true; } if (l.isNotEmpty && (!inADiff || dryRun)) { diff --git a/engine/src/flutter/tools/engine_tool/test/format_command_test.dart b/engine/src/flutter/tools/engine_tool/test/format_command_test.dart index 1b4e7c80e2..3256320f4e 100644 --- a/engine/src/flutter/tools/engine_tool/test/format_command_test.dart +++ b/engine/src/flutter/tools/engine_tool/test/format_command_test.dart @@ -159,7 +159,7 @@ void main() { final FakeProcessManager manager = _formatProcessManager( expectedFlags: ['--fix'], stdout: [ - 'To fix, run `et format` or:', + 'To fix, run `et format --all` or:', 'many', 'lines', 'of', @@ -185,7 +185,7 @@ void main() { final FakeProcessManager manager = _formatProcessManager( expectedFlags: [], stdout: [ - 'To fix, run `et format` or:', + 'To fix, run `et format --all` or:', 'many', 'lines', 'of', @@ -206,7 +206,7 @@ void main() { expect( stringsFromLogs(testLogs), equals([ - 'To fix, run `et format` or:\n', + 'To fix, run `et format --all` or:\n', 'many\n', 'lines\n', 'of\n',