code: public static ToastCompat makeText(Context context, CharSequence text, int duration) {
      // We cannot pass the SafeToastContext to Toast.makeText() because
      // the View will unwrap the base context and we are in vain.
      @SuppressLint("ShowToast")
      Toast toast = Toast.makeText(context, text, duration);
      setContextCompat(toast.getView(), new SafeToastContext(context, toast));
      return new ToastCompat(context, toast);
    }
docs: Make a standard toast that just contains a text view.
  
  @param context The context to use.  Usually your {@link android.app.Application}
  or {@link android.app.Activity} object.
  @param text The text to show.  Can be formatted text.
  @param duration How long to display the message.  Either {@link #LENGTH_SHORT} or
  {@link #LENGTH_LONG}