
233 S.W.3d 1 (2007)
Daniel Lee SANDIFER, Appellant
v.
The STATE of Texas, Appellee.
No. 01-06-01102-CR.
Court of Appeals of Texas, Houston (1st Dist.).
June 15, 2007.
J. Sidney Crowley, Houston, TX, for appellant.
Charles A. Rosenthal, Jr., District Attorney-Harris County, Alan Curry, Assistant District Attorney, Houston, TX, for appellee.
Panel consists of Chief Justice RADACK and Justice KEYES, and HIGLEY.

OPINION
LAURA CARTER HIGLEY, Justice.
Appellant, Daniel Lee Sandifer, appeals the trial court's denial of his pre-conviction application for writ of habeas corpus. In one issue, appellant contends that State's re-prosecution violates his constitutional guarantee against double jeopardy.
We affirm.

Background
Appellant, Daniel Lee Sandifer, was indicted for the aggravated sexual assault of twelve-year-old C.M. The case was tried to a jury. At trial, the State presented C.M., who gave a detailed account of the sexual assault, C.M.'s mother, and a forensic interviewer. The State then called the investigating detective, who testified that, during an interview at the police station, appellant had denied sexually assaulting C.M. The assistant district attorney prosecuting the case then elicited testimony from the detective that appellant had not taken a polygraph test, though one was offered. At that point, the defense objected and was granted a mistrial based on the polygraph line of questioning.
Appellant filed an application for writ of habeas corpus, asserting that the double jeopardy clauses of the state and federal constitutions barred re-prosecution of the aggravated-sexual-assault offense. Appellant contended that the assistant district attorney had engaged in "prosecutorial *2 misconduct" by eliciting testimony that appellant did not take a polygraph examination when one had been offered to him.
During the habeas corpus hearing, the assistant district attorney testified that she had been an assistant district attorney for three years. She explained that the prosecution against appellant was her first sexual assault trial and that she was "a brand new number two prosecutor." The assistant district attorney testified that, when she questioned the detective, she knew that the results of polygraph tests were inadmissible, but believed that she could ask whether appellant had refused a polygraph examination. When appellant's counsel inquired whether she had asked about the polygraph because "the testimony was not going as [she] expected," the assistant district attorney replied, "Absolutely not. The case was going beautifully." The assistant district attorney also testified that, when the mistrial was granted, she was "very, very, upset." At the conclusion of the hearing, the trial court denied appellant's application for writ of habeas corpus.
In one issue, appellant contends that the trial court "reversibly erred" by denying his pre-conviction application for writ of habeas corpus. Appellant contends that, because of prosecutorial misconduct, his retrial is barred by the double jeopardy provisions of both the state and federal constitutions.

Standard of Review
Generally, an appellate court reviews a trial court's decision to grant or deny relief on a writ of habeas corpus under an abuse of discretion standard of review. See Ex parte Ayers, 921 S.W.2d 438, 440 (Tex. App.-Houston [1st Dist.] 1996, no pet.). In reviewing the trial court's decision to grant or deny habeas corpus relief, we view the evidence in the light most favorable to the trial court's ruling. See Ex parte Masonheimer, 220 S.W.3d 494, 507 (Tex.Crim. App.2007).
We afford almost total deference to the trial judge's determination of historical facts supported by the record, especially when the fact findings are based on an evaluation of credibility and demeanor. See Guzman v. State, 955 S.W.2d 85, 89 (Tex.Crim.App.1997). And we afford the same amount of deference to the trial judge's rulings on applications of law to fact questions if the resolution of those ultimate questions turns on an evaluation of credibility and demeanor. Id. If the resolution of those ultimate questions turns on an application of legal standards, however, we review the determination de novo. Id.

Applicable Double Jeopardy Law
In Oregon v. Kennedy, the United States Supreme Court held that the Fifth Amendment's Double Jeopardy Clause barred retrial after a defendant successfully moved for mistrial only when it was shown that the prosecutor engaged in conduct that was "intended to provoke the defendant into moving for a mistrial." 456 U.S. 667, 679, 102 S.Ct. 2083, 2091, 72 L.Ed.2d 416 (1982). In Bauder v. State, the Court of Criminal Appeals interpreted the Double Jeopardy provision of the Texas Constitution more expansively, to cover "reckless" conduct, holding that retrial would also be barred "when the prosecutor was aware but consciously disregarded the risk that an objectionable event for which he was responsible would require a mistrial at the defendant's request." 921 S.W.2d 696, 699 (Tex.Crim.App.1996). In Ex parte Peterson, the Court of Criminal Appeals re-affirmed and clarified the standards enunciated in Bauder. 117 S.W.3d 804 (Tex.Crim.App.2003).
*3 The Court of Criminal Appeals recently overruled Bauder and Peterson in Ex parte Lewis, 219 S.W.3d 335 (Tex.Crim. App.2007). The court held that "the proper rule under the Texas Constitution is the rule articulated by the United States Supreme Court in Oregon v. Kennedy," i.e., whether the prosecutor intended to provoke the defendant into moving for a mistrial Id. at 337.
Two months later, the Court of Criminal Appeals decided Ex parte Masonheimer. There, the court held that the standard enunciated in Oregon v. Kennedy barred retrial "under the unique circumstances of that case" because the State had intentionally failed to disclose exculpatory evidence with the specific intent to avoid the possibility of an acquittal. Masonheimer, 220 S.W.3d at 507. The Masonheimer court reasoned that "in a case like this, a defendant suffers the same harm as when the State intentionally `goads' or provokes the defendant into moving for a mistrial." Id.

Analysis
In this case, the trial court made the following oral findings and conclusions when it denied appellant's request for habeas corpus relief:
Clearly, the defense has not met its burden. And for the record, the Court relied on its personal observations in noting that [the assistant district attorney] was extremely upset. And, furthermore, as [defense counsel] well knows, as does the Court, that the complainant in this case, particularly her parents, were very protective of her and did not even want the prosecutor to meet with her until it was sure the case was going to trial. And both [defense counsel] and I were both aware of that. And so clearly based upon everything I saw this was a simple mistake. Given the particular circumstances of this case I did not believe that an instruction to disregard could cure the harm. The case in the Court's  based on the Court's observations were [sic] not going badly for the State at all. The complainant made a very fairly [sic] good witness for the State. There is nothing to indicate that in anyway this was an attempt to goat [sic] the defense into asking for a mistrial in order to deep six the jury that had been chosen.
Appellant contends that the trial court abused its discretion by denying his requested habeas corpus relief, in part, based on the Bauder standard, as amplified in Peterson. As mentioned, Bauder and Peterson have been overruled and are no longer governing authority.
Appellant also asserts, "The inadmissibility of polygraph tests is so well settled that the prosecutor had to have been aware of the risk that Appellant would have to move for a mistrial, despite her denials." We disagree. The case law demonstrates that the law is not "so well settled" with regard to whether admission of evidence that the defendant refused to take a polygraph always requires a mistrial. See Kugler v. State, 902 S.W.2d 594, 595-97 (Tex.App.-Houston [1st Dist.] 1995 pet. ref'd) (recognizing and discussing difficulty in determining whether mistrial should be declared when error involves evidence that defendant refused to take polygraph exam rather than involving clearly inadmissible evidence regarding results of exam).
Here, the evidence, when viewed in favor of the trial court's ruling, supports the trial court's findings. The trial court, as the fact finder, chose to believe the assistant district attorney's explanation for asking about the polygraph exam. Because the trial court's findings  particularly those relating to whether the assistant district attorney's conduct was intentional  are based on an evaluation of the assistant district attorney's credibility and demeanor, *4 we defer to the trial court's findings. See Guzman, 955 S.W.2d at 89. In this regard, the trial court found that the assistant district attorney made "a simple mistake," was "extremely upset," and had no intent to goad the defense into asking for a mistrial. These findings support a conclusion that, under the standard enunciated in Oregon v. Kennedy, the State's retrial of appellant is not jeopardy barred under the federal constitution or the state constitution. This is true whether the standard is as applied in Lewis  whether the complained-of conduct was intended to provoke a mistrial  or whether it is as applied in Masonheimer  whether the complained of conduct was intended to avoid the possibility of acquittal. See Lewis, 219 S.W.3d at 336; Masonheimer, 220 S.W.3d at 507.
We hold that the trial court did not abuse its discretion by denying appellant's pre-conviction application for writ of habeas corpus.
We overrule appellant's sole issue.

Conclusion
We affirm the judgment of the trial court denying appellant's request for habeas corpus relief.
