Skip to content

Instantly share code, notes, and snippets.

@zaki50
Created April 25, 2015 07:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaki50/176a1c3be44c44955ead to your computer and use it in GitHub Desktop.
Save zaki50/176a1c3be44c44955ead to your computer and use it in GitHub Desktop.
$ diff -Nur 22.1.0 22.1.1
diff -Nur 22.1.0/android/support/v4/view/LayoutInflaterCompatHC.java 22.1.1/android/support/v4/view/LayoutInflaterCompatHC.java
--- 22.1.0/android/support/v4/view/LayoutInflaterCompatHC.java 2015-04-20 18:55:38.000000000 +0900
+++ 22.1.1/android/support/v4/view/LayoutInflaterCompatHC.java 2015-04-23 18:58:12.000000000 +0900
@@ -49,7 +49,16 @@
final LayoutInflater.Factory2 factory2 = factory != null
? new FactoryWrapperHC(factory) : null;
inflater.setFactory2(factory2);
- forceSetFactory2(inflater, factory2);
+
+ final LayoutInflater.Factory f = inflater.getFactory();
+ if (f instanceof LayoutInflater.Factory2) {
+ // The merged factory is now set to getFactory(), but not getFactory2() (pre-v21).
+ // We will now try and force set the merged factory to mFactory2
+ forceSetFactory2(inflater, (LayoutInflater.Factory2) f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment