content: package androidx.fragment.app;
  
  import android.app.Activity;
  import android.content.Context;
  import android.content.Intent;
  import android.content.IntentSender;
  import android.os.Bundle;
  import android.os.Handler;
  import android.view.LayoutInflater;
  import android.view.View;
  import androidx.core.app.ActivityCompat;
  import androidx.core.content.ContextCompat;
  import androidx.core.util.Preconditions;
  import java.io.FileDescriptor;
  import java.io.PrintWriter;
  
  public abstract class FragmentHostCallback<E> extends FragmentContainer {
      private final Activity mActivity;
      private final Context mContext;
      final FragmentManager mFragmentManager;
      private final Handler mHandler;
      private final int mWindowAnimations;
  
      FragmentHostCallback(Activity activity, Context context, Handler handler, int windowAnimations) {
          this.mFragmentManager = new FragmentManagerImpl();
          this.mActivity = activity;
          this.mContext = (Context) Preconditions.checkNotNull(context, "context == null");
          this.mHandler = (Handler) Preconditions.checkNotNull(handler, "handler == null");
          this.mWindowAnimations = windowAnimations;
      }
  
      /* JADX INFO: this call moved to the top of the method (can break code semantics) */
      public FragmentHostCallback(Context context, Handler handler, int windowAnimations) {
          this(context instanceof Activity ? (Activity) context : null, context, handler, windowAnimations);
      }
  
      FragmentHostCallback(FragmentActivity activity) {
          this(activity, activity, new Handler(), 0);
      }
  
      /* access modifiers changed from: package-private */
      public Activity getActivity() {
          return this.mActivity;
      }
  
      /* access modifiers changed from: package-private */
      public Context getContext() {
          return this.mContext;
      }
  
      /* access modifiers changed from: package-private */
      public Handler getHandler() {
          return this.mHandler;
      }
  
      public void onDump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
      }
  
      public View onFindViewById(int id) {
          return null;
      }
  
      public abstract E onGetHost();
  
      public LayoutInflater onGetLayoutInflater() {
          return LayoutInflater.from(this.mContext);
      }
  
      public int onGetWindowAnimations() {
          return this.mWindowAnimations;
      }
  
      public boolean onHasView() {
          return true;
      }
  
      public boolean onHasWindowAnimations() {
          return true;
      }
  
      @Deprecated
      public void onRequestPermissionsFromFragment(Fragment fragment, String[] permissions, int requestCode) {
      }
  
      public boolean onShouldSaveFragmentState(Fragment fragment) {
          return true;
      }
  
      public boolean onShouldShowRequestPermissionRationale(String permission) {
          return false;
      }
  
      public void onStartActivityFromFragment(Fragment fragment, Intent intent, int requestCode) {
          onStartActivityFromFragment(fragment, intent, requestCode, (Bundle) null);
      }
  
      public void onStartActivityFromFragment(Fragment fragment, Intent intent, int requestCode, Bundle options) {
          if (requestCode == -1) {
              ContextCompat.startActivity(this.mContext, intent, options);
              return;
          }
          throw new IllegalStateException("Starting activity with a requestCode requires a FragmentActivity host");
      }
  
      @Deprecated
      public void onStartIntentSenderFromFragment(Fragment fragment, IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) throws IntentSender.SendIntentException {
          if (requestCode == -1) {
              ActivityCompat.startIntentSenderForResult(this.mActivity, intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags, options);
          } else {
              throw new IllegalStateException("Starting intent sender with a requestCode requires a FragmentActivity host");
          }
      }
  
      public void onSupportInvalidateOptionsMenu() {
      }
  }
  