Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: get installed packages information #502
feat: get installed packages information #502
Changes from 11 commits
f0ca48b
a058f4a
22350a0
1fb0fea
45f9e58
48e1575
6d7b9b2
569febd
839febf
0515fa4
d97e538
fab7723
0a05c3f
615cb37
13b4fc6
1131105
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happen when
getLaunchIntentForPackage(appInfo.packageName)
is null, orgetComponent
is null. They are nullable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They both are Nullable, if an application has an intent then for sure it will have a component, so application with no component will automatically get filter out from the 46 condition and also getComponent is also Nullable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, missed here called the method twice.
This endpoint tries to show installed packages and each information, then maybe if would be nice to keep the package name (since it exists) but no activities rather than filtering the package out entirely. What do you think?
So, the user can understand some packages exist in the device but they has no launchable activities by this endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intend was to show all the main applications since the package without Intent is just a subpackage of it's parent package which can just create confusion to the user and actually it's pretty much useless, if later on anyone needs that then surely we can modify accordingly but i feel it's unnecessary right now to show?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, could you leave the intention as docstring in this class for future maintenance?
GetPackages
made me think the app package is primary, then app activities etc as additional information. The current intention is to get app activities information than its package (since filter by package).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have already given a comment on that condition, You want me to create docstring with more info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, could you leave what kind of activities will be available, and no activities packages won't be available?
I mean not a comment for the implementation, just this method's entire behavior as the module's description. Also, it wole be appreciate to add this method uses
android.permission.QUERY_ALL_PACKAGES
here, or a comment in the manifest to link eachThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missing commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done now