Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android manifest merger silently adds permissions

My Gradle project contains 4 libraries. In recent builds of my app I found that Android Studio is silently adding "read call log" and "write call log" permissions to the manifest. In the build folder is a "final" manifest that is packaged into the apk and it contains these lines:

<android:uses-permission android:name="android.permission.READ_CALL_LOG" />
<android:uses-permission android:name="android.permission.WRITE_CALL_LOG" />

Is there a way to either disable this weird behavior completely or enable some logging to know where this comes from? I don't like when software tries to be smarter than me.

like image 448
Grishka Avatar asked Nov 06 '14 22:11

Grishka


1 Answers

You can use "Merge conflict markers" to remove this tag from your Android Manifest.

Then you can setup on your AndroidManifest the next code and they will be removed:

<uses-permission android:name="android.permission.READ_CALL_LOG" 
        tools:node="remove"/>
<uses-permission android:name="android.permission.WRITE_CALL_LOG" 
        tools:node="remove"/>
like image 165
Jc Miñarro Avatar answered Nov 13 '22 01:11

Jc Miñarro