Address CDM API feedback
Fixes: 181175212 Test: atest CompanionDeviceManagerTest Change-Id: I33c5b2ddaedd09a9f4fae29b247f42e2351b1a0f
This commit is contained in:
@@ -9734,7 +9734,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> {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -747,6 +747,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) {
|
||||
|
||||
Reference in New Issue
Block a user