Show current WebView package as selected in Dev Setting.
When intenting to the select-webview-implementation Dev Setting a user won't know which package is currently being used as WebView implementation. To solve this we change the background color of the item representing the current WebView package. With this CL, also ensure we update the summary of the WebView implementation Dev Setting even if we failed to switch to the package chosen by the user - we might have switched to another package instead. Bug: 34702900 Test: Ensure the current WebView package has a different background color than the rest of the packages. Change-Id: Ieb65fdc635d5dd1253931c8ab8bb0d827a142c56
This commit is contained in:
@@ -70,7 +70,7 @@ public class WebViewAppPreferenceControllerTest {
|
||||
verify(controller, times(1)).updateState(any());
|
||||
}
|
||||
|
||||
@Test public void testOnActivityResultWithFailureDoesNothing() {
|
||||
@Test public void testOnActivityResultWithFailure() {
|
||||
WebViewUpdateServiceWrapper wvusWrapper = mock(WebViewUpdateServiceWrapper.class);
|
||||
|
||||
WebViewAppPreferenceController controller =
|
||||
@@ -78,6 +78,6 @@ public class WebViewAppPreferenceControllerTest {
|
||||
|
||||
controller.displayPreference(mPreferenceScreen); // Makes sure Preference is non-null
|
||||
controller.onActivityResult(Activity.RESULT_CANCELED, new Intent(DEFAULT_PACKAGE_NAME));
|
||||
verify(controller, never()).updateState(any());
|
||||
verify(controller, times(1)).updateState(any());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user