Updated privacy settings to launch custom content capture settings when available.

Test: manual verification
Test: atest EnableContentCapturePreferenceControllerTest \
      CtsContentTestCases:android.content.cts.AvailableIntentsTest#testRequestEnableContentCaptureIntent
Test: adb shell am start-activity -a android.settings.REQUEST_ENABLE_CONTENT_CAPTURE

Fixes: 119264902

Change-Id: I2a030c31d966d40feb6ba449e4bbc9ef8cf0565b
This commit is contained in:
Felipe Leme
2019-03-20 08:54:56 -07:00
parent 08e2a5f0f4
commit fcf98251f2
5 changed files with 162 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ public class EnableContentCapturePreferenceControllerTest {
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mController = new EnableContentCapturePreferenceController(mContext);
mController = new EnableContentCapturePreferenceController(mContext, "THE_KEY_TO_SUCCESS");
mPreference = new Preference(mContext);
mPreference.setKey(mController.getPreferenceKey());
}