Hello,
There is something I cannot understand in the native browser
application (com.android.browser/.BrowserActivity) intent filters for
the VIEW intent.
Specifically these 2 filters:
(/packages/apps/Browser/AndroidManifest.xml)
<!-- For these schemes were not particular MIME type has
been
supplied, we are a good candidate. -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="about" />
<data android:scheme="javascript" />
</intent-filter>
<!-- For these schemes where any of these particular MIME
types
have been supplied, we are a good candidate. -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.BROWSABLE" />
<category
android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="inline" />
<data android:mimeType="text/html"/>
<data android:mimeType="text/plain"/>
<data android:mimeType="application/xhtml+xml"/>
<data android:mimeType="application/vnd.wap.xhtml+xml"/
>
</intent-filter>
Now, it seems to me that the second filter is partially redundant
compared to the first one. Specifically, why to put there these again?
<data android:scheme="http" />
<data android:scheme="https" />
A VIEW intent over "http" or "https" with any mime type specified will
be still handled by the first filter. Can anyone please explain me why
that section has been duplicated? Is it just a matter of style or best
practice?
Thank you
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en