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

Commit c0dfee29 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #9925269: Naver app crashes on launch"

parents eeda23d2 ff32f353
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.app;

import android.os.Build;
import com.android.internal.policy.PolicyManager;
import com.android.internal.util.Preconditions;

@@ -706,6 +707,16 @@ class ContextImpl extends Context {
                sSharedPrefs.put(packageName, packagePrefs);
            }

            // At least one application in the world actually passes in a null
            // name.  This happened to work because when we generated the file name
            // we would stringify it to "null.xml".  Nice.
            if (mPackageInfo.getApplicationInfo().targetSdkVersion <
                    Build.VERSION_CODES.KEY_LIME_PIE) {
                if (name == null) {
                    name = "null";
                }
            }

            sp = packagePrefs.get(name);
            if (sp == null) {
                File prefsFile = getSharedPrefsFile(name);