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

Commit db719819 authored by Guojing Yuan's avatar Guojing Yuan Committed by Android Build Coastguard Worker
Browse files

[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 1761a0fe)
(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
parent ac5d9057
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1271,9 +1271,9 @@ public class CompanionDeviceManagerService extends SystemService {
                @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);
        }