[CDM][CMD] Check permissions for CDM shell commands
Override handleShellCommand instead of onShellCommand because
Binder.onShellCommand checks the necessary permissions of the caller.
Bug: 313428840
Test: manually tested CDM shell commands
(cherry picked from commit 1761a0fee9c2cd9787bbb7fbdbe30b4c2b03396e)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1f31bb181fc56f3deab5ce0d199220404991c438)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4cce7220b8ab86c5e8d06c99bfd4e8d046e3637b)
Merged-In: I5539b3594feb5544c458c0fd1061b51a0a808900
Change-Id: I5539b3594feb5544c458c0fd1061b51a0a808900
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
index a478a3d..470674b 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
@@ -1271,9 +1271,9 @@
@NonNull ParcelFileDescriptor out, @NonNull ParcelFileDescriptor err,
@NonNull String[] args) {
return new CompanionDeviceShellCommand(CompanionDeviceManagerService.this,
- mAssociationStore, mDevicePresenceMonitor, mTransportManager,
+ mAssociationStore, mDevicePresenceProcessor, mTransportManager,
mSystemDataTransferProcessor, mAssociationRequestsProcessor,
- mBackupRestoreProcessor, mAssociationRevokeProcessor)
+ mBackupRestoreProcessor, mDisassociationProcessor)
.exec(this, in.getFileDescriptor(), out.getFileDescriptor(),
err.getFileDescriptor(), args);
}