Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] emit exported="true" for MauiLauncher a…
…ctivities Context: https://aster.cloud/2021/02/23/lets-be-explicit-about-our-intent-filters/ Fixes: dotnet#6196 > An important change is coming to Android 12 that improves both app > and platform security. This change affects all apps that target > Android 12. > > Activities, services, and broadcast receivers with declared > intent-filters now must explicitly declare whether they should be > exported or not. For example: <activity android:icon="@mipmap/icon" android:label="HelloWorld" android:name="example.MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> Should become: <activity android:icon="@mipmap/icon" android:label="HelloWorld" android:name="example.MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" android:exported="true" /> <category android:name="android.intent.category.LAUNCHER" android:exported="true" /> </intent-filter> </activity> Update our `AndroidManifest.xml` generation & related code so that when `MainLauncher=true`, we also automatically set `exported=true`. I updated a test to verify the contents of the generated `AndroidManifest.xml`.
- Loading branch information