Skip to content

Commit

Permalink
Analysis: Suppress scoped storage lint warning for main
Browse files Browse the repository at this point in the history
Warning Message: "WRITE_EXTERNAL_STORAGE no longer provides write access
when targeting Android 11+, even when using
'requestLegacyExternalStorage'"

Explanation: "Scoped storage is enforced on Android 10+
(or Android 11+ if using requestLegacyExternalStorage). In particular,
WRITE_EXTERNAL_STORAGE will no longer provide write access to all files;
it will provide the equivalent of READ_EXTERNAL_STORAGE instead."

------------------------------------------------------------------------

This warning is already addressed and will be fixed as part of the
ongoing Android 13 media permissions work (see PR below):

PR: #18183
  • Loading branch information
ParaskP7 committed Apr 7, 2023
1 parent 79ee597 commit b8f5108
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
4 changes: 3 additions & 1 deletion WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<!-- Dangerous permissions, access must be requested at runtime -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<!-- GCM all build types configuration -->
Expand Down
11 changes: 0 additions & 11 deletions config/lint/baseline.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.2.1" type="baseline" client="gradle" dependencies="true" name="AGP (7.2.1)" variant="all" version="7.2.1">

<issue
id="ScopedStorage"
message="WRITE_EXTERNAL_STORAGE no longer provides write access when targeting Android 11+, even when using `requestLegacyExternalStorage`"
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="20"
column="36"/>
</issue>

<issue
id="IntentReset"
message="Calling `setType` after calling `setData` will clear the data: Call `setDataAndType` instead?"
Expand Down

0 comments on commit b8f5108

Please sign in to comment.