|
78 | 78 | import java.util.HashSet; |
79 | 79 | import java.util.List; |
80 | 80 | import java.util.Set; |
81 | | -import java.util.concurrent.atomic.AtomicBoolean; |
82 | 81 |
|
83 | 82 | /** |
84 | 83 | * Displays a Flutter UI on an Android device. |
@@ -115,11 +114,6 @@ public class FlutterView extends FrameLayout |
115 | 114 | private static final String TAG = "FlutterView"; |
116 | 115 | private static final String GBOARD_PACKAGE_NAME = "com.google.android.inputmethod.latin"; |
117 | 116 |
|
118 | | - // Boolean that gates if view port metrics should be sent. When the |
119 | | - // engine informs the embedder of a resize, it is not necessary to send |
120 | | - // the viewport metrics back to the engine. |
121 | | - private AtomicBoolean shouldSendViewportMetrics = new AtomicBoolean(true); |
122 | | - |
123 | 117 | // Maximum size allowed for a content sized view. |
124 | 118 | @VisibleForTesting static final int CONTENT_SIZING_MAX = 2 << 12; |
125 | 119 |
|
@@ -210,7 +204,6 @@ public void resizeEngineView(int width, int height) { |
210 | 204 | surfaceParams.width = width; |
211 | 205 | } |
212 | 206 | if (changed) { |
213 | | - shouldSendViewportMetrics.set(false); |
214 | 207 | flutterEngineView.setLayoutParams(surfaceParams); |
215 | 208 | } |
216 | 209 | } else { |
@@ -543,13 +536,7 @@ protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) |
543 | 536 | viewportMetrics.maxWidth = viewportMetrics.width; |
544 | 537 | } |
545 | 538 |
|
546 | | - if (shouldSendViewportMetrics.compareAndSet(false, true)) { |
547 | | - Log.d( |
548 | | - TAG, |
549 | | - "Resize was in response to the engine resizing the view. Not sending viewport metrics."); |
550 | | - } else { |
551 | | - sendViewportMetricsToFlutter(); |
552 | | - } |
| 539 | + sendViewportMetricsToFlutter(); |
553 | 540 | } |
554 | 541 |
|
555 | 542 | @VisibleForTesting() |
|
0 commit comments