OSDN Git Service

Fix disabled WebView packages being shown as enabled in Dev Setting.
authorGustav Sennton <gsennton@google.com>
Thu, 23 Feb 2017 18:32:20 +0000 (18:32 +0000)
committerGustav Sennton <gsennton@google.com>
Tue, 7 Mar 2017 19:30:10 +0000 (19:30 +0000)
commit3c89d8e2cfe5bc338f3e285945b6836cd2f69b05
tree1fb4d6bedb72d6c70849842dc715a1a09ce3e97c
parent01b721ee1182ddb3959c8cf25d40829cbc09cace
Fix disabled WebView packages being shown as enabled in Dev Setting.

WebView packages that cannot be chosen as WebView implementation should
be shown as disabled in the 'WebView Implementation' Dev Setting.
Simplify the logic in DefaultAppInfo a little bit to avoid
special-casing for the WebView Dev setting.
Also add tests to ensure we are correctly disabling WebView packages in
the Dev setting and showing their disabled-reasons.

Bug: 35707106
Test: 'make RunSettingsRoboTests'
Test: Ensure disabled WebView packages show up as being disabled in the
'WebView Implementation' Dev Setting.
Change-Id: Ic2f5265c3451b6396e55b7bc29689c3d889ddb5e
src/com/android/settings/applications/defaultapps/DefaultAppInfo.java
src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
src/com/android/settings/webview/WebViewAppPicker.java
tests/robotests/src/com/android/settings/webview/WebViewAppPickerTest.java