Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.28 dagger-android(-support) adding AndroidManifest permissions #1864

Closed
otormaigh opened this issue May 28, 2020 · 1 comment · Fixed by #1869
Closed

2.28 dagger-android(-support) adding AndroidManifest permissions #1864

otormaigh opened this issue May 28, 2020 · 1 comment · Fixed by #1869

Comments

@otormaigh
Copy link

otormaigh commented May 28, 2020

Updating to 2.28 on either of the Android specific Dagger dependencies is adding the following permissions to the AndroidManifest file:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

The merge log in Android Studio reports these are coming from dagger.lint

Implied from the Dagger.app main manifest (this file), line 1; reason: dagger.lint has a targetSdkVersion < 4 
Implied from the Dagger.app main manifest (this file), line 1; reason: dagger.lint requested WRITE_EXTERNAL_STORAGE 

See here for a blank example project with just the dagger-android and dagger-android-support dependencies and here for an APK comparison output on a project after an update from 2.27 to 2.28

@danysantiago
Copy link
Member

Thanks for reporting this, looks like implicit system permissions are being merged because we missed adding a minSdkVersion to the lint manifest. In the mean time you can prevent the permissions from being merged using the tools markers.

netdpb pushed a commit that referenced this issue Jun 1, 2020
Otherwise implicit merged permissions show up in users
AndroidManifest.

Fixes #1864

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=313641991
netdpb pushed a commit that referenced this issue Jun 1, 2020
Otherwise implicit merged permissions show up in users
AndroidManifest.

Fixes #1864

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=313641991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants