Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Fix getApplicationInfo on non-primary user #247

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Fix getApplicationInfo on non-primary user #247

merged 1 commit into from
Oct 12, 2023

Conversation

yujincheng08
Copy link
Member

Fix #224

@yujincheng08 yujincheng08 merged commit c9c5708 into master Oct 12, 2023
1 check passed
@yujincheng08 yujincheng08 deleted the userid branch October 12, 2023 07:05
@@ -70,9 +71,9 @@ public class LSPAppComponentFactoryStub extends AppComponentFactory {
var ipm = IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
ApplicationInfo manager;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
manager = (ApplicationInfo) HiddenApiBypass.invoke(IPackageManager.class, ipm, "getApplicationInfo", Constants.MANAGER_PACKAGE_NAME, 0L, 0);
manager = (ApplicationInfo) HiddenApiBypass.invoke(IPackageManager.class, ipm, "getApplicationInfo", Constants.MANAGER_PACKAGE_NAME, 0L, Process.myPid() / 100000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Process.myUid()

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

Successfully merging this pull request may close these issues.

[Bug] multi-user app crash
3 participants