Add a dexItemFactory getter to AppView This CL also fixes a NPE that arises from the call super(null, null) in AppViewWithLiveness to the AppView constructor. Change-Id: I948d812b1cb39e78c9cc2e57e591305798f4d985
diff --git a/src/main/java/com/android/tools/r8/graph/AppView.java b/src/main/java/com/android/tools/r8/graph/AppView.java index 8e468a1..64a4ce4 100644 --- a/src/main/java/com/android/tools/r8/graph/AppView.java +++ b/src/main/java/com/android/tools/r8/graph/AppView.java
@@ -14,7 +14,7 @@ public AppView(T appInfo, GraphLense graphLense) { this.appInfo = appInfo; - this.dexItemFactory = appInfo.dexItemFactory; + this.dexItemFactory = appInfo != null ? appInfo.dexItemFactory : null; this.graphLense = graphLense; } @@ -61,6 +61,11 @@ } @Override + public DexItemFactory getDexItemFactory() { + return AppView.this.dexItemFactory; + } + + @Override public GraphLense getGraphLense() { return AppView.this.getGraphLense(); }