OSDN Git Service

Only add entry with unique package name to default browser list.
authorDoris Ling <dling@google.com>
Tue, 5 Jun 2018 22:28:27 +0000 (15:28 -0700)
committerDoris Ling <dling@google.com>
Tue, 5 Jun 2018 22:28:27 +0000 (15:28 -0700)
commit1503b0273b866c412e1ed8595c09e29986e1d67b
treeb51b95ee94a7a85158ef1cee82e2a9f33c25e2b6
parent0614f76677b51289f5c88a864be324a74310d177
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: I70c88866eb3d5fe6466554749e23c85f429dd30c
Fixes: 84207432
Test: make RunSettingsRoboTests
src/com/android/settings/applications/defaultapps/DefaultBrowserPicker.java
tests/robotests/src/com/android/settings/applications/defaultapps/DefaultBrowserPickerTest.java