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

Commit 24d12a32 authored by Jason Monk's avatar Jason Monk
Browse files

Workaround apps that are doing very very bad things

Disable AppComponentFactory for them.

Test: manual
Bug: 70776434
Change-Id: Iccfc47af360b719578f0ab9771849a822118518d
parent 1824f66c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1209,6 +1209,11 @@ public class Instrumentation {
    }

    private AppComponentFactory getFactory(String pkg) {
        if (mThread == null) {
            Log.e(TAG, "Uninitialized ActivityThread, likely app-created Instrumentation,"
                    + " disabling AppComponentFactory", new Throwable());
            return AppComponentFactory.DEFAULT;
        }
        LoadedApk loadedApk = mThread.peekLoadedApk(pkg, true);
        // This is in the case of starting up "android".
        if (loadedApk == null) loadedApk = mThread.getSystemContext().mLoadedApk;