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

Commit b57a50bd authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #8582003: Evernote Camera Capture Failure

ActivityThread.currentPackageName() was actually returning
the process name.  Change this to return the package name, and
fix the one spot using it I could find that was actually wanting
the process name.

Change-Id: I323b9c5987106b5a090968e545281fc0ba55b6b8
parent 77216642
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1593,6 +1593,12 @@ public final class ActivityThread {
    }

    public static String currentPackageName() {
        ActivityThread am = currentActivityThread();
        return (am != null && am.mBoundApplication != null)
            ? am.mBoundApplication.appInfo.packageName : null;
    }

    public static String currentProcessName() {
        ActivityThread am = currentActivityThread();
        return (am != null && am.mBoundApplication != null)
            ? am.mBoundApplication.processName : null;
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ public class FakeApp extends Application {

    @Override
    public void onCreate() {
        String processName = ActivityThread.currentPackageName();
        String processName = ActivityThread.currentProcessName();
        Slog.i("FakeOEMFeatures", "Creating app in process: " + processName);
        if (!getApplicationInfo().packageName.equals(processName)) {
            // If we are not in the main process of the app, then don't do