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/AndroidManifest.xml b/AndroidManifest.xml
index a7c2073..cf088aa 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -235,6 +235,7 @@
             android:label="@string/emergencyDialerIconLabel"
             android:theme="@style/EmergencyDialerTheme"
             android:screenOrientation="portrait"
+            android:exported="true"
             android:resizeableActivity="false">
             <intent-filter>
                 <action android:name="com.android.phone.EmergencyDialer.DIAL" />
@@ -262,6 +263,7 @@
             android:label="@string/simContacts_title"
             android:theme="@style/SimImportTheme"
             android:screenOrientation="portrait"
+            android:exported="true"
             android:icon="@mipmap/ic_launcher_contacts">
 
             <intent-filter>
@@ -273,6 +275,7 @@
 
         <activity android:name="com.android.phone.settings.fdn.FdnList"
                 android:label="@string/fdnListLabel"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
@@ -287,6 +290,7 @@
 
         <activity android:name="GsmUmtsCallOptions"
                 android:label="@string/gsm_umts_options"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -295,6 +299,7 @@
 
         <activity android:name="CdmaCallOptions"
                 android:label="@string/cdma_options"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -304,6 +309,7 @@
         <activity android:name="GsmUmtsCallForwardOptions"
                 android:label="@string/labelCF"
                 android:configChanges="orientation|screenSize|keyboardHidden"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -313,6 +319,7 @@
         <activity android:name="CdmaCallForwardOptions"
                 android:label="@string/labelCF"
                 android:configChanges="orientation|screenSize|keyboardHidden"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -322,6 +329,7 @@
         <activity android:name="GsmUmtsCallBarringOptions"
                 android:label="@string/labelCallBarring"
                 android:configChanges="orientation|screenSize|keyboardHidden"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -331,6 +339,7 @@
         <activity android:name="GsmUmtsAdditionalCallOptions"
                 android:label="@string/labelGSMMore"
                 android:configChanges="orientation|screenSize|keyboardHidden"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -340,6 +349,7 @@
         <!-- fdn setting -->
         <activity android:name="com.android.phone.settings.fdn.FdnSetting"
                 android:label="@string/fdn"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -349,6 +359,7 @@
         <!-- SIM PIN setting -->
         <activity android:name="EnableIccPinScreen"
                 android:label="@string/enable_pin"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -358,6 +369,7 @@
 
         <activity android:name="ChangeIccPinScreen"
                 android:label="@string/change_pin"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -385,6 +397,7 @@
         <activity android:name="CallFeaturesSetting"
                 android:label="@string/call_settings"
                 android:configChanges="orientation|screenSize|keyboardHidden"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
@@ -397,6 +410,7 @@
         <!-- Activation service that trigger OTASP sim provisioning -->
         <service android:name=".otasp.OtaspActivationService" android:launchMode="singleInstance"
             androidprv:systemUserOnly="true"
+            android:exported="true"
             android:permission="android.permission.MODIFY_PHONE_STATE">
             <intent-filter>
                 <action android:name="android.service.simActivation.SimActivationService" />
@@ -413,6 +427,7 @@
         <!-- "Accessibility" settings UI. Referenced by Dialer application. -->
         <activity android:name="com.android.phone.settings.AccessibilitySettingsActivity"
                 android:label="@string/accessibility_settings_activity_title"
+                android:exported="true"
                 android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -427,6 +442,7 @@
 
         <!-- service to dump telephony information -->
         <service android:name="com.android.phone.TelephonyDebugService"
+                android:exported="true"
                  android:permission="android.permission.DUMP">
             <intent-filter>
                 <action android:name="com.android.phone.TelephonyDebugService" />
@@ -436,6 +452,7 @@
         <!-- Handler for EuiccManager's public-facing intents. -->
         <activity android:name=".euicc.EuiccUiDispatcherActivity"
             android:theme="@android:style/Theme.NoDisplay"
+            android:exported="true"
             android:permission="android.permission.MODIFY_PHONE_STATE">
             <!-- Max out priority to ensure nobody else will handle these intents. -->
             <intent-filter android:priority="1000">
@@ -453,6 +470,7 @@
             it (which contains a description of the next step to perform after resolution).
         -->
         <activity android:name=".euicc.EuiccResolutionUiDispatcherActivity"
+            android:exported="true"
             android:permission="android.permission.CALL_PRIVILEGED">
             <!-- Max out priority to ensure nobody else will handle these intents. -->
             <intent-filter android:priority="1000">
@@ -468,6 +486,7 @@
         -->
         <activity android:name=".euicc.EuiccPrivilegedActionUiDispatcherActivity"
                   android:theme="@android:style/Theme.NoDisplay"
+                  android:exported="true"
                   android:permission="android.permission.CALL_PRIVILEGED">
             <!-- Max out priority to ensure nobody else will handle these intents. -->
             <intent-filter android:priority="1000">
@@ -487,6 +506,7 @@
             whitelisted by the underlying eUICC service implementation (i.e. the LPA).
         -->
         <activity android:name=".euicc.EuiccPublicActionUiDispatcherActivity"
+            android:exported="true"
             android:theme="@android:style/Theme.NoDisplay">
             <!-- Max out priority to ensure nobody else will handle these intents. -->
             <intent-filter android:priority="1000">
@@ -500,6 +520,7 @@
             android:excludeFromRecents="true"
             android:label="@string/ecm_exit_dialog"
             android:launchMode="singleTop"
+            android:exported="true"
             android:theme="@android:style/Theme.Translucent.NoTitleBar">
             <intent-filter>
                 <action android:name="com.android.phone.action.ACTION_SHOW_ECM_EXIT_DIALOG" />
@@ -512,13 +533,15 @@
         <service android:name="com.android.services.telephony.sip.SipConnectionService"
                  android:label="@string/sip_connection_service_label"
                  android:singleUser="true"
+                 android:exported="true"
                  android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" >
             <intent-filter>
                 <action android:name="android.telecom.ConnectionService" />
             </intent-filter>
         </service>
 
-        <receiver android:name="com.android.services.telephony.sip.SipIncomingCallReceiver">
+        <receiver android:name="com.android.services.telephony.sip.SipIncomingCallReceiver"
+            android:exported="true">
             <intent-filter>
                 <action android:name="android.net.sip.action.SIP_INCOMING_CALL" />
             </intent-filter>
@@ -526,6 +549,7 @@
 
         <activity android:name="com.android.services.telephony.sip.SipPhoneAccountSettingsActivity"
                 android:theme="@android:style/Theme.NoDisplay"
+                android:exported="true"
                 android:excludeFromRecents="true">
             <intent-filter>
                 <action android:name="android.telecom.action.CONFIGURE_PHONE_ACCOUNT" />
@@ -539,6 +563,7 @@
                   android:launchMode="singleTop"
                   android:configChanges="orientation|screenSize|keyboardHidden"
                   android:uiOptions="splitActionBarWhenNarrow"
+                  android:exported="true"
                   android:parentActivityName="com.android.phone.CallFeaturesSetting" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -551,7 +576,8 @@
                 android:uiOptions="splitActionBarWhenNarrow">
         </activity>
 
-        <service android:name="com.android.services.telephony.sip.components.TelephonySipService">
+        <service android:name="com.android.services.telephony.sip.components.TelephonySipService"
+            android:exported="true">
             <intent-filter>
                 <action android:name="android.net.sip.action.START_SIP" />
             </intent-filter>
@@ -568,6 +594,7 @@
 
         <activity android:name="com.android.phone.settings.PhoneAccountSettingsActivity"
             android:label="@string/phone_accounts"
+            android:exported="true"
             android:theme="@style/DialerSettingsLight">
             <intent-filter>
                 <action android:name="android.telecom.action.CHANGE_PHONE_ACCOUNTS" />
@@ -579,6 +606,7 @@
             android:label="@string/voicemail"
             android:configChanges="orientation|screenSize|keyboardHidden|screenLayout"
             android:screenOrientation="portrait"
+            android:exported="true"
             android:theme="@style/DialerSettingsLight">
             <intent-filter >
                 <!-- DO NOT RENAME. There are existing apps which use this string. -->
@@ -596,6 +624,7 @@
                 android:singleUser="true"
                 android:name="com.android.services.telephony.TelephonyConnectionService"
                 android:label="@string/pstn_connection_service_label"
+                android:exported="true"
                 android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" >
             <intent-filter>
                 <action android:name="android.telecom.ConnectionService" />
@@ -644,6 +673,7 @@
             </intent-filter>
         </service>
         <service android:name="com.android.internal.telephony.dataconnection.CellularDataService"
+            android:exported="true"
             android:permission="android.permission.BIND_TELEPHONY_DATA_SERVICE" >
             <intent-filter>
                 <action android:name="android.telephony.data.DataService" />
@@ -661,6 +691,7 @@
         <activity
             android:name=".settings.RadioInfo"
             android:label="@string/phone_info_label"
+            android:exported="true"
             android:theme="@style/Theme.AppCompat.DayNight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -670,6 +701,7 @@
 
         <activity android:name=".settings.BandMode"
                   android:label="@string/band_mode_title"
+                  android:exported="true"
                   android:theme="@style/Theme.AppCompat.DayNight">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
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>
-
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index d434650..174d22e 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -31,6 +31,7 @@
                 adb shell am start -n com.android.phone.tests/.CallDialTest
         -->
         <activity android:name="CallDialTest"
+                  android:exported="true"
                   android:label="@string/callDialTestLabel">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -39,6 +40,7 @@
         </activity>
 
         <service android:name="SendInstantTextTestService"
+                 android:exported="true"
                  android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" >
             <intent-filter>
                 <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />