Set highest priority on phone for CALL intents.
Santos Cordon [Fri, 10 May 2013 19:31:26 +0000 (12:31 -0700)]
This prevents third party apps from handling these intents, which they
were never meant to.

bug:8950263
Change-Id: Ic3c8bfd5a7d3b4676f5eca1bce9b4d02560a0e9a

AndroidManifest.xml

index 7e21b99..7ec8007 100644 (file)
         <activity-alias android:name="EmergencyOutgoingCallBroadcaster"
                 android:targetActivity="OutgoingCallBroadcaster"
                 android:permission="android.permission.CALL_PRIVILEGED">
-            <intent-filter>
+            <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.CALL_EMERGENCY" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="tel" />
             </intent-filter>
-            <intent-filter android:icon="@drawable/ic_launcher_sip_call">
+            <intent-filter android:icon="@drawable/ic_launcher_sip_call"
+                    android:priority="1000">
                 <action android:name="android.intent.action.CALL_EMERGENCY" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="sip" />
             </intent-filter>
-            <intent-filter>
+            <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.CALL_EMERGENCY" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="voicemail" />
             </intent-filter>
-            <intent-filter>
+            <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.CALL_EMERGENCY" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:mimeType="vnd.android.cursor.item/phone" />
         <activity-alias android:name="PrivilegedOutgoingCallBroadcaster"
                 android:targetActivity="OutgoingCallBroadcaster"
                 android:permission="android.permission.CALL_PRIVILEGED">
-            <intent-filter>
+            <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.CALL_PRIVILEGED" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="tel" />
             </intent-filter>
-            <intent-filter android:icon="@drawable/ic_launcher_sip_call">
+            <intent-filter android:icon="@drawable/ic_launcher_sip_call"
+                    android:priority="1000">
                 <action android:name="android.intent.action.CALL_PRIVILEGED" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="sip" />
             </intent-filter>
-            <intent-filter>
+            <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.CALL_PRIVILEGED" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="voicemail" />
             </intent-filter>
-            <intent-filter>
+            <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.CALL_PRIVILEGED" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:mimeType="vnd.android.cursor.item/phone" />