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

Commit 395f5126 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Return the right thing from Context.getApplicationContext()"

parents 310c0778 eb9e9ec0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -278,6 +278,10 @@ public final class ActivityThread {

        int mClientCount = 0;

        Application getApplication() {
            return mApplication;
        }

        public PackageInfo(ActivityThread activityThread, ApplicationInfo aInfo,
                ActivityThread mainThread, ClassLoader baseLoader,
                boolean securityViolation, boolean includeCode) {
+2 −1
Original line number Diff line number Diff line
@@ -260,7 +260,8 @@ class ContextImpl extends Context {
    
    @Override
    public Context getApplicationContext() {
        return mMainThread.getApplication();
        return (mPackageInfo != null) ?
                mPackageInfo.getApplication() : mMainThread.getApplication();
    }
    
    @Override