[Issue #4] Bug in the implementation of Api.GetApps() leading to users with id 0 getting ignored.#1339
Conversation
| if (m.find() && m.groupCount() > 0) { | ||
| int id = Integer.parseInt(m.group(1)); | ||
| if (id > 0) { | ||
| if (id >= 0) { |
There was a problem hiding this comment.
uid 0 is root . That's handled separately. We don't need to add it here.
There was a problem hiding this comment.
I got the issue that at least in one of my (rooted) dev devices (I believe the one running LineageOS 18.1 (i.e. Android 11)) the only user reported at that point is the one with id 0...
If the user with id 0 is intended to be handled elsewhere, then probably the problem lies there.
Could you point me in that direction?
There was a problem hiding this comment.
p.s. I've dropped the other commits (there are individual pulls for each of those).
There was a problem hiding this comment.
There was a problem hiding this comment.
On the affected devices the listOfUids will always be empty, and therefore the packagesForUser list will empty too:
if(G.supportDual()) {
packagesForUser = getPackagesForUser(listOfUids);
}
…ers with id 0 getting ignored. Fixed a bug in the implementation of Api.getApps() leading to users with id 0 getting ignored and subsequently to the returned apps list being empty.
3fc3b49 to
6b97d84
Compare
Fixed a bug in the implementation of Api.getApps() leading to users with id 0 getting ignored and subsequently to the returned apps list being empty.