Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af38b8ea authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Fix instrumentation context initialization

Previously, when a user was not the system user, an instrumentation context
was not properly initialized. Its ApplicationInfo should had been initialized for
the current user id .

Bug: 25981683
Change-Id: I7b934bb6de42be15a613ac26fd5377c9de1682cc
parent 6449a956
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4841,7 +4841,7 @@ public final class ActivityThread {
        if (ii != null) {
        if (ii != null) {
            final ApplicationInfo instrApp = new ApplicationInfo();
            final ApplicationInfo instrApp = new ApplicationInfo();
            ii.copyTo(instrApp);
            ii.copyTo(instrApp);

            instrApp.initForUser(UserHandle.myUserId());
            final LoadedApk pi = getPackageInfo(instrApp, data.compatInfo,
            final LoadedApk pi = getPackageInfo(instrApp, data.compatInfo,
                    appContext.getClassLoader(), false, true, false);
                    appContext.getClassLoader(), false, true, false);
            final ContextImpl instrContext = ContextImpl.createAppContext(this, pi);
            final ContextImpl instrContext = ContextImpl.createAppContext(this, pi);