/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.support.v4.view;

import android.animation.ValueAnimator;
import android.view.View;

class ViewPropertyAnimatorCompatKK {

    public static void setUpdateListener(final View view,
            final ViewPropertyAnimatorUpdateListener listener) {
        view.animate().setUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator valueAnimator) {
                listener.onAnimationUpdate(view);
            }
        });
    }

}

@@ -887,41 +887,115 @@
     
-view.animate().setUpdateListener(
+ValueAnimator.AnimatorUpdateListener wrapped = null;%0A        if (listener != null) %7B%0A            wrapped = 
 new 
@@ -1031,24 +1031,28 @@
 istener() %7B%0A
+    
             
@@ -1069,24 +1069,28 @@
             
+    
 public void 
@@ -1154,16 +1154,20 @@
         
+    
 listener
@@ -1204,16 +1204,20 @@
         
+   
+ 
 %7D%0A      
@@ -1218,17 +1218,81 @@
         
-%7D
+    %7D;%0A        %7D%0A        view.animate().setUpdateListener(wrapped
 );%0A    %7D

Fix NPE when calling setUpdateListener(null)