Skip to content

Commit de2c319

Browse files
scottamainAndroid Git Automerger
authored andcommitted
am 737a20f: Merge "docs: explain implicit permissions applied by sdk versions bug: 7453055" into jb-mr1-dev
* commit '737a20fda62fe9885f74e208ac21a1574c1593f7': docs: explain implicit permissions applied by sdk versions bug: 7453055
2 parents 025fb93 + 737a20f commit de2c319

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

core/res/AndroidManifest.xml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,33 @@
290290
android:permissionGroup="android.permission-group.PERSONAL_INFO"
291291
android:protectionLevel="signature|system" />
292292

293-
<!-- Allows an application to read the user's call log. -->
293+
<!-- Allows an application to read the user's call log.
294+
<p class="note"><strong>Note:</strong> If your app uses the
295+
{@link #READ_CONTACTS} permission and <em>both</em> your <a
296+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
297+
minSdkVersion}</a> and <a
298+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
299+
targetSdkVersion}</a> values are set to 15 or lower, the system implicitly
300+
grants your app this permission. If you don't need this permission, be sure your <a
301+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
302+
targetSdkVersion}</a> is 16 or higher.</p> -->
294303
<permission android:name="android.permission.READ_CALL_LOG"
295304
android:permissionGroup="android.permission-group.SOCIAL_INFO"
296305
android:protectionLevel="dangerous"
297306
android:label="@string/permlab_readCallLog"
298307
android:description="@string/permdesc_readCallLog" />
299308

300309
<!-- Allows an application to write (but not read) the user's
301-
contacts data. -->
310+
contacts data.
311+
<p class="note"><strong>Note:</strong> If your app uses the
312+
{@link #WRITE_CONTACTS} permission and <em>both</em> your <a
313+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
314+
minSdkVersion}</a> and <a
315+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
316+
targetSdkVersion}</a> values are set to 15 or lower, the system implicitly
317+
grants your app this permission. If you don't need this permission, be sure your <a
318+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
319+
targetSdkVersion}</a> is 16 or higher.</p> -->
302320
<permission android:name="android.permission.WRITE_CALL_LOG"
303321
android:permissionGroup="android.permission-group.SOCIAL_INFO"
304322
android:protectionLevel="dangerous"
@@ -888,7 +906,15 @@
888906
android:label="@string/permlab_modifyPhoneState"
889907
android:description="@string/permdesc_modifyPhoneState" />
890908

891-
<!-- Allows read only access to phone state. -->
909+
<!-- Allows read only access to phone state.
910+
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
911+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
912+
minSdkVersion}</a> and <a
913+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
914+
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
915+
grants your app this permission. If you don't need this permission, be sure your <a
916+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
917+
targetSdkVersion}</a> is 4 or higher. -->
892918
<permission android:name="android.permission.READ_PHONE_STATE"
893919
android:permissionGroup="android.permission-group.PHONE_CALLS"
894920
android:protectionLevel="dangerous"
@@ -931,14 +957,41 @@
931957
android:permissionGroupFlags="personalInfo"
932958
android:priority="240" />
933959

934-
<!-- Allows an application to read from external storage -->
960+
<!-- Allows an application to read from external storage.
961+
<p>Any app that declares the {@link #WRITE_EXTERNAL_STORAGE} permission is implicitly
962+
granted this permission.</p>
963+
<p>Currently, this permission is not enforced and all apps still have access to read from
964+
external storage without this permission. That will change in a future release and apps
965+
will require this permission to read from external storage. So if your
966+
app reads from the external storage, you should add this permission to your app now
967+
to ensure that it continues to work on future versions of Android.</p>
968+
<p>You can test your app with the permission enforced by either running your app on the
969+
Android Emulator when running Android 4.1 or higher, or enabling <em>Protect USB
970+
storage</em> under Developer options in the Settings app on a device running Android 4.1 or
971+
higher.</p>
972+
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
973+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
974+
minSdkVersion}</a> and <a
975+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
976+
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
977+
grants your app this permission. If you don't need this permission, be sure your <a
978+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
979+
targetSdkVersion}</a> is 4 or higher.-->
935980
<permission android:name="android.permission.READ_EXTERNAL_STORAGE"
936981
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
937982
android:label="@string/permlab_sdcardRead"
938983
android:description="@string/permdesc_sdcardRead"
939984
android:protectionLevel="normal" />
940985

941-
<!-- Allows an application to write to external storage -->
986+
<!-- Allows an application to write to external storage.
987+
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
988+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
989+
minSdkVersion}</a> and <a
990+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
991+
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
992+
grants your app this permission. If you don't need this permission, be sure your <a
993+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
994+
targetSdkVersion}</a> is 4 or higher. -->
942995
<permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
943996
android:permissionGroup="android.permission-group.STORAGE"
944997
android:label="@string/permlab_sdcardWrite"

0 commit comments

Comments
 (0)