Search Issue Tracker

By Design

Votes

1

Found in

5.5.4p1

Issue ID

924794

Regression

No

[Android] READ_PHONE_STATE permission is added in the AndroidManifest.xml file using latest (26.0.2) SDK

Mobile

-

Steps to reproduce:

1) Update SDK to the latest version (26.0.2)
2) Download attached project 'Repo.zip' and open in Unity
3) Build .apk file
4) Open 'AndroidManifest.xml' file (Temp/StagingArea/AndroidManifest.xml)

Expected result:READ_PHONE_STATE permission should not be added in the AndroidManifest.xml (check attachment 'AndroidManifest_created_with_26.0.2.xml')
Actual result: READ_PHONE_STATE permission is added in the AndroidManifest.xml (check attachment 'AndroidManifest_created_with.25.2.3.xml')

Reproduced with:
5.5.4p1, 5.6.2p1, 2017.1.0f1, 2017.2.0b1

Note: READ_PHONE_STATE permission wasn't added using 25.2.5 sdk

RESOLUTION: By design. The project includes a plugin (com.nerd.TapdaqUnityPlugin) which does not specify targetSdkVersion in its manifest. Thus android manifest merger correctly assumes that the SDK version is lower than 4 and implicitly grants the READ_PHONE_STATE permission. See https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE. The difference between 25.2.5 and 26.0.2 SDKs is that in the latter we use different manifest merger implementation which is more strict.

Comments (14)

  1. waken

    Oct 25, 2017 14:42

    Please fix it !!!!

  2. jknight-nc

    Oct 17, 2017 22:20

    This is terrible!

    "Allow "UNITY APP" to make and manage phone calls" is not an OK popup to deal with at the start of a game launch!

  3. moofarm

    Oct 12, 2017 10:45

    Please fix it!

  4. stephenmcintyre

    Sep 25, 2017 08:53

    "By design" is not a sufficient solution for this issue. Unity should surface the manifests that are missing a target SDK to the user - OR BETTER - the target SDK in the Unity Android build settings should be used to add a targetSdkVersion entry in the manifests that are missing a target.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.