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

Commit 098bd02d authored by Eugene Susla's avatar Eugene Susla Committed by Android (Google) Code Review
Browse files

Merge "Address CDM API feedback" into sc-dev

parents fcfe1f1c 41d85c3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9741,7 +9741,7 @@ package android.companion {
  public interface DeviceFilter<D extends android.os.Parcelable> extends android.os.Parcelable {
  }
  public class DeviceNotAssociatedException extends java.lang.Exception {
  public class DeviceNotAssociatedException extends java.lang.RuntimeException {
  }
  public final class WifiDeviceFilter implements android.companion.DeviceFilter<android.net.wifi.ScanResult> {
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.annotation.Nullable;
 * An exception for a case when a given device was not
 * {@link CompanionDeviceManager#associate associated} to the calling app.
 */
public class DeviceNotAssociatedException extends Exception {
public class DeviceNotAssociatedException extends RuntimeException {
    /** @hide */
    public DeviceNotAssociatedException(@Nullable String deviceName) {
        super("Device not associated with the current app: " + deviceName);
+9 −0
Original line number Diff line number Diff line
@@ -742,6 +742,15 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
                }
            }
        }

        if (association.isNotifyOnDeviceNearby()) {
            ServiceConnector<ICompanionDeviceService> serviceConnector =
                    mDeviceListenerServiceConnectors.forUser(association.getUserId())
                            .get(association.getPackageName());
            if (serviceConnector != null) {
                serviceConnector.unbind();
            }
        }
    }

    private void updateSpecialAccessPermissionForAssociatedPackage(Association association) {