Skip to content

Add AIDL interface for device registration service., Fixes AB#3127905#2926

Merged
p3dr0rv merged 8 commits intodevfrom
pedroro/dr-service
Mar 16, 2026
Merged

Add AIDL interface for device registration service., Fixes AB#3127905#2926
p3dr0rv merged 8 commits intodevfrom
pedroro/dr-service

Conversation

@p3dr0rv
Copy link
Contributor

@p3dr0rv p3dr0rv commented Mar 2, 2026

This pull request introduces a new IPC client for device registration and refines access control for service client methods. The most significant changes are the addition of the DeviceRegistrationServiceClient, the definition of its AIDL interface, and the adjustment of method visibility in service client classes for better encapsulation.

Device Registration IPC Integration

  • Added a new AIDL interface IDeviceRegistrationService.aidl to define the contract for device registration operations between the broker and client.
  • Introduced DeviceRegistrationServiceClient.kt, a Kotlin class that binds to the device registration service and executes device registration protocol operations via IPC.

Service Client API Refinement

  • Changed the visibility of performOperationInternal and getInterfaceFromIBinder methods in BoundServiceClient.java and MicrosoftAuthClient.java from abstract/public to protected abstract/protected, restricting their accessibility to subclasses only. [1] [2] [3]

AB#3127905
Related PR: https://github.com/identity-authnz-teams/ad-accounts-for-android/pull/81

@p3dr0rv p3dr0rv requested a review from a team as a code owner March 2, 2026 22:59
Copilot AI review requested due to automatic review settings March 2, 2026 22:59
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a new bound-service IPC surface for device registration and refines the bound-service client extension API to be less externally accessible.

Changes:

  • Added IDeviceRegistrationService.aidl defining a bound-service contract for device registration protocol execution.
  • Added DeviceRegistrationServiceClient to bind to the broker’s device registration service and delegate the protocol call via AIDL.
  • Tightened BoundServiceClient/MicrosoftAuthClient extension point visibility (performOperationInternal, getInterfaceFromIBinder) to protected.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/DeviceRegistrationServiceClient.kt New bound-service client for device registration IPC delegation.
common/src/main/java/com/microsoft/identity/common/internal/broker/MicrosoftAuthClient.java Restricts internal bound-service extension methods to protected.
common/src/main/java/com/microsoft/identity/common/internal/broker/BoundServiceClient.java Makes subclass extension points protected abstract for encapsulation.
common/src/main/aidl/com/microsoft/identity/client/IDeviceRegistrationService.aidl New AIDL contract for device registration protocol invocation.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

❌ Invalid work item number: AB#3127905
Related. Work item number must be a valid integer.

Click here to learn more.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

✅ Work item link check complete. Description contains link AB#3127905 to an Azure Boards work item.

@p3dr0rv p3dr0rv requested a review from a team as a code owner March 3, 2026 03:43
@github-actions github-actions bot changed the title Add AIDL interface for device registration service. Add AIDL interface for device registration service., Fixes AB#3127905 Mar 3, 2026
*
* @param context the application context used to bind to the service.
*/
class DeviceRegistrationServiceClient(context: Context) :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be in the broker repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are planning to expose the DR API to OneAuth so we need this interface here, if I move it to broker it will be back in common.

Copy link
Contributor

@mohitc1 mohitc1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@p3dr0rv p3dr0rv merged commit 98034f5 into dev Mar 16, 2026
26 of 27 checks passed
@p3dr0rv p3dr0rv deleted the pedroro/dr-service branch March 16, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants