From cb941157a2282191486f7bbefb961289401f6caa Mon Sep 17 00:00:00 2001 From: Clara Bayarri Date: Tue, 3 Oct 2017 15:37:01 +0100 Subject: [PATCH] Fix NPE in ActivityThread Calling LoadedApk.getResources() instead of accessing its mResources directly accounts for the case where this might not have been initialized. Bug: 67327250 Test: none Change-Id: Iaa392a90eefb60ad479cedf8c882976dbe390387 --- core/java/android/app/ActivityThread.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index f01feea14e73a..45f7eba2af02f 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -5766,7 +5766,7 @@ public final class ActivityThread { final int preloadedFontsResource = info.metaData.getInt( ApplicationInfo.METADATA_PRELOADED_FONTS, 0); if (preloadedFontsResource != 0) { - data.info.mResources.preloadFonts(preloadedFontsResource); + data.info.getResources().preloadFonts(preloadedFontsResource); } } } catch (RemoteException e) {