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

Commit 71418ecf authored by Guojing Yuan's avatar Guojing Yuan
Browse files

[DO NOT MERGE][CDM] Fix a security issue that allow 3p apps to skip prompt by setSkipPrompt

Fix: 329230490

Change-Id: I6e4dd33cbf98293d7efa0a40c0668d6c5242059a
Test: CTS
parent 73a43831
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -429,10 +429,8 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
            mCallingPackage = callingPackage;
            request.setCallingPackage(callingPackage);

            if (mayAssociateWithoutPrompt(callingPackage, userId)) {
                Slog.i(LOG_TAG, "setSkipPrompt(true)");
                request.setSkipPrompt(true);
            }
            request.setSkipPrompt(mayAssociateWithoutPrompt(callingPackage, userId));

            callback.asBinder().linkToDeath(CompanionDeviceManagerService.this /* recipient */, 0);

            AndroidFuture<String> fetchProfileDescription =