public String[] getStringArray(String resName) {
        if (!PkgUtils.isPkgInstalled(this.context, appPackageName)) {
            if (S_STRING_ARRAY_RES_CACHE.containsKey(resName)) {
                String[] cached = S_STRING_ARRAY_RES_CACHE.get(resName);
                if (cached != null) {
                    return cached;
                }
            }
            return new String[0];
        }
        Context context = getContext();
        if (context == null) {
            Log.e(LOG_TAG, "Context is null!!!");
            return new String[0];
        }
        try {
            Context appContext =
                    context.createPackageContext(appPackageName, CONTEXT_IGNORE_SECURITY);
            Resources res = appContext.getResources();
            int id = res.getIdentifier(resName, "array", appPackageName);
            Log.d(LOG_TAG, "getStringArray get id: " + id + ", for res: " + resName);
            if (id != 0) {
                String[] stringArr = res.getStringArray(id);
                S_STRING_ARRAY_RES_CACHE.put(resName, stringArr);
                return stringArr;
            }
        } catch (Throwable e) {
            Log.e(LOG_TAG, "Fail createPackageContext: " + Log.getStackTraceString(e));
        }
        return new String[0];
    }
Created by Tornaco on 2018/4/4 10:56.
God bless no bug!
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/app/AppResources.java