Package org.robolectric.shadows
Class ShadowCompanionDeviceManager
java.lang.Object
org.robolectric.shadows.ShadowCompanionDeviceManager
@Implements(value=android.companion.CompanionDeviceManager.class, minSdk=26) public class ShadowCompanionDeviceManager extends Object
Shadow for CompanionDeviceManager.
-
Field Summary
Fields Modifier and Type Field Description protected Set<org.robolectric.shadows.ShadowCompanionDeviceManager.RoboAssociationInfo>
associations
protected Set<ComponentName>
hasNotificationAccess
protected CompanionDeviceManager.Callback
lastAssociationCallback
protected AssociationRequest
lastAssociationRequest
protected ComponentName
lastRequestedNotificationAccess
-
Constructor Summary
Constructors Constructor Description ShadowCompanionDeviceManager()
-
Method Summary
Modifier and Type Method Description void
addAssociation(AssociationInfo info)
void
addAssociation(String newAssociation)
protected void
associate(AssociationRequest request, CompanionDeviceManager.Callback callback, Handler handler)
protected void
associate(AssociationRequest request, Executor executor, CompanionDeviceManager.Callback callback)
protected void
disassociate(int associationId)
protected void
disassociate(String deviceMacAddress)
protected List<String>
getAssociations()
CompanionDeviceManager.Callback
getLastAssociationCallback()
AssociationRequest
getLastAssociationRequest()
ComponentName
getLastRequestedNotificationAccess()
protected List<AssociationInfo>
getMyAssociations()
protected boolean
hasNotificationAccess(ComponentName component)
protected void
requestNotificationAccess(ComponentName component)
void
setNotificationAccess(ComponentName component, boolean hasAccess)
-
Field Details
-
associations
protected final Set<org.robolectric.shadows.ShadowCompanionDeviceManager.RoboAssociationInfo> associations -
hasNotificationAccess
-
lastRequestedNotificationAccess
-
lastAssociationRequest
-
lastAssociationCallback
-
-
Constructor Details
-
ShadowCompanionDeviceManager
public ShadowCompanionDeviceManager()
-
-
Method Details
-
getAssociations
-
addAssociation
-
addAssociation
-
disassociate
-
disassociate
-
hasNotificationAccess
-
setNotificationAccess
-
requestNotificationAccess
-
associate
@Implementation protected void associate(AssociationRequest request, CompanionDeviceManager.Callback callback, Handler handler) -
associate
@Implementation(minSdk=33) protected void associate(AssociationRequest request, Executor executor, CompanionDeviceManager.Callback callback) -
getLastAssociationRequest
-
getLastAssociationCallback
-
getLastRequestedNotificationAccess
-
getMyAssociations
-