Merge "Don't send session committed broadcast for dry runs" into qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
15040587a5
@@ -2186,8 +2186,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
final boolean success = (returnCode == PackageManager.INSTALL_SUCCEEDED);
|
||||
|
||||
// Send broadcast to default launcher only if it's a new install
|
||||
// TODO(b/144270665): Secure the usage of this broadcast.
|
||||
final boolean isNewInstall = extras == null || !extras.getBoolean(Intent.EXTRA_REPLACING);
|
||||
if (success && isNewInstall && mPm.mInstallerService.okToSendBroadcasts()) {
|
||||
if (success && isNewInstall && mPm.mInstallerService.okToSendBroadcasts()
|
||||
&& (params.installFlags & PackageManager.INSTALL_DRY_RUN) == 0) {
|
||||
mPm.sendSessionCommitBroadcast(generateInfo(), userId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user