Install Referrer Library v1.1 adds permissions

只愿长相守 提交于 2020-01-24 09:01:31

问题


Updating the Install Referrer Library from v1.0 to v1.1 added the following permissions:

WRITE_EXTERNAL_STORAGE

READ_EXTERNAL_STORAGE

READ_PHONE_STATE

Those permissions are not present in the Install Referrer Library manifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.installreferrer" >

    <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />

    <application />

</manifest>

Source: https://mvnrepository.com/artifact/com.android.installreferrer/installreferrer/1.1

Why those permissions added to the merged manifest?


回答1:


This is because they have added a dependency to

com.google.android.gms:play-services-measurement:17.2.1

Which adds those permissions.

You can find it on the file: manifest-merger-blame-debug-report.txt which is under "yourApp/build/intermediates/manifest_merge_blame_file/debug

It's probably a bug. I currently just downgraded back to 1.0. But if you need this version you can add

<uses-permission android:name="<permission_name>" tools:node="remove" />

To disable it.
Know that if you'll use any API which needs it inside the library it could lead to a crash so i won't recommend doing so.



来源:https://stackoverflow.com/questions/59263642/install-referrer-library-v1-1-adds-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!