OSDN Git Service

Require that verified intent filters only have http/https <data> decls
authorChristopher Tate <ctate@google.com>
Wed, 24 Jun 2015 02:23:46 +0000 (19:23 -0700)
committerChristopher Tate <ctate@google.com>
Wed, 24 Jun 2015 20:16:20 +0000 (13:16 -0700)
commit413020a6ca6e7d4eb7e61e3fe7d7a4c570a605db
tree4925f00db43a6c1e61f178c669a2e2e281a53052
parentd4e9e0e1d6b860c7cc93d06d8b5fdc0004e56b80
Require that verified intent filters only have http/https <data> decls

It is malformed to write a single intent filter like this:

  <intent-filter android:autoVerify="true">
    <data android:host="foo.example"
          android:path="/"
          android:scheme="http" />
    <data android:host="*"
          android:path="/custom"
          android:scheme="fooexamplecustomscheme" />
  </intent-filter>

In practice this app is accidentally defining a filter that will match
"http://*".  This is now detected, and will never be auto-verified for
any of the mentioned domains.

Verified intent filters must *only* handle the http & https schemes.

Bug 21920537

Change-Id: I933cddbea23185d242565cac940e1e7a7e4e289b
core/java/android/content/IntentFilter.java
services/core/java/com/android/server/pm/PackageManagerService.java