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 S+. 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: If7ef7f4b72c405fc2c1d75b476a49ce07a1dbb09
diff --git a/testapps/EmbmsServiceTestApp/AndroidManifest.xml b/testapps/EmbmsServiceTestApp/AndroidManifest.xml
index 91d8508..943fc78 100644
--- a/testapps/EmbmsServiceTestApp/AndroidManifest.xml
+++ b/testapps/EmbmsServiceTestApp/AndroidManifest.xml
@@ -15,30 +15,31 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
-        package="com.android.phone.testapps.embmsmw"
-        coreApp="true">
+     xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+     package="com.android.phone.testapps.embmsmw"
+     coreApp="true">
   <uses-permission android:name="android.permission.SEND_EMBMS_INTENTS"/>
 
   <application android:label="EmbmsTestMiddleware">
     <service android:name="com.android.phone.testapps.embmsmw.EmbmsTestStreamingService"
-            android:launchMode="singleInstance"
-            androidprv:systemUserOnly="true">
+         android:launchMode="singleInstance"
+         androidprv:systemUserOnly="true"
+         android:exported="true">
       <intent-filter>
-        <action android:name="android.telephony.action.EmbmsStreaming" />
+        <action android:name="android.telephony.action.EmbmsStreaming"/>
       </intent-filter>
     </service>
     <service android:name="com.android.phone.testapps.embmsmw.EmbmsSampleDownloadService"
-             android:launchMode="singleInstance"
-             androidprv:systemUserOnly="true">
+         android:launchMode="singleInstance"
+         androidprv:systemUserOnly="true"
+         android:exported="true">
       <intent-filter>
-        <action android:name="android.telephony.action.EmbmsDownload" />
+        <action android:name="android.telephony.action.EmbmsDownload"/>
       </intent-filter>
     </service>
 
     <receiver android:name="com.android.phone.testapps.embmsmw.SideChannelReceiver"
-              android:enabled="true"
-              android:exported="true"/>
+         android:enabled="true"
+         android:exported="true"/>
   </application>
 </manifest>
-
diff --git a/testapps/EmbmsTestDownloadApp/AndroidManifest.xml b/testapps/EmbmsTestDownloadApp/AndroidManifest.xml
index e93cd19..640fcd1 100644
--- a/testapps/EmbmsTestDownloadApp/AndroidManifest.xml
+++ b/testapps/EmbmsTestDownloadApp/AndroidManifest.xml
@@ -15,57 +15,54 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.phone.testapps.embmsdownload">
+     package="com.android.phone.testapps.embmsdownload">
     <application android:label="EmbmsTestDownloadApp">
-        <activity
-            android:name=".EmbmsTestDownloadApp"
-            android:label="EmbmsDownloadFrontend">
+        <activity android:name=".EmbmsTestDownloadApp"
+             android:label="EmbmsDownloadFrontend"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
 
         <!-- This is the receiver defined by the MBMS api. -->
-        <receiver
-            android:name="android.telephony.mbms.MbmsDownloadReceiver"
-            android:permission="android.permission.SEND_EMBMS_INTENTS"
-            android:enabled="true"
-            android:exported="true">
+        <receiver android:name="android.telephony.mbms.MbmsDownloadReceiver"
+             android:permission="android.permission.SEND_EMBMS_INTENTS"
+             android:enabled="true"
+             android:exported="true">
         </receiver>
 
         <!-- This is the receiver defined by app to receive the download-done intent that was
          passed into DownloadRequest. -->
-        <receiver
-            android:name="com.android.phone.testapps.embmsdownload.DownloadCompletionReceiver"
-            android:enabled="true">
+        <receiver android:name="com.android.phone.testapps.embmsdownload.DownloadCompletionReceiver"
+             android:enabled="true">
         </receiver>
 
         <!-- This is the provider that apps must declare in their manifest. It allows the
         middleware to obtain file descriptors to temp files in the app's file space -->
         <!-- grantUriPermissions must be set to true -->
-        <provider
-            android:name="android.telephony.mbms.MbmsTempFileProvider"
-            android:authorities="com.android.phone.testapps.embmsdownload"
-            android:exported="false"
-            android:grantUriPermissions="true">
+        <provider android:name="android.telephony.mbms.MbmsTempFileProvider"
+             android:authorities="com.android.phone.testapps.embmsdownload"
+             android:exported="false"
+             android:grantUriPermissions="true">
             <!-- This is a mandatory piece of metadata that contains the directory where temp
             files should be put. It should be a relative path from Context.getFilesDir() or from
             Context.getExternalStorageDir(null), depending on the value of the
             use-external-storage metadata. -->
-            <meta-data android:name="temp-file-path" android:value="/mbms-temp/"/>
+            <meta-data android:name="temp-file-path"
+                 android:value="/mbms-temp/"/>
 
             <!-- This tells the provider whether to use the sdcard partition for the temp files or
             not. -->
-            <meta-data android:name="use-external-storage" android:value="false"/>
+            <meta-data android:name="use-external-storage"
+                 android:value="false"/>
         </provider>
 
         <!-- This is a mandatory piece of metadata that contains the authority string for the
         provider declared above -->
-        <meta-data
-            android:name="mbms-file-provider-authority"
-            android:value="com.android.phone.testapps.embmsdownload"/>
+        <meta-data android:name="mbms-file-provider-authority"
+             android:value="com.android.phone.testapps.embmsdownload"/>
     </application>
 </manifest>
-
diff --git a/testapps/EmbmsTestStreamingApp/AndroidManifest.xml b/testapps/EmbmsTestStreamingApp/AndroidManifest.xml
index d13425d..9cb83f2 100644
--- a/testapps/EmbmsTestStreamingApp/AndroidManifest.xml
+++ b/testapps/EmbmsTestStreamingApp/AndroidManifest.xml
@@ -15,17 +15,16 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.phone.testapps.embmsfrontend">
+     package="com.android.phone.testapps.embmsfrontend">
     <application android:label="EmbmsTestStreamingApp">
-        <activity
-            android:name=".EmbmsTestStreamingApp"
-            android:label="EmbmsStreamingFrontend">
+        <activity android:name=".EmbmsTestStreamingApp"
+             android:label="EmbmsStreamingFrontend"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
     </application>
 </manifest>
-
diff --git a/testapps/ImsTestService/AndroidManifest.xml b/testapps/ImsTestService/AndroidManifest.xml
index eea54b8..46d0721 100644
--- a/testapps/ImsTestService/AndroidManifest.xml
+++ b/testapps/ImsTestService/AndroidManifest.xml
@@ -16,40 +16,42 @@
   -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          coreApp="true"
-          package="com.android.phone.testapps.imstestapp">
+     coreApp="true"
+     package="com.android.phone.testapps.imstestapp">
     <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
     <!--Beware, declaring the below permission will cause the device to not boot unless you add
         this app and permission to frameworks/base/data/etc/privapp-permissions-platform.xml-->
-    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
-    <application
-        android:label="ImsTestService"
-        android:directBootAware="true">
-        <activity
-            android:name=".ImsTestServiceApp"
-            android:label="ImsTestService">
+    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
+    <application android:label="ImsTestService"
+         android:directBootAware="true">
+        <activity android:name=".ImsTestServiceApp"
+             android:label="ImsTestService"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
 
-        <activity android:name=".ImsRegistrationActivity" android:label="IMS Registration" />
-        <activity android:name=".ImsCallingActivity" android:label="IMS Calling" />
-        <activity android:name=".ImsConfigActivity" android:label="IMS Config" />
+        <activity android:name=".ImsRegistrationActivity"
+             android:label="IMS Registration"/>
+        <activity android:name=".ImsCallingActivity"
+             android:label="IMS Calling"/>
+        <activity android:name=".ImsConfigActivity"
+             android:label="IMS Config"/>
 
         <service android:name=".TestImsService"
-                 android:exported="true"
-                 android:enabled="true"
-                 android:persistent="true"
-                 android:permission="android.permission.BIND_IMS_SERVICE">
-            <!--meta-data android:name="android.telephony.ims.MMTEL_FEATURE" android:value="true"/-->
+             android:exported="true"
+             android:enabled="true"
+             android:persistent="true"
+             android:permission="android.permission.BIND_IMS_SERVICE">
+            <!--meta-data android:name="android.telephony.ims.MMTEL_FEATURE"
+                 android:value="true"/-->
             <!-- No features means we will get queried for dynamic config. -->
             <intent-filter>
-                <action android:name="android.telephony.ims.ImsService" />
+                <action android:name="android.telephony.ims.ImsService"/>
             </intent-filter>
         </service>
     </application>
 </manifest>
-
diff --git a/testapps/SmsManagerTestApp/AndroidManifest.xml b/testapps/SmsManagerTestApp/AndroidManifest.xml
index c5f4621..57b7344 100644
--- a/testapps/SmsManagerTestApp/AndroidManifest.xml
+++ b/testapps/SmsManagerTestApp/AndroidManifest.xml
@@ -16,29 +16,30 @@
   -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.phone.testapps.smsmanagertestapp">
-    <uses-sdk android:minSdkVersion="24" android:targetSdkVersion="29" />
+     package="com.android.phone.testapps.smsmanagertestapp">
+    <uses-sdk android:minSdkVersion="24"
+         android:targetSdkVersion="29"/>
     <uses-permission android:name="android.permission.SEND_SMS"/>
     <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
     <application android:label="SmsManagerTestApp">
-        <activity
-            android:name=".SmsManagerTestApp"
-            android:label="SmsManagerTestApp">
+        <activity android:name=".SmsManagerTestApp"
+             android:label="SmsManagerTestApp"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
-        <service android:name=".SmsManagerTestService" android:exported="false" />
+        <service android:name=".SmsManagerTestService"
+             android:exported="false"/>
         <receiver android:name=".SendStatusReceiver"
-                  android:exported="false">
+             android:exported="false">
             <intent-filter>
-                <action android:name="com.android.phone.testapps.smsmanagertestapp.message_sent_action" />
-                <data android:scheme="content" />
+                <action android:name="com.android.phone.testapps.smsmanagertestapp.message_sent_action"/>
+                <data android:scheme="content"/>
             </intent-filter>
         </receiver>
 
     </application>
 </manifest>
-
diff --git a/testapps/TelephonyManagerTestApp/AndroidManifest.xml b/testapps/TelephonyManagerTestApp/AndroidManifest.xml
index 044d0b2..40fc549 100644
--- a/testapps/TelephonyManagerTestApp/AndroidManifest.xml
+++ b/testapps/TelephonyManagerTestApp/AndroidManifest.xml
@@ -15,7 +15,7 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.phone.testapps.telephonymanagertestapp">
+     package="com.android.phone.testapps.telephonymanagertestapp">
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
     <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
     <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
@@ -26,31 +26,29 @@
     <uses-permission android:name="android.permission.CALL_PRIVILEGED"/>
     <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
 
-    android.Manifest.permission.ACCESS_FINE_LOCATION
+            android.Manifest.permission.ACCESS_FINE_LOCATION
     <application android:label="TelephonyManagerTestApp">
-        <activity
-            android:name=".TelephonyManagerTestApp"
-            android:label="TelephonyManagerTestApp">
+        <activity android:name=".TelephonyManagerTestApp"
+             android:label="TelephonyManagerTestApp"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <action android:name="android.intent.action.SEARCH" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <action android:name="android.intent.action.SEARCH"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
-            <meta-data
-                android:name="android.app.searchable"
-                android:resource="@xml/searchable">
+            <meta-data android:name="android.app.searchable"
+                 android:resource="@xml/searchable">
             </meta-data>
         </activity>
 
-        <activity
-            android:name=".CallingMethodActivity"
-            android:label="CallingMethodActivity">
+        <activity android:name=".CallingMethodActivity"
+             android:label="CallingMethodActivity"
+             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>
-
diff --git a/testapps/TelephonyRegistryTestApp/AndroidManifest.xml b/testapps/TelephonyRegistryTestApp/AndroidManifest.xml
index 550c9f0..7432156 100644
--- a/testapps/TelephonyRegistryTestApp/AndroidManifest.xml
+++ b/testapps/TelephonyRegistryTestApp/AndroidManifest.xml
@@ -15,24 +15,23 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.phone.testapps.telephonyregistry">
+     package="com.android.phone.testapps.telephonyregistry">
     <uses-sdk android:minSdkVersion="25"
-          android:targetSdkVersion="25"/>
+         android:targetSdkVersion="25"/>
 
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
     <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
     <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
     <uses-permission android:name="android.permission.READ_PRECISE_PHONE_STATE"/>
     <application android:label="TelephonyRegistryTestApp">
-        <activity
-            android:name=".TelephonyRegistryTestApp"
-            android:label="TelephonyRegistryTestApp">
+        <activity android:name=".TelephonyRegistryTestApp"
+             android:label="TelephonyRegistryTestApp"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
     </application>
 </manifest>
-