Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for future versions. This change adds the value reflecting the
previous default to the manifest.
These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.
Bug: 150232615
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: Id54ddf286cf8a2b002ead8e555d0a4aaee29cf1a
diff --git a/tests/cts/hostside/app/AndroidManifest.xml b/tests/cts/hostside/app/AndroidManifest.xml
index 3940de4..e5bae5f 100644
--- a/tests/cts/hostside/app/AndroidManifest.xml
+++ b/tests/cts/hostside/app/AndroidManifest.xml
@@ -15,42 +15,42 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.cts.net.hostside">
+ package="com.android.cts.net.hostside">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
- <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
+ <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
- <application android:requestLegacyExternalStorage="true" >
- <uses-library android:name="android.test.runner" />
- <activity android:name=".MyActivity" />
+ <application android:requestLegacyExternalStorage="true">
+ <uses-library android:name="android.test.runner"/>
+ <activity android:name=".MyActivity"/>
<service android:name=".MyVpnService"
- android:permission="android.permission.BIND_VPN_SERVICE">
+ android:permission="android.permission.BIND_VPN_SERVICE"
+ android:exported="true">
<intent-filter>
<action android:name="android.net.VpnService"/>
</intent-filter>
</service>
- <service
- android:name=".MyNotificationListenerService"
- android:label="MyNotificationListenerService"
- android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" >
+ <service android:name=".MyNotificationListenerService"
+ android:label="MyNotificationListenerService"
+ android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
+ android:exported="true">
<intent-filter>
- <action android:name="android.service.notification.NotificationListenerService" />
+ <action android:name="android.service.notification.NotificationListenerService"/>
</intent-filter>
</service>
</application>
- <instrumentation
- android:name="androidx.test.runner.AndroidJUnitRunner"
- android:targetPackage="com.android.cts.net.hostside" />
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.cts.net.hostside"/>
</manifest>
diff --git a/tests/cts/hostside/app2/AndroidManifest.xml b/tests/cts/hostside/app2/AndroidManifest.xml
index ad270b3..eb777f2 100644
--- a/tests/cts/hostside/app2/AndroidManifest.xml
+++ b/tests/cts/hostside/app2/AndroidManifest.xml
@@ -16,38 +16,43 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.cts.net.hostside.app2" >
+ package="com.android.cts.net.hostside.app2">
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
- <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.INTERNET"/>
<!--
- This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store
- them in a shared preferences which is then read by the test app. These broadcasts are
- handled by 2 listeners, one defined the manifest and another dynamically registered by
- a service.
+ This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store
+ them in a shared preferences which is then read by the test app. These broadcasts are
+ handled by 2 listeners, one defined the manifest and another dynamically registered by
+ a service.
- The manifest-defined listener also handles ordered broadcasts used to share data with the
- test app.
+ The manifest-defined listener also handles ordered broadcasts used to share data with the
+ test app.
- This application also provides a service, RemoteSocketFactoryService, that the test app can
- use to open sockets to remote hosts as a different user ID.
- -->
+ This application also provides a service, RemoteSocketFactoryService, that the test app can
+ use to open sockets to remote hosts as a different user ID.
+ -->
<application android:usesCleartextTraffic="true">
- <activity android:name=".MyActivity" android:exported="true"/>
- <service android:name=".MyService" android:exported="true"/>
- <service android:name=".MyForegroundService" android:exported="true"/>
- <service android:name=".RemoteSocketFactoryService" android:exported="true"/>
+ <activity android:name=".MyActivity"
+ android:exported="true"/>
+ <service android:name=".MyService"
+ android:exported="true"/>
+ <service android:name=".MyForegroundService"
+ android:exported="true"/>
+ <service android:name=".RemoteSocketFactoryService"
+ android:exported="true"/>
- <receiver android:name=".MyBroadcastReceiver" >
+ <receiver android:name=".MyBroadcastReceiver"
+ android:exported="true">
<intent-filter>
- <action android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED" />
- <action android:name="com.android.cts.net.hostside.app2.action.GET_COUNTERS" />
- <action android:name="com.android.cts.net.hostside.app2.action.GET_RESTRICT_BACKGROUND_STATUS" />
- <action android:name="com.android.cts.net.hostside.app2.action.CHECK_NETWORK" />
- <action android:name="com.android.cts.net.hostside.app2.action.SEND_NOTIFICATION" />
- <action android:name="com.android.cts.net.hostside.app2.action.SHOW_TOAST" />
+ <action android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED"/>
+ <action android:name="com.android.cts.net.hostside.app2.action.GET_COUNTERS"/>
+ <action android:name="com.android.cts.net.hostside.app2.action.GET_RESTRICT_BACKGROUND_STATUS"/>
+ <action android:name="com.android.cts.net.hostside.app2.action.CHECK_NETWORK"/>
+ <action android:name="com.android.cts.net.hostside.app2.action.SEND_NOTIFICATION"/>
+ <action android:name="com.android.cts.net.hostside.app2.action.SHOW_TOAST"/>
</intent-filter>
</receiver>
</application>
diff --git a/tests/cts/net/api23Test/AndroidManifest.xml b/tests/cts/net/api23Test/AndroidManifest.xml
index 4889660..69ee0dd 100644
--- a/tests/cts/net/api23Test/AndroidManifest.xml
+++ b/tests/cts/net/api23Test/AndroidManifest.xml
@@ -16,7 +16,7 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.net.cts.api23test">
+ package="android.net.cts.api23test">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
@@ -26,20 +26,20 @@
<uses-permission android:name="android.permission.INTERNET" />
<application android:usesCleartextTraffic="true">
- <uses-library android:name="android.test.runner" />
+ <uses-library android:name="android.test.runner"/>
- <receiver android:name=".ConnectivityReceiver">
+ <receiver android:name=".ConnectivityReceiver"
+ android:exported="true">
<intent-filter>
- <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
+ <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
</application>
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
- android:targetPackage="android.net.cts.api23test"
- android:label="CTS tests of android.net">
+ android:targetPackage="android.net.cts.api23test"
+ android:label="CTS tests of android.net">
<meta-data android:name="listener"
- android:value="com.android.cts.runner.CtsTestRunListener" />
+ android:value="com.android.cts.runner.CtsTestRunListener"/>
</instrumentation>
</manifest>
-
diff --git a/tests/cts/net/appForApi23/AndroidManifest.xml b/tests/cts/net/appForApi23/AndroidManifest.xml
index ed4cedb..158b9c4 100644
--- a/tests/cts/net/appForApi23/AndroidManifest.xml
+++ b/tests/cts/net/appForApi23/AndroidManifest.xml
@@ -16,32 +16,32 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.net.cts.appForApi23">
+ package="android.net.cts.appForApi23">
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
- <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.INTERNET"/>
<application>
- <receiver android:name=".ConnectivityReceiver">
+ <receiver android:name=".ConnectivityReceiver"
+ android:exported="true">
<intent-filter>
- <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
+ <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
<intent-filter>
- <action android:name="android.net.cts.appForApi23.getWifiConnectivityActionCount" />
+ <action android:name="android.net.cts.appForApi23.getWifiConnectivityActionCount"/>
</intent-filter>
</receiver>
<activity android:name=".ConnectivityListeningActivity"
- android:label="ConnectivityListeningActivity"
- android:exported="true">
+ android:label="ConnectivityListeningActivity"
+ android:exported="true">
<intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
-