Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4ee22ed2
Unverified
Commit
4ee22ed2
authored
Feb 15, 2022
by
Emmanuel Garcia
Committed by
GitHub
Feb 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Roll Engine from 4463cf40fed9 to 5f0271a38988 + Fix test (#98479)
parent
a1a305c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
22 deletions
+9
-22
engine.version
bin/internal/engine.version
+1
-1
MainActivity.java
...ava/io/flutter/integration/androidviews/MainActivity.java
+2
-9
SimplePlatformView.java
.../flutter/integration/androidviews/SimplePlatformView.java
+5
-6
MainActivity.java
...ava/io/flutter/integration/androidviews/MainActivity.java
+1
-6
No files found.
bin/internal/engine.version
View file @
4ee22ed2
4463cf40fed98686c1b0020d537f4b80b25b4281
5f0271a38988732c48f55c1244717430816391d3
dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java
View file @
4ee22ed2
...
@@ -24,7 +24,6 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
...
@@ -24,7 +24,6 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
final
static
int
STORAGE_PERMISSION_CODE
=
1
;
final
static
int
STORAGE_PERMISSION_CODE
=
1
;
MethodChannel
mMethodChannel
;
MethodChannel
mMethodChannel
;
TouchPipe
mFlutterViewTouchPipe
;
// The method result to complete with the Android permission request result.
// The method result to complete with the Android permission request result.
// This is null when not waiting for the Android permission request;
// This is null when not waiting for the Android permission request;
...
@@ -34,12 +33,6 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
...
@@ -34,12 +33,6 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
return
findViewById
(
FLUTTER_VIEW_ID
);
return
findViewById
(
FLUTTER_VIEW_ID
);
}
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
mFlutterViewTouchPipe
=
new
TouchPipe
(
mMethodChannel
,
getFlutterView
());
}
@Override
@Override
public
void
configureFlutterEngine
(
FlutterEngine
flutterEngine
)
{
public
void
configureFlutterEngine
(
FlutterEngine
flutterEngine
)
{
DartExecutor
executor
=
flutterEngine
.
getDartExecutor
();
DartExecutor
executor
=
flutterEngine
.
getDartExecutor
();
...
@@ -56,11 +49,9 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
...
@@ -56,11 +49,9 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
public
void
onMethodCall
(
MethodCall
methodCall
,
MethodChannel
.
Result
result
)
{
public
void
onMethodCall
(
MethodCall
methodCall
,
MethodChannel
.
Result
result
)
{
switch
(
methodCall
.
method
)
{
switch
(
methodCall
.
method
)
{
case
"pipeFlutterViewEvents"
:
case
"pipeFlutterViewEvents"
:
mFlutterViewTouchPipe
.
enable
();
result
.
success
(
null
);
result
.
success
(
null
);
return
;
return
;
case
"stopFlutterViewEvents"
:
case
"stopFlutterViewEvents"
:
mFlutterViewTouchPipe
.
disable
();
result
.
success
(
null
);
result
.
success
(
null
);
return
;
return
;
case
"getStoragePermission"
:
case
"getStoragePermission"
:
...
@@ -82,6 +73,8 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
...
@@ -82,6 +73,8 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
public
void
synthesizeEvent
(
MethodCall
methodCall
,
MethodChannel
.
Result
result
)
{
public
void
synthesizeEvent
(
MethodCall
methodCall
,
MethodChannel
.
Result
result
)
{
MotionEvent
event
=
MotionEventCodec
.
decode
((
HashMap
<
String
,
Object
>)
methodCall
.
arguments
());
MotionEvent
event
=
MotionEventCodec
.
decode
((
HashMap
<
String
,
Object
>)
methodCall
.
arguments
());
getFlutterView
().
dispatchTouchEvent
(
event
);
getFlutterView
().
dispatchTouchEvent
(
event
);
// TODO(egarciad): Remove invokeMethod since it is not necessary.
mMethodChannel
.
invokeMethod
(
"onTouch"
,
MotionEventCodec
.
encode
(
event
));
result
.
success
(
null
);
result
.
success
(
null
);
}
}
...
...
dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/SimplePlatformView.java
View file @
4ee22ed2
...
@@ -13,6 +13,7 @@ import android.view.MotionEvent;
...
@@ -13,6 +13,7 @@ import android.view.MotionEvent;
import
android.view.View
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.FrameLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
io.flutter.plugin.common.MethodCall
;
import
io.flutter.plugin.common.MethodCall
;
...
@@ -20,23 +21,21 @@ import io.flutter.plugin.common.MethodChannel;
...
@@ -20,23 +21,21 @@ import io.flutter.plugin.common.MethodChannel;
import
io.flutter.plugin.platform.PlatformView
;
import
io.flutter.plugin.platform.PlatformView
;
public
class
SimplePlatformView
implements
PlatformView
,
MethodChannel
.
MethodCallHandler
{
public
class
SimplePlatformView
implements
PlatformView
,
MethodChannel
.
MethodCallHandler
{
private
final
TextView
view
;
private
final
FrameLayout
view
;
private
final
MethodChannel
methodChannel
;
private
final
MethodChannel
methodChannel
;
private
final
io
.
flutter
.
integration
.
platformviews
.
TouchPipe
touchPipe
;
private
final
TouchPipe
touchPipe
;
SimplePlatformView
(
Context
context
,
MethodChannel
methodChannel
)
{
SimplePlatformView
(
Context
context
,
MethodChannel
methodChannel
)
{
this
.
methodChannel
=
methodChannel
;
this
.
methodChannel
=
methodChannel
;
view
=
new
TextView
(
context
)
{
view
=
new
FrameLayout
(
context
)
{
@Override
@Override
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
return
true
;
return
true
;
}
}
};
};
view
.
setTextSize
(
72
);
view
.
setBackgroundColor
(
0xff0000ff
);
view
.
setBackgroundColor
(
0xff0000ff
);
view
.
setText
(
"Hello from Android view"
);
this
.
methodChannel
.
setMethodCallHandler
(
this
);
this
.
methodChannel
.
setMethodCallHandler
(
this
);
touchPipe
=
new
io
.
flutter
.
integration
.
platformviews
.
TouchPipe
(
this
.
methodChannel
,
view
);
touchPipe
=
new
TouchPipe
(
this
.
methodChannel
,
view
);
}
}
@Override
@Override
...
...
dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java
View file @
4ee22ed2
...
@@ -96,11 +96,6 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
...
@@ -96,11 +96,6 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
return
builder
.
toString
();
return
builder
.
toString
();
}
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
}
@Override
@Override
public
void
configureFlutterEngine
(
FlutterEngine
flutterEngine
)
{
public
void
configureFlutterEngine
(
FlutterEngine
flutterEngine
)
{
DartExecutor
executor
=
flutterEngine
.
getDartExecutor
();
DartExecutor
executor
=
flutterEngine
.
getDartExecutor
();
...
@@ -140,7 +135,7 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
...
@@ -140,7 +135,7 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
public
void
synthesizeEvent
(
MethodCall
methodCall
)
{
public
void
synthesizeEvent
(
MethodCall
methodCall
)
{
MotionEvent
event
=
MotionEventCodec
.
decode
((
HashMap
<
String
,
Object
>)
methodCall
.
arguments
());
MotionEvent
event
=
MotionEventCodec
.
decode
((
HashMap
<
String
,
Object
>)
methodCall
.
arguments
());
getFlutterView
().
dispatchTouchEvent
(
event
);
getFlutterView
().
dispatchTouchEvent
(
event
);
// TODO(egarciad):
This can be cleaned up
.
// TODO(egarciad):
Remove invokeMethod since it is not necessary
.
mMethodChannel
.
invokeMethod
(
"onTouch"
,
MotionEventCodec
.
encode
(
event
));
mMethodChannel
.
invokeMethod
(
"onTouch"
,
MotionEventCodec
.
encode
(
event
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment