Reputation: 15233
Here is my android manifest.xml file
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!--<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>-->
<!--<!– GCM connects to Internet Services. –>-->
<!--<uses-permission android:name="android.permission.INTERNET" />-->
<!--<!– GCM requires a Google account. –>-->
<!--<uses-permission android:name="android.permission.GET_ACCOUNTS" />-->
<!--<!– Keeps the processor from sleeping when a message is received. –>-->
<!--<uses-permission android:name="android.permission.WAKE_LOCK" />-->
<!--<uses-permission android:name="com.google.android.c2dm.permission.SEND" />-->
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<permission android:name="com.example.ngx.surprise.permission.C2D_MESSAGE" android:protectionLevel="signature" />
Even after commenting all permission except set wallpaper I am not able to see commented permissions go away and SET_WALLPAPER permission applied to app.
Here is the permissions screenshot of application after clean install
Upvotes: 0
Views: 367
Reputation: 1073
Set the permissions outside the application tag as @Zahidul mentioned.
Also, when you run your app, are you doing it with a clean install? With newer versions of Android Studio, due to the new Instant Run functionality it will only update the modified activities.
As permissions are checked only during the installation, with Instant Run the changes will be not applied.
Disable Instant Run in your Android Studio, o simply unistall the app before you run it again.
Hope it helps.
Upvotes: 1
Reputation: 3190
Permission should be under manifest
. Not under application
.
Upvotes: 2