Fix clearPackagePreferredActivities to check appid

This fixes the method for secondary users. The callingUid must be
converted to an app id before comparion. Reusing isCallerSameApp
simplifies implementation.

bug: 122833260
Test: Run on primary and secondary user:
run cts-dev -a arm64-v8a -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testClearPackagePreferredActivities

Change-Id: Ia0ee7b97051e0acd4164f067af69574ba3778291
1 file changed