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

Skip to content
Commit f8489cf6 authored by Joanne Chung's avatar Joanne Chung
Browse files

Validate checkInstallConstraints() installer package name

installerPackageName is set when creating PackageInstaller instance.
The value is get by context.getPackageName(). But it is possible the
application can modify the value by reflection to bypass the security
check to access the API. This change will verify it and throws the
SecurityException if the name doesn't match.

The change here doesn't update the javadoc part, it will be added in
the follow up changes.

Bug: 280721965
Test: atest InstallConstraintsTest
Test: manual. Set fake installerPackageName will throw exception
Change-Id: I168e695cf12971f3d770de0f3c9189222bb1707c
parent 6b44c7bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment