ActivityOptionsCompat.java 9.82 KB
package android.support.v4.app;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.ActivityOptions;
import android.app.PendingIntent;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v4.util.Pair;
import android.view.View;
import cd;
import ce;
import cf;
import cg;

public class ActivityOptionsCompat
{
  public static final String EXTRA_USAGE_TIME_REPORT = "android.activity.usage_time";
  public static final String EXTRA_USAGE_TIME_REPORT_PACKAGES = "android.usage_time_packages";
  
  public static ActivityOptionsCompat makeBasic()
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeBasic()));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeBasic()));
    }
    return new ActivityOptionsCompat();
  }
  
  public static ActivityOptionsCompat makeClipRevealAnimation(View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeClipRevealAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeClipRevealAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)));
    }
    return new ActivityOptionsCompat();
  }
  
  public static ActivityOptionsCompat makeCustomAnimation(Context paramContext, int paramInt1, int paramInt2)
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeCustomAnimation(paramContext, paramInt1, paramInt2)));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeCustomAnimation(paramContext, paramInt1, paramInt2)));
    }
    if (Build.VERSION.SDK_INT >= 21) {
      return new a(new cd(ActivityOptions.makeCustomAnimation(paramContext, paramInt1, paramInt2)));
    }
    if (Build.VERSION.SDK_INT >= 16) {
      return new d(new cg(ActivityOptions.makeCustomAnimation(paramContext, paramInt1, paramInt2)));
    }
    return new ActivityOptionsCompat();
  }
  
  public static ActivityOptionsCompat makeScaleUpAnimation(View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeScaleUpAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeScaleUpAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)));
    }
    if (Build.VERSION.SDK_INT >= 21) {
      return new a(new cd(ActivityOptions.makeScaleUpAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)));
    }
    if (Build.VERSION.SDK_INT >= 16) {
      return new d(new cg(ActivityOptions.makeScaleUpAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)));
    }
    return new ActivityOptionsCompat();
  }
  
  public static ActivityOptionsCompat makeSceneTransitionAnimation(Activity paramActivity, View paramView, String paramString)
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeSceneTransitionAnimation(paramActivity, paramView, paramString)));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeSceneTransitionAnimation(paramActivity, paramView, paramString)));
    }
    if (Build.VERSION.SDK_INT >= 21) {
      return new a(new cd(ActivityOptions.makeSceneTransitionAnimation(paramActivity, paramView, paramString)));
    }
    return new ActivityOptionsCompat();
  }
  
  public static ActivityOptionsCompat makeSceneTransitionAnimation(Activity paramActivity, Pair<View, String>... paramVarArgs)
  {
    Object localObject = null;
    String[] arrayOfString;
    if (Build.VERSION.SDK_INT >= 21)
    {
      if (paramVarArgs == null) {
        break label136;
      }
      localObject = new View[paramVarArgs.length];
      arrayOfString = new String[paramVarArgs.length];
      int i = 0;
      while (i < paramVarArgs.length)
      {
        localObject[i] = ((View)paramVarArgs[i].first);
        arrayOfString[i] = ((String)paramVarArgs[i].second);
        i += 1;
      }
      paramVarArgs = arrayOfString;
    }
    for (;;)
    {
      if (Build.VERSION.SDK_INT >= 24) {
        return new c(cf.a(paramActivity, (View[])localObject, paramVarArgs));
      }
      if (Build.VERSION.SDK_INT >= 23) {
        return new b(ce.a(paramActivity, (View[])localObject, paramVarArgs));
      }
      return new a(cd.a(paramActivity, (View[])localObject, paramVarArgs));
      return new ActivityOptionsCompat();
      label136:
      arrayOfString = null;
      paramVarArgs = (Pair<View, String>[])localObject;
      localObject = arrayOfString;
    }
  }
  
  public static ActivityOptionsCompat makeTaskLaunchBehind()
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeTaskLaunchBehind()));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeTaskLaunchBehind()));
    }
    if (Build.VERSION.SDK_INT >= 21) {
      return new a(new cd(ActivityOptions.makeTaskLaunchBehind()));
    }
    return new ActivityOptionsCompat();
  }
  
  public static ActivityOptionsCompat makeThumbnailScaleUpAnimation(View paramView, Bitmap paramBitmap, int paramInt1, int paramInt2)
  {
    if (Build.VERSION.SDK_INT >= 24) {
      return new c(new cf(ActivityOptions.makeThumbnailScaleUpAnimation(paramView, paramBitmap, paramInt1, paramInt2)));
    }
    if (Build.VERSION.SDK_INT >= 23) {
      return new b(new ce(ActivityOptions.makeThumbnailScaleUpAnimation(paramView, paramBitmap, paramInt1, paramInt2)));
    }
    if (Build.VERSION.SDK_INT >= 21) {
      return new a(new cd(ActivityOptions.makeThumbnailScaleUpAnimation(paramView, paramBitmap, paramInt1, paramInt2)));
    }
    if (Build.VERSION.SDK_INT >= 16) {
      return new d(new cg(ActivityOptions.makeThumbnailScaleUpAnimation(paramView, paramBitmap, paramInt1, paramInt2)));
    }
    return new ActivityOptionsCompat();
  }
  
  @Nullable
  public Rect getLaunchBounds()
  {
    return null;
  }
  
  public void requestUsageTimeReport(PendingIntent paramPendingIntent) {}
  
  public ActivityOptionsCompat setLaunchBounds(@Nullable Rect paramRect)
  {
    return null;
  }
  
  public Bundle toBundle()
  {
    return null;
  }
  
  public void update(ActivityOptionsCompat paramActivityOptionsCompat) {}
  
  @TargetApi(21)
  @RequiresApi(21)
  static final class a
    extends ActivityOptionsCompat
  {
    private final cd a;
    
    a(cd paramcd)
    {
      this.a = paramcd;
    }
    
    public final Bundle toBundle()
    {
      return this.a.a.toBundle();
    }
    
    public final void update(ActivityOptionsCompat paramActivityOptionsCompat)
    {
      if ((paramActivityOptionsCompat instanceof a))
      {
        Object localObject = (a)paramActivityOptionsCompat;
        paramActivityOptionsCompat = this.a;
        localObject = ((a)localObject).a;
        paramActivityOptionsCompat.a.update(((cd)localObject).a);
      }
    }
  }
  
  @TargetApi(23)
  @RequiresApi(23)
  static final class b
    extends ActivityOptionsCompat
  {
    private final ce a;
    
    b(ce paramce)
    {
      this.a = paramce;
    }
    
    public final void requestUsageTimeReport(PendingIntent paramPendingIntent)
    {
      this.a.a.requestUsageTimeReport(paramPendingIntent);
    }
    
    public final Bundle toBundle()
    {
      return this.a.a.toBundle();
    }
    
    public final void update(ActivityOptionsCompat paramActivityOptionsCompat)
    {
      if ((paramActivityOptionsCompat instanceof b))
      {
        Object localObject = (b)paramActivityOptionsCompat;
        paramActivityOptionsCompat = this.a;
        localObject = ((b)localObject).a;
        paramActivityOptionsCompat.a.update(((ce)localObject).a);
      }
    }
  }
  
  @TargetApi(24)
  @RequiresApi(24)
  static final class c
    extends ActivityOptionsCompat
  {
    private final cf a;
    
    c(cf paramcf)
    {
      this.a = paramcf;
    }
    
    public final Rect getLaunchBounds()
    {
      return this.a.a.getLaunchBounds();
    }
    
    public final void requestUsageTimeReport(PendingIntent paramPendingIntent)
    {
      this.a.a.requestUsageTimeReport(paramPendingIntent);
    }
    
    public final ActivityOptionsCompat setLaunchBounds(@Nullable Rect paramRect)
    {
      return new c(new cf(this.a.a.setLaunchBounds(paramRect)));
    }
    
    public final Bundle toBundle()
    {
      return this.a.a.toBundle();
    }
    
    public final void update(ActivityOptionsCompat paramActivityOptionsCompat)
    {
      if ((paramActivityOptionsCompat instanceof c))
      {
        Object localObject = (c)paramActivityOptionsCompat;
        paramActivityOptionsCompat = this.a;
        localObject = ((c)localObject).a;
        paramActivityOptionsCompat.a.update(((cf)localObject).a);
      }
    }
  }
  
  @TargetApi(16)
  @RequiresApi(16)
  static final class d
    extends ActivityOptionsCompat
  {
    private final cg a;
    
    d(cg paramcg)
    {
      this.a = paramcg;
    }
    
    public final Bundle toBundle()
    {
      return this.a.a.toBundle();
    }
    
    public final void update(ActivityOptionsCompat paramActivityOptionsCompat)
    {
      if ((paramActivityOptionsCompat instanceof d))
      {
        Object localObject = (d)paramActivityOptionsCompat;
        paramActivityOptionsCompat = this.a;
        localObject = ((d)localObject).a;
        paramActivityOptionsCompat.a.update(((cg)localObject).a);
      }
    }
  }
}


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