am.java 9.21 KB
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
import android.support.transition.TransitionPort;
import android.support.transition.TransitionPort.TransitionListenerAdapter;
import android.support.transition.TransitionValues;
import android.support.v4.view.ViewCompat;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import java.util.Map;

@TargetApi(14)
@RequiresApi(14)
final class am
  extends bw
{
  private static boolean a = false;
  private int b;
  
  public am()
  {
    this(3);
  }
  
  public am(int paramInt)
  {
    this.b = paramInt;
  }
  
  private static Animator a(View paramView, float paramFloat1, float paramFloat2, AnimatorListenerAdapter paramAnimatorListenerAdapter)
  {
    ObjectAnimator localObjectAnimator = null;
    if (paramFloat1 == paramFloat2)
    {
      paramView = localObjectAnimator;
      if (paramAnimatorListenerAdapter != null)
      {
        paramAnimatorListenerAdapter.onAnimationEnd(null);
        paramView = localObjectAnimator;
      }
    }
    do
    {
      return paramView;
      localObjectAnimator = ObjectAnimator.ofFloat(paramView, "alpha", new float[] { paramFloat1, paramFloat2 });
      if (a) {
        new StringBuilder("Created animator ").append(localObjectAnimator);
      }
      paramView = localObjectAnimator;
    } while (paramAnimatorListenerAdapter == null);
    localObjectAnimator.addListener(paramAnimatorListenerAdapter);
    return localObjectAnimator;
  }
  
  public final Animator a(ViewGroup paramViewGroup, TransitionValues paramTransitionValues1, int paramInt1, final TransitionValues paramTransitionValues2, int paramInt2)
  {
    if (((this.b & 0x1) != 1) || (paramTransitionValues2 == null)) {
      return null;
    }
    paramTransitionValues2 = paramTransitionValues2.view;
    if (a) {
      if (paramTransitionValues1 == null) {
        break label112;
      }
    }
    label112:
    for (paramViewGroup = paramTransitionValues1.view;; paramViewGroup = null)
    {
      new StringBuilder("Fade.onAppear: startView, startVis, endView, endVis = ").append(paramViewGroup).append(", ").append(paramInt1).append(", ").append(paramTransitionValues2).append(", ").append(paramInt2);
      paramTransitionValues2.setAlpha(0.0F);
      a(new TransitionPort.TransitionListenerAdapter()
      {
        boolean a = false;
        float b;
        
        public final void onTransitionCancel(TransitionPort paramAnonymousTransitionPort)
        {
          paramTransitionValues2.setAlpha(1.0F);
          this.a = true;
        }
        
        public final void onTransitionEnd(TransitionPort paramAnonymousTransitionPort)
        {
          if (!this.a) {
            paramTransitionValues2.setAlpha(1.0F);
          }
        }
        
        public final void onTransitionPause(TransitionPort paramAnonymousTransitionPort)
        {
          this.b = paramTransitionValues2.getAlpha();
          paramTransitionValues2.setAlpha(1.0F);
        }
        
        public final void onTransitionResume(TransitionPort paramAnonymousTransitionPort)
        {
          paramTransitionValues2.setAlpha(this.b);
        }
      });
      return a(paramTransitionValues2, 0.0F, 1.0F, null);
    }
  }
  
  public final void a(TransitionValues paramTransitionValues)
  {
    super.a(paramTransitionValues);
    int[] arrayOfInt = new int[2];
    paramTransitionValues.view.getLocationOnScreen(arrayOfInt);
    paramTransitionValues.values.put("android:fade:screenX", Integer.valueOf(arrayOfInt[0]));
    paramTransitionValues.values.put("android:fade:screenY", Integer.valueOf(arrayOfInt[1]));
  }
  
  public final Animator b(final ViewGroup paramViewGroup, TransitionValues paramTransitionValues1, int paramInt1, final TransitionValues paramTransitionValues2, final int paramInt2)
  {
    if ((this.b & 0x2) != 2) {
      return null;
    }
    final Object localObject1;
    label22:
    label34:
    Object localObject3;
    final Object localObject2;
    if (paramTransitionValues1 != null)
    {
      localObject1 = paramTransitionValues1.view;
      if (paramTransitionValues2 == null) {
        break label244;
      }
      paramTransitionValues2 = paramTransitionValues2.view;
      if (a) {
        new StringBuilder("Fade.onDisappear: startView, startVis, endView, endVis = ").append(localObject1).append(", ").append(paramInt1).append(", ").append(paramTransitionValues2).append(", ").append(paramInt2);
      }
      if ((paramTransitionValues2 != null) && (paramTransitionValues2.getParent() != null)) {
        break label355;
      }
      if (paramTransitionValues2 == null) {
        break label250;
      }
      localObject3 = null;
      localObject2 = paramTransitionValues2;
      localObject1 = paramTransitionValues2;
      paramTransitionValues2 = (TransitionValues)localObject3;
    }
    for (;;)
    {
      label117:
      if (localObject1 != null)
      {
        paramInt1 = ((Integer)paramTransitionValues1.values.get("android:fade:screenX")).intValue();
        int i = ((Integer)paramTransitionValues1.values.get("android:fade:screenY")).intValue();
        paramTransitionValues1 = new int[2];
        paramViewGroup.getLocationOnScreen(paramTransitionValues1);
        ViewCompat.offsetLeftAndRight((View)localObject1, paramInt1 - paramTransitionValues1[0] - ((View)localObject1).getLeft());
        ViewCompat.offsetTopAndBottom((View)localObject1, i - paramTransitionValues1[1] - ((View)localObject1).getTop());
        ((bq)br.c(paramViewGroup)).a((View)localObject1);
        a((View)localObject2, 1.0F, 0.0F, new AnimatorListenerAdapter()
        {
          public final void onAnimationEnd(Animator paramAnonymousAnimator)
          {
            localObject2.setAlpha(1.0F);
            if (paramTransitionValues2 != null) {
              paramTransitionValues2.setVisibility(paramInt2);
            }
            if (localObject1 != null) {
              ((bq)br.c(paramViewGroup)).b(localObject1);
            }
          }
        });
        localObject1 = null;
        break label22;
        label244:
        paramTransitionValues2 = null;
        break label34;
        label250:
        if (localObject1 == null) {
          break label475;
        }
        if (((View)localObject1).getParent() == null)
        {
          paramTransitionValues2 = null;
          localObject3 = localObject1;
          localObject2 = localObject1;
          localObject1 = localObject3;
          continue;
        }
        if ((!(((View)localObject1).getParent() instanceof View)) || (((View)localObject1).getParent().getParent() != null)) {
          break label475;
        }
        paramInt1 = ((View)((View)localObject1).getParent()).getId();
        if ((paramInt1 == -1) || (paramViewGroup.findViewById(paramInt1) == null) || (!this.q)) {
          break label466;
        }
        paramTransitionValues2 = (TransitionValues)localObject1;
      }
      for (;;)
      {
        localObject3 = null;
        localObject2 = paramTransitionValues2;
        paramTransitionValues2 = (TransitionValues)localObject3;
        break label117;
        label355:
        if (paramInt2 == 4)
        {
          localObject1 = paramTransitionValues2;
          localObject3 = null;
          localObject2 = paramTransitionValues2;
          paramTransitionValues2 = (TransitionValues)localObject1;
          localObject1 = localObject3;
          break label117;
        }
        if (localObject1 == paramTransitionValues2)
        {
          localObject1 = paramTransitionValues2;
          localObject3 = null;
          localObject2 = paramTransitionValues2;
          paramTransitionValues2 = (TransitionValues)localObject1;
          localObject1 = localObject3;
          break label117;
        }
        paramTransitionValues2 = null;
        localObject3 = localObject1;
        localObject2 = localObject1;
        localObject1 = localObject3;
        break label117;
        if (paramTransitionValues2 == null) {
          break;
        }
        paramTransitionValues2.setVisibility(0);
        a((View)localObject2, 1.0F, 0.0F, new AnimatorListenerAdapter()
        {
          boolean a = false;
          float b = -1.0F;
          
          public final void onAnimationCancel(Animator paramAnonymousAnimator)
          {
            this.a = true;
            if (this.b >= 0.0F) {
              localObject2.setAlpha(this.b);
            }
          }
          
          public final void onAnimationEnd(Animator paramAnonymousAnimator)
          {
            if (!this.a) {
              localObject2.setAlpha(1.0F);
            }
            if ((paramTransitionValues2 != null) && (!this.a)) {
              paramTransitionValues2.setVisibility(paramInt2);
            }
            if (localObject1 != null) {
              ((bq)br.c(paramViewGroup)).a(localObject1);
            }
          }
        });
        label466:
        paramTransitionValues2 = null;
        localObject1 = null;
      }
      label475:
      paramTransitionValues2 = null;
      localObject2 = null;
      localObject1 = null;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/am.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */