diff options
Diffstat (limited to 'Android/03-Permissions/DangerousApp/AndroidManifest.xml')
-rw-r--r-- | Android/03-Permissions/DangerousApp/AndroidManifest.xml | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/Android/03-Permissions/DangerousApp/AndroidManifest.xml b/Android/03-Permissions/DangerousApp/AndroidManifest.xml index c9283a5..448a602 100644 --- a/Android/03-Permissions/DangerousApp/AndroidManifest.xml +++ b/Android/03-Permissions/DangerousApp/AndroidManifest.xml @@ -8,30 +8,27 @@ android:minSdkVersion="13" android:targetSdkVersion="18" /> - <!-- - TODO - Using a permission element, - define a custom permission with name - "course.labs.permissions.DANGEROUS_ACTIVITY_PERM" - and "dangerous" protection level. - --> + <permission + android:name="course.labs.dangerousapp.DANGEROUS_ACTIVITY_PERM" + android:protectionLevel="dangerous" + /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme" > - <!-- TODO - enforce the custom permission on this Activity --> + android:theme="@style/AppTheme" + android:permission="course.labs.dangerousapp.DANGEROUS_ACTIVITY_PERM" + > <activity android:name=".DangerousActivity" android:label="@string/app_name" > - <!-- - TODO - add additional intent filter info so that this Activity - will respond to an Implicit Intent with the action - "course.labs.permissions.DANGEROUS_ACTIVITY" - --> - + <intent-filter> + <action android:name="course.labs.dangerousapp.DANGEROUS_ACTIVITY"/> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> |