Check app install source before checking for DO.
Check if the non system apps were installed from an allowed app store
before looking for the distraction optimized activities in their
manifest. This prevents unauthorized apps faking DO behavior.
Bug: 109941605
Test: Test if sideloaded apps with DO activities are not added to the
allowed to run in a restricted state list.
Change-Id: I20f1560d1f26910216dcacc0333d2ae3b6fd1f27
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index 45e6e0b..ac64148 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -51,6 +51,9 @@
Format of each entry is either to specify package name to whitelist the whole package
or use format of "packagename/activity_classname" for tagging each activities.-->
<string name="activityBlacklist"></string>
+ <!-- List of play store package names that are allowed sources of app installation-->
+ <string-array translateble="false" name="allowedAppInstallSources">
+ </string-array>
<!-- Default home activity -->
<string name="defaultHomeActivity"><!--com.your.package/com.your.package.Activity--></string>
<!-- The com.android.car.VmsPublisherService will bind to this list of clients -->