Commit 36cbcb30 by bachinger

Set explicit export attributes in all demo apps

Starting with Android 12 all components of an app that have an intent filter need to have an explicit attribute android:export that is set to either true or false. If a component filters for the MAIN or a VIEW action it needs the attribute explicitly set to true. Prior to Android 12 these were exported implicitly.

See https://medium.com/androiddevelopers/lets-be-explicit-about-our-intent-filters-c5dbe2dbdce0

PiperOrigin-RevId: 358368785
parent 1a12018d
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
<activity android:name="com.google.android.exoplayer2.castdemo.MainActivity" <activity android:name="com.google.android.exoplayer2.castdemo.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:launchMode="singleTop" android:label="@string/application_name" android:launchMode="singleTop" android:label="@string/application_name"
android:theme="@style/Theme.AppCompat"> android:theme="@style/Theme.AppCompat"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
......
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
<activity android:name="com.google.android.exoplayer2.demo.SampleChooserActivity" <activity android:name="com.google.android.exoplayer2.demo.SampleChooserActivity"
android:configChanges="keyboardHidden" android:configChanges="keyboardHidden"
android:label="@string/application_name" android:label="@string/application_name"
android:theme="@style/Theme.AppCompat"> android:theme="@style/Theme.AppCompat"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
...@@ -65,7 +66,8 @@ ...@@ -65,7 +66,8 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:launchMode="singleTop" android:launchMode="singleTop"
android:label="@string/application_name" android:label="@string/application_name"
android:theme="@style/PlayerTheme"> android:theme="@style/PlayerTheme"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="com.google.android.exoplayer.demo.action.VIEW"/> <action android:name="com.google.android.exoplayer.demo.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT"/>
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
<application <application
android:allowBackup="false" android:allowBackup="false"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/application_name"> android:label="@string/application_name"
android:exported="true">
<activity android:name=".MainActivity"> <activity android:name=".MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment