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

Commit 8a33128f authored by Nergi Rahardi's avatar Nergi Rahardi Committed by Android (Google) Code Review
Browse files

Merge "Remove additional ApplicationInfo creation to fetch localeConfigRes" into main

parents bf4caf3b b704dc6c
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
@@ -133,15 +132,14 @@ public class LocaleConfig implements Parcelable {
                return;
            }
        }
        int resId = 0;
        Resources res = context.getResources();
        try {
        //Get the resource id
            resId = new ApplicationInfo(context.getApplicationInfo()).getLocaleConfigRes();
        int resId = context.getApplicationInfo().getLocaleConfigRes();
        if (resId == 0) {
            mStatus = STATUS_NOT_SPECIFIED;
            return;
        }
        try {
            //Get the parser to read XML data
            XmlResourceParser parser = res.getXml(resId);
            parseLocaleConfig(parser, res);