In a notable decision on January 22, 2019, the Supreme Court of the United States reinforced the pre-AIA interpretation of “on sale” language and held that a “secret sale” could invalidate a patent. The sale of a product, whether under private contract or to the public, can bar an assignee from a granted patent.
The SCOTUS evaluated the case of HELSINN HEALTHCARE S. A. v. TEVA
PHARMACEUTICALS USA, INC., ET AL. with the task of determining “whether the sale of an invention to a third party who is contractually obligated to keep the invention confidential places the invention ‘on sale’ within the meaning of §102(a).” 
The Court referred to 35 U.S.C. 102 Conditions for patentability; novelty:
(a) NOVELTY; PRIOR ART.—A person shall be entitled to a patent unless—
- (1) the claimed invention was patented, described in a printed publication, or in public use, on sale, or otherwise available to the public before the effective filing date of the claimed invention; or… 
Also relevant is 35 U.S.C. 102 (PRE‑AIA) Conditions for patentability; novelty and loss of right to patent: A person shall be entitled to a patent unless—
(a) the invention was known or used by others in this country, or patented or described in a printed publication in this or a foreign country, before the invention thereof by the applicant for patent, or… 
Here, the phrase, “known or used” refers to public availability of the information and the absence of an attempt to keep it secret.
A contract between Helsinn and Teva shared Helsinn’s proprietary information with the other company and held Teva to a level of confidentiality. Specifically, the dispute addressed the dosage (0.25 mg.) of Helsinn’s drug to alleviate the side effects of chemotherapy for cancer patients. With Helsinn’s permission as part of their agreement, Teva produced and began selling a generic 0.25mg version of the drug. Teva was only beholden to keep confidential the relevant proprietary information.
Almost two years after their agreement, Helsinn filed for a patent for the drug at the 0.25mg dosage. Then, when Teva wanted to place the drug on the market, Helsinn sued them for infringement. In response, Teva called out the provisions stated in 35 U.S.C. 102(a) to say that Helsinn’s claim to a patent was invalid; therefore, they were not infringing.
The District Court ruled in favor of Helsinn because “the AIA’s ‘on sale’ provision did not apply because the public disclosure of the agreements did not disclose the 0.25 mg dose.” At the next level, however, the Federal Circuit ruled the opposite. It saw the sale as a sale, and public disclosure of the invention, regardless of any missing details. The Supreme Court upheld the patent bar based on a sale status, ruling in Teva’s favor.
The Decision states:
Held: A commercial sale to a third party who is required to keep the invention confidential may place the invention “on sale” under §102(a). The patent statute in force immediately before the AIA included an on-sale bar. This Court’s precedent interpreting that provision supports the view that a sale or offer of sale need not make an invention available to the public to constitute invalidating prior art… The Federal Circuit had made explicit what was implicit in this Court’s pre-AIA precedent, holding that “secret sales” could invalidate a patent.
This decision resolves an ambiguity after the 2011 Leahy–Smith America Invents Act (AIA). It means that the status quo is going to continue regarding “secret sale” (i.e. it can start a grace period/clock for filing patent applications), just as before the AIA. The purpose of the term being added to “or otherwise available to the public” in AIA 35 U.S.C. 102(a)(2) does not change the meaning of earlier terms, such as “on sale” from earlier case law. In other words, this term “or otherwise available to the public” is generally meant to expand available prior art, not restrict or re-define the previous rules for secret sale.
References https://www.supremecourt.gov/opinions/18pdf/17-1229_2co3.pdf.  https://www.uspto.gov/web/offices/pac/mpep/mpep-9015-appx-l.html#al_d1fbe1_234ed_52.  https://www.bitlaw.com/source/35usc/102_(pre%E2%80%91AIA).html.