Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addPackage creates a session and never finishes it #2950

Closed
fredast opened this issue Mar 6, 2017 · 2 comments · Fixed by #2984
Closed

addPackage creates a session and never finishes it #2950

fredast opened this issue Mar 6, 2017 · 2 comments · Fixed by #2984

Comments

@fredast
Copy link

fredast commented Mar 6, 2017

Description

DefaultPackageManager.addPackage creates a PackageInstaller session and never finishes it, therefore leaving phantom non-opened sessions.

I think this method shouldn't create a session, or at least finish it.

@jongerrish
Copy link
Contributor

I'm not sure what the on device experience is but I agree if a session is created using addPackage() then that session should be completed, as the semantics of the method are really addInstalledPackage()

@jongerrish jongerrish added this to the 3.3.1 milestone Mar 6, 2017
@fredast
Copy link
Author

fredast commented Mar 6, 2017

If addPackage() is called before the test starts, it doesn't matter whether we create the session since we remove (finish) it before the test starts.
If addPackage() is called during the test, then maybe we should create a session in case the application is listening for install sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants