This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 44
55package dev .flutter .scenarios ;
66
7+ import android .os .Bundle ;
8+ import android .view .WindowManager ;
79import androidx .annotation .NonNull ;
10+ import androidx .annotation .Nullable ;
811import io .flutter .embedding .android .FlutterActivity ;
912import io .flutter .embedding .engine .FlutterEngine ;
1013import java .util .concurrent .atomic .AtomicBoolean ;
@@ -22,6 +25,20 @@ public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
2225 .setMessageHandler ("take_screenshot" , (byteBuffer , binaryReply ) -> notifyFlutterRendered ());
2326 }
2427
28+ @ Override
29+ protected void onCreate (@ Nullable Bundle savedInstanceState ) {
30+ super .onCreate (savedInstanceState );
31+
32+ // On newer versions of Android, this is the default. Because these tests are being used to take
33+ // screenshots on Skia Gold, we don't want any of the System UI to show up, even for older API
34+ // versions (i.e. 28).
35+ //
36+ // See also:
37+ // https://github.com/flutter/engine/blob/a9081cce1f0dd730577a36ee1ca6d7af5cdc5a9b/shell/platform/android/io/flutter/embedding/android/FlutterView.java#L696
38+ // https://github.com/flutter/flutter/issues/143471
39+ getWindow ().addFlags (WindowManager .LayoutParams .FLAG_FULLSCREEN );
40+ }
41+
2542 protected void notifyFlutterRendered () {
2643 synchronized (flutterUiRenderedLock ) {
2744 isScenarioReady .set (true );
You can’t perform that action at this time.
0 commit comments