Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bb6491f authored by Raphael Kim's avatar Raphael Kim Committed by Android (Google) Code Review
Browse files

Merge "[CDM] Explicitly annotate secure transport disabling API as @TestApi" into main

parents 86f14414 a18f9678
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -837,6 +837,10 @@ package android.appwidget {

package android.companion {

  public final class CompanionDeviceManager {
    method @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public void enableSecureTransport(boolean);
  }

  public abstract class CompanionDeviceService extends android.app.Service {
    method public void onBindCompanionDeviceService(@NonNull android.content.Intent);
  }
+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.annotation.UserHandleAware;
import android.app.Activity;
import android.app.ActivityManager;
@@ -1308,12 +1309,13 @@ public final class CompanionDeviceManager {
    }

    /**
     * Enable or disable secure transport for testing. Defaults to enabled.
     * Enables or disables secure transport for testing. Defaults to being enabled.
     * Should not be used outside of testing.
     *
     * @param enabled true to enable. false to disable.
     * @hide
     */
    @TestApi
    @RequiresPermission(android.Manifest.permission.MANAGE_COMPANION_DEVICES)
    public void enableSecureTransport(boolean enabled) {
        try {
+1 −0
Original line number Diff line number Diff line
@@ -108,5 +108,6 @@ interface ICompanionDeviceManager {

    void disableSystemDataSync(int associationId, int flags);

    @EnforcePermission("MANAGE_COMPANION_DEVICES")
    void enableSecureTransport(boolean enabled);
}
+2 −0
Original line number Diff line number Diff line
@@ -815,7 +815,9 @@ public class CompanionDeviceManagerService extends SystemService {
        }

        @Override
        @EnforcePermission(MANAGE_COMPANION_DEVICES)
        public void enableSecureTransport(boolean enabled) {
            enableSecureTransport_enforcePermission();
            mTransportManager.enableSecureTransport(enabled);
        }