@@ -28,7 +28,7 @@ public class PlatformViewsChannel {
2828 private final MethodChannel channel ;
2929 private PlatformViewsHandler handler ;
3030
31- public void invokeViewFocused (int viewId ) {
31+ public void invokeViewFocused (long viewId ) {
3232 if (channel == null ) {
3333 return ;
3434 }
@@ -93,7 +93,7 @@ private void create(@NonNull MethodCall call, @NonNull MethodChannel.Result resu
9393 if (usesPlatformViewLayer ) {
9494 final PlatformViewCreationRequest request =
9595 new PlatformViewCreationRequest (
96- (int ) createArgs .get ("id" ),
96+ (( Number ) createArgs .get ("id" )). longValue ( ),
9797 (String ) createArgs .get ("viewType" ),
9898 0 ,
9999 0 ,
@@ -116,7 +116,7 @@ private void create(@NonNull MethodCall call, @NonNull MethodChannel.Result resu
116116 .TEXTURE_WITH_VIRTUAL_FALLBACK ;
117117 final PlatformViewCreationRequest request =
118118 new PlatformViewCreationRequest (
119- (int ) createArgs .get ("id" ),
119+ (( Number ) createArgs .get ("id" )). longValue ( ),
120120 (String ) createArgs .get ("viewType" ),
121121 createArgs .containsKey ("top" ) ? (double ) createArgs .get ("top" ) : 0.0 ,
122122 createArgs .containsKey ("left" ) ? (double ) createArgs .get ("left" ) : 0.0 ,
@@ -144,7 +144,7 @@ private void create(@NonNull MethodCall call, @NonNull MethodChannel.Result resu
144144
145145 private void dispose (@ NonNull MethodCall call , @ NonNull MethodChannel .Result result ) {
146146 Map <String , Object > disposeArgs = call .arguments ();
147- int viewId = (int ) disposeArgs .get ("id" );
147+ long viewId = (( Number ) disposeArgs .get ("id" )). longValue ( );
148148
149149 try {
150150 handler .dispose (viewId );
@@ -158,7 +158,7 @@ private void resize(@NonNull MethodCall call, @NonNull MethodChannel.Result resu
158158 Map <String , Object > resizeArgs = call .arguments ();
159159 PlatformViewResizeRequest resizeRequest =
160160 new PlatformViewResizeRequest (
161- (int ) resizeArgs .get ("id" ),
161+ (( Number ) resizeArgs .get ("id" )). longValue ( ),
162162 (double ) resizeArgs .get ("width" ),
163163 (double ) resizeArgs .get ("height" ));
164164 try {
@@ -183,7 +183,7 @@ private void offset(@NonNull MethodCall call, @NonNull MethodChannel.Result resu
183183 Map <String , Object > offsetArgs = call .arguments ();
184184 try {
185185 handler .offset (
186- (int ) offsetArgs .get ("id" ),
186+ (( Number ) offsetArgs .get ("id" )). longValue ( ),
187187 (double ) offsetArgs .get ("top" ),
188188 (double ) offsetArgs .get ("left" ));
189189 result .success (null );
@@ -223,7 +223,7 @@ private void touch(@NonNull MethodCall call, @NonNull MethodChannel.Result resul
223223
224224 private void setDirection (@ NonNull MethodCall call , @ NonNull MethodChannel .Result result ) {
225225 Map <String , Object > setDirectionArgs = call .arguments ();
226- int newDirectionViewId = (int ) setDirectionArgs .get ("id" );
226+ long newDirectionViewId = (( Number ) setDirectionArgs .get ("id" )). longValue ( );
227227 int direction = (int ) setDirectionArgs .get ("direction" );
228228
229229 try {
@@ -235,7 +235,7 @@ private void setDirection(@NonNull MethodCall call, @NonNull MethodChannel.Resul
235235 }
236236
237237 private void clearFocus (@ NonNull MethodCall call , @ NonNull MethodChannel .Result result ) {
238- int viewId = call .arguments ();
238+ long viewId = call .arguments ();
239239 try {
240240 handler .clearFocus (viewId );
241241 result .success (null );
@@ -319,7 +319,7 @@ public interface PlatformViewsHandler {
319319 long createForTextureLayer (@ NonNull PlatformViewCreationRequest request );
320320
321321 /** The Flutter application would like to dispose of an existing Android {@code View}. */
322- void dispose (int viewId );
322+ void dispose (long viewId );
323323
324324 /**
325325 * The Flutter application would like to resize an existing Android {@code View}.
@@ -334,7 +334,7 @@ void resize(
334334 /**
335335 * The Flutter application would like to change the offset of an existing Android {@code View}.
336336 */
337- void offset (int viewId , double top , double left );
337+ void offset (long viewId , double top , double left );
338338
339339 /**
340340 * The user touched a platform view within Flutter.
@@ -348,10 +348,10 @@ void resize(
348348 * {@code View}, i.e., platform view.
349349 */
350350 // TODO(mattcarroll): Introduce an annotation for @TextureId
351- void setDirection (int viewId , int direction );
351+ void setDirection (long viewId , int direction );
352352
353353 /** Clears the focus from the platform view with a give id if it is currently focused. */
354- void clearFocus (int viewId );
354+ void clearFocus (long viewId );
355355
356356 /**
357357 * Whether the render surface of {@code FlutterView} should be converted to a {@code
@@ -376,7 +376,7 @@ public enum RequestedDisplayMode {
376376 }
377377
378378 /** The ID of the platform view as seen by the Flutter side. */
379- public final int viewId ;
379+ public final long viewId ;
380380
381381 /** The type of Android {@code View} to create for this platform view. */
382382 @ NonNull public final String viewType ;
@@ -408,7 +408,7 @@ public enum RequestedDisplayMode {
408408
409409 /** Creates a request to construct a platform view. */
410410 public PlatformViewCreationRequest (
411- int viewId ,
411+ long viewId ,
412412 @ NonNull String viewType ,
413413 double logicalTop ,
414414 double logicalLeft ,
@@ -430,7 +430,7 @@ public PlatformViewCreationRequest(
430430
431431 /** Creates a request to construct a platform view with the given display mode. */
432432 public PlatformViewCreationRequest (
433- int viewId ,
433+ long viewId ,
434434 @ NonNull String viewType ,
435435 double logicalTop ,
436436 double logicalLeft ,
@@ -454,15 +454,15 @@ public PlatformViewCreationRequest(
454454 /** Request sent from Flutter to resize a platform view. */
455455 public static class PlatformViewResizeRequest {
456456 /** The ID of the platform view as seen by the Flutter side. */
457- public final int viewId ;
457+ public final long viewId ;
458458
459459 /** The new density independent width to display the platform view. */
460460 public final double newLogicalWidth ;
461461
462462 /** The new density independent height to display the platform view. */
463463 public final double newLogicalHeight ;
464464
465- public PlatformViewResizeRequest (int viewId , double newLogicalWidth , double newLogicalHeight ) {
465+ public PlatformViewResizeRequest (long viewId , double newLogicalWidth , double newLogicalHeight ) {
466466 this .viewId = viewId ;
467467 this .newLogicalWidth = newLogicalWidth ;
468468 this .newLogicalHeight = newLogicalHeight ;
@@ -491,7 +491,7 @@ public interface PlatformViewBufferResized {
491491 /** The state of a touch event in Flutter within a platform view. */
492492 public static class PlatformViewTouch {
493493 /** The ID of the platform view as seen by the Flutter side. */
494- public final int viewId ;
494+ public final long viewId ;
495495
496496 /** The amount of time that the touch has been pressed. */
497497 @ NonNull public final Number downTime ;
@@ -525,7 +525,7 @@ public static class PlatformViewTouch {
525525 public final long motionEventId ;
526526
527527 public PlatformViewTouch (
528- int viewId ,
528+ long viewId ,
529529 @ NonNull Number downTime ,
530530 @ NonNull Number eventTime ,
531531 int action ,
0 commit comments