frameworks/base
Révision | 21af7a4109cf0989a0c6dc1627bf7137e0e83d8b (tree) |
---|---|
l'heure | 2019-11-08 09:19:33 |
Auteur | Todd Kennedy <toddke@goog...> |
Commiter | Kyriakos Ispoglou |
Only allow INSTALL_ALLOW_TEST from shell or root
Bug: 141169173
Test: Manual. App can't be installed as test-only
Change-Id: Ib6dcca7901aa549d620448c0165c22270a3042be
Merged-In: Ib6dcca7901aa549d620448c0165c22270a3042be
(cherry picked from commit 702d394762a9b162cb2a2b04bb726fd8053f24d3)
@@ -440,6 +440,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub { | ||
440 | 440 | |
441 | 441 | params.installFlags &= ~PackageManager.INSTALL_FROM_ADB; |
442 | 442 | params.installFlags &= ~PackageManager.INSTALL_ALL_USERS; |
443 | + params.installFlags &= ~PackageManager.INSTALL_ALLOW_TEST; | |
443 | 444 | params.installFlags |= PackageManager.INSTALL_REPLACE_EXISTING; |
444 | 445 | if ((params.installFlags & PackageManager.INSTALL_VIRTUAL_PRELOAD) != 0 |
445 | 446 | && !mPm.isCallerVerifier(callingUid)) { |