OSDN Git Service

Only add entry with unique package name to default browser list.
authorDoris Ling <dling@google.com>
Tue, 5 Jun 2018 20:58:48 +0000 (13:58 -0700)
committerDoris Ling <dling@google.com>
Wed, 6 Jun 2018 00:48:30 +0000 (17:48 -0700)
commit688d1d81cba16deb03e0f495b1e65c71a981d5a4
tree31d1626842ec3416830fa1b1b55e6c0073980710
parentbed0aff4a21d89f0b6b2bb2351aa6e63e9f60170
Only add entry with unique package name to default browser list.

When we query the package manager for activities that can handle the
web data uri, different capable activities within the same package will
be returned as separate entries. However, when we show the default
browser apps to the user, the entries are simply base on package name.
So, if there are multiple activities within the same package that can
handle the web data, they will be shown as duplicate entries.

When we process the resolved activities, check the corresponding package
name for duplicate entries before adding it to the default browser list.

Change-Id: I4e1f1e1ea22781efe24d791b367246423ca7a3c4
Merged-In: I70c88866eb3d5fe6466554749e23c85f429dd30c
Fixes: 84207432
Test: make RunSettingsRoboTests
src/com/android/settings/applications/defaultapps/DefaultBrowserPicker.java
tests/robotests/src/com/android/settings/applications/defaultapps/DefaultBrowserPickerTest.java