Background
* The admin can disable signaling over USB
on corporate owned device.
Changes
* If the admin has disabled signaling over
USB, disable preferences in Settings to
modify USB.
* Show policy transparency dialogs.
Manual Testing:
* Install TestDPC
* Set up as Device Owner
* Disable USB data signaling
* Verify Settings > Connected Devices
> USB is disabled
* Verify Settings > Network & Internet
> Hotspot & tethering > USB tethering
is disabled
* Verify Developer options >
USB debugging, default USB configurations
and USB audio routing are disabled
Bug: 168301639
Test: Manual Testing
make RunSettingsRoboTests -j ROBOTEST_FILTER=TetherSettingsTest
make RunSettingsRoboTests -j
ROBOTEST_FILTER=UsbAudioRoutingPreferenceControllerTest
make RunSettingsRoboTests -j
ROBOTEST_FILTER=UsbDefaultFragmentTest
make RunSettingsRoboTests -j
ROBOTEST_FILTER=DevelopmentSettingsDashboardFragmentTest
make RunSettingsRoboTests -j
ROBOTEST_FILTER=DefaultUsbConfigurationPreferenceControllerTest
make RunSettingsLibRoboTests -j
ROBOTEST_FILTER=EnableAdbPreferenceControllerTest
Change-Id: I3e8461ac37f406a407c874598335cde28fb89b2d
Merged-In: I3e8461ac37f406a407c874598335cde28fb89b2d
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
- default implementation has been added in the super class to handle
enabling/disabling the preference when the master developer options
switch it turned on/off. Removing all subclass that originally
implemented the methods that only contains the default behavior.
Bug: 73955632
Test: make RunSettingsRoboTests
Change-Id: I13c372c2ab498a5786b40cdc1ad3b5f3424abb5a
- Refactor AdbPreferenceController to use
AbstractEnableAdbPreferenceController
Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: If34e2968ff8900276023e12f89d9cc86468adf7a
- Create new AdbPreferenceController
- Create AdbOnChangeListener interface for adb change callbacks
- Create EnableAdbSettingWarningDialog
- Create controller inside the DashboardFragment
- Port logic from DevelopmentSettings into the controller
- Add deprecated annotation to EnableAdbPreferenceController
Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Id57146149943d770bf5ccc9ed5ecc6ea9d8ae66c