Repository: flutter
Issue: [image_picker] Permission error for camera picker on OnePlus 3 with Android 9 (API 28)
Labels: e: device-specific,platform-android,p: image_picker,package,P2,team-android,triaged-android

## Steps to Reproduce

1. use basic example: https://github.com/flutter/plugins/tree/master/packages/image_picker/image_picker/example (image_picker: 0.8.3+1, commit: acc3202466a8b4c0b1bcb91fc1ce520c7b021e44)
2. Run on OnePlus 3 (ONEPLUS A3003), Android 9 (API 28)
3. Try to pick an image with the camera within the app
4. It will open camera to pick the image
5. Take an image
6. Confirm the image
7. _Nothing more happens for the user_ (permission exception is thrown in the logs)  
`java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/file from pid=2662, uid=10227 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()`
8. when using the camera picker again you the following exception is thrown/shown:  
`PlatformException(already_active, Image picker is already active, null, null)`

**Expected results:**

Camera picker works on OnePlus 3 and I can reuse the picker again.

**Actual results:**

Permission error on OnePlus 3 (ONEPLUS A3003) with Android 9 (API 28). The picker can not be used anymore after that, since it states in the logs, that is already in use. The app has to be restarted to use the picker again.

<details>
  <summary>Logs</summary>

```
[   +1 ms] W/Binder  ( 2662): java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/file from pid=2662, uid=10227 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
[   +1 ms] W/Binder  ( 2662):   at android.os.Parcel.createException(Parcel.java:1950)
[        ] W/Binder  ( 2662):   at android.os.Parcel.readException(Parcel.java:1918)
[        ] W/Binder  ( 2662):   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
[        ] W/Binder  ( 2662):   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
[        ] W/Binder  ( 2662):   at android.content.ContentProviderProxy.delete(ContentProviderNative.java:561)
[        ] W/Binder  ( 2662):   at android.content.ContentResolver.delete(ContentResolver.java:1813)
[        ] W/Binder  ( 2662):   at android.media.MediaScannerConnection$1.scanCompleted(MediaScannerConnection.java:83)
[        ] W/Binder  ( 2662):   at android.media.IMediaScannerListener$Stub.onTransact(IMediaScannerListener.java:61)
[        ] W/Binder  ( 2662):   at android.os.Binder.execTransact(Binder.java:752)
```

```
Analyzing example...
No issues found! (ran in 3.2s; 4 public members lack documentation)
```

```
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1110], locale de-AT)
    • Flutter version 2.2.3 at C:\sdk\flutter
    • Framework revision f4abaa0735 (5 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at C:\Users\USER\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.0
    • ANDROID_HOME = C:\Users\USER\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2
    • 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, 64-bit edition (version 1.58.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.24.0

[√] Connected device (3 available)
    • ONEPLUS A3003 (mobile) • 5b6fb83b • android-arm64  • Android 9 (API 28)
    • Chrome (web)           • chrome   • web-javascript • Google Chrome 92.0.4515.131
    • Edge (web)             • edge     • web-javascript • Microsoft Edge 91.0.864.64

• No issues found!
```

</details>