Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Dependency injection with Hilt is adding WRITE_EXTERNAL_STORAGE and READ_PHONE_STATE permissions automatically for app #11

@nvquangth

Description

@nvquangth

After I added Hilt dependency for my app follow by guide with latest version 2.28-alpha

// build.gradle

buildscript {
    ...
    dependencies {
        ...
        classpath 'com.google.dagger:hilt-android-gradle-plugin:2.28-alpha'
    }
}
// app/build.gradle

...
apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'

android {
    ...
}

dependencies {
    implementation "com.google.dagger:hilt-android:2.28-alpha"
    kapt "com.google.dagger:hilt-android-compiler:2.28-alpha"
}

I realize that my app added WRITE_EXTERNAL_STORAGE and READ_PHONE_STATE permissions automatically.

I checked permissions by way: MyApp -> AppInfo -> Permissions

  • WRITE_EXTERNAL_STORAGE
  • READ_PHONE_STATE

Although, I have never request those permissions in Manifest.xml file or programmatically.

I try remove Hilt dependency and again check permissions. And I was not see them.

Is it a bug of Hilt? Anyone have the same problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions