[CDM] Gate hidden test API behind a permission

Bug: 281582104
Test: atest CtsCompanionDeviceManagerUiAutomationTestCases:SystemDataTransferTest
Test: atest CompanionTests:SystemDataTransportTest
Change-Id: I38e77b20f285a5d66be2da1f29ddb13507ba8436
This commit is contained in:
Raphael Kim
2023-05-11 10:40:42 -07:00
parent 743eb54490
commit 033b94895e

View File

@@ -1331,10 +1331,12 @@ public final class CompanionDeviceManager {
/**
* Enable or disable secure transport for testing. Defaults to enabled.
* Should not be used outside of testing.
*
* @param enabled true to enable. false to disable.
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_COMPANION_DEVICES)
public void enableSecureTransport(boolean enabled) {
try {
mService.enableSecureTransport(enabled);