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

Fix: 329230490

Change-Id: I6e4dd33cbf98293d7efa0a40c0668d6c5242059a
Test: CTS
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
index 5445b63..2f02ebd 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
@@ -429,10 +429,8 @@
             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 =