JakeWharton/ProcessPhoenix

ProcessPhoenix adds READ_PHONE_STATE due to implied targetSdkVersion

dlew opened this issue · 5 comments

dlew commented

I just noticed that READ_PHONE_STATE got added to my app and I traced it back to ProcessPhoenix. In the manifest merger logs it states:

IMPLIED from <redacted> reason: com.jakewharton.processphoenix has a targetSdkVersion < 4
android:uses-permission#android.permission.READ_PHONE_STATE

Could we add a reasonable targetSdkVersion? Or is there a better solution?

This sounds like it could be viewed as a tooling bug. I find it slightly strange the lack of a target version automatically gets its value mapped from the min version. I would think that for lack of a target version that it would pull your application's target version to use.

Bumping the minSdkVersion to 4 sounds like it would be a quick fix as well.

dlew commented

How about 14? That seems like the perfect minSdkVersion for all libraries. :trollface:

dlew commented

On a more serious note, it looks like it'll also implicitly add WRITE_CALL_LOG since both min/target will be < 16: http://developer.android.com/reference/android/Manifest.permission.html#WRITE_CALL_LOG

That seems like very broken behavior on the part of the tooling. If we take the opposite approach, if the library specifies a target version of 23 you'll get manifest merging conflicts which must be resolved or explicitly ignored.

Released as 1.0.2.

This is only affecting your debug APK, right? Or are you phoenixing in production?