Repository: flutter
Issue: [Platform Channels] A Black layer shows when switching a translucent Activity from background to foreground
Labels: platform-android,engine,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-android,triaged-android

## Steps to Reproduce

- start App and press the FloatingActionButton in [Flutter Demo Home Page]    -> App will launch a half translucent Android Activity.
- Get app into background  or  just switch your recent apps. Then switch app to the foreground.

**Expected results:** 

The screen will show the same as before.

**Actual results:** 

The Translucent Android Activity shows correctly , but the Flutter content is covered by a black layer.

BTW, when I press back button, the activity finished and the black layer disappeared either.

**More Info**

The problem happened when I'm using GoogleBilling . This is also a common scene that my application calls GoogleBilling SDK ,and the latter will launch a translucent interface for paying.In this moment ,I turn my app into background and then turn it back (It is nothing to do with the length of time), my flutter page looks like being covered by a black layer.just like this
![](https://s3.bmp.ovh/imgs/2021/09/f7b8378be4e14ee0.png)

To reproduce this bug , all you need to do is just provide the ability to launch **a translucent Native Android Activity**(Not Dialog or Popup) for your flutter application,launch it and switch the app between foreground and background

<details>
  <summary>Logs</summary>

```
flutter analyze
Analyzing bug...                                                        

   info • The declaration '_incrementCounter' isn't referenced • lib/main.dart:52:8 • unused_element

1 issue found. (ran in 1.9s)
```

```
flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-arm, locale zh-Hans-CN)
    • Flutter version 2.2.3 at /Users/zhangduan/Documents/flutter
    • Framework revision f4abaa0735 (2 months ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/zhangduan/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio的副本.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.60.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.26.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159

! Doctor found issues in 2 categories.
```

</details>