
42 Cal.App.3d 292 (1974)
116 Cal. Rptr. 690
THE PEOPLE, Plaintiff and Respondent,
v.
JAMES DOYLE NEWTON, Defendant and Appellant.
Docket No. 1621.
Court of Appeals of California, Fifth District.
August 9, 1974.
*294 COUNSEL
Glen W. Schofield, under appointment by the Court of Appeal, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Edward A. Hinz, Jr., Chief Assistant Attorney General, William E. James, Assistant Attorney General, and Marjory Winston Parker, Deputy Attorney General, for Plaintiff and Respondent.
OPINION
GARGANO, J.
On October 23, 1972, a man carrying a .32 automatic pistol and wearing a knit stocking ski cap pulled down over his face entered the Bottle n-Cork Liquor Store in Modesto, California; he approached James Hertzell, an employee at the store, and said, "Shh, I know there's somebody in the back." Then, the gunman ordered the employee to hand over the money in the cash register and his wallet; the wallet was embossed with a distinctive red maple leaf and contained Hertzell's driver's license, his Master Charge card and miscellaneous papers.
On the following day, appellant and a woman, later identified as Roberta Pack, approached the check stand of the Oakdale Superette in Oakdale, California; the couple had some groceries, and appellant handed Thomas Phillips, the manager, a Master Charge card in the name of "James E. Hertzell," and offered to use it to pay for the groceries. The manager asked appellant for identification, and appellant produced a Social Security card in Hertzell's name. Phillips indicated that the identification was insufficient, and appellant replied, "The card's good, you can call on it if you like." Phillips walked to the back of the store and called the Master Charge security department; he was told that the card was "hot." A few minutes later the manager of the store placed appellant under arrest and called the police. Then, when Miss Pack left the building the manager followed her to a car parked about a half block down the street and persuaded her to return to the store.
The call to the police was answered by Officer Gerald Hunt of the Oakdale Police Department. Hunt talked to the manager of the store and then called the Master Charge security department and verified that the Master Charge card in the name of "James E. Hertzell" was stolen. He also called his police dispatcher and was told that the card was taken during the robbery *295 of the Bottle n-Cork Liquor Store. The officer searched appellant's person, and when he found Hertzell's wallet in appellant's rear pocket, he placed appellant and Miss Pack in the patrol car of Deputy Sheriff Norman Henderson of the Stanislaus County Sheriff's office; Deputy Henderson had arrived at the scene to help his fellow officer. Afterward, the officers left to search the suspects' vehicle. Before leaving, however, Henderson activated a hidden tape recorder to record appellant and Miss Pack's conversations.
After searching the suspects' automobile, Hunt and Henderson transported appellant and Miss Pack to the Oakdale Police Department. Then the officers removed the suspects from the patrol car and searched that vehicle. They found a narcotics outfit or kit containing a measuring spoon under the back seat; lying under the front seat on the passenger side were two rolled up balloons and a needle; the balloons contained heroin. A brown packet containing some "ripped up" Master Charge receipts was found in Roberta Pack's purse. Henderson explained that he later listened to the tape recording; in summarizing the contents of the recording, the officer revealed that Miss Pack stated, "I have the outfit with me" and that there then was a discussion concerning the two balloons and Mr. Newton said, "Put them over there; push them up there with your foot." The officer explained that at one point Miss Pack stated, "The receipts from the credit cards, I tore them up and they are in my purse in a little brown package," and that Mr. Newton said, "This is a hard one, they could have me for five counts of armed robbery; we should have split."
On November 15, 1972, an information was filed in the Superior Court of Stanislaus County charging appellant with several felonies, including robbery in violation of section 211 of the Penal Code; appellant entered pleas of "not guilty" to all counts.
On January 8, 1973, appellant entered pleas of guilty to receiving stolen property in violation of subdivision 1 of section 496 of the Penal Code, a felony, theft by use of a stolen credit card in violation of section 484g of the Penal Code, a misdemeanor, and possession of a narcotic in violation of section 11500 (now § 11350) of the Health and Safety Code, a felony. The court then granted the People's motion to dismiss the robbery count. Appellant was sentenced to state prison on the felony counts for the terms prescribed by law, the sentences to run concurrently; on the misdemeanor count, appellant was sentenced to the term he already had served in the county jail; he also was given credit for time served in the county jail on his present sentences.
Appellant has appealed from the judgment entered on his plea of guilty, raising two issues: that his constitutional and statutory right of privacy was *296 violated; that the prosecutor failed to comply with the terms of the plea bargain.

THE RIGHT OF PRIVACY
(1) Appellant maintains that the tape recording of his conversation with Roberta Pack violated his constitutional right of privacy. He also maintains that the recording of his conversation with Miss Pack without his knowledge or consent violated subdivision (a) of section 632 of the Penal Code and section 2511 of title 18 of the United States Code, and that the contents of the recording were not admissible. (See Pen. Code, § 632, subd. (d); 18 U.S.C. § 2515.) Section 632 of the Penal Code prohibits the use of electronic recording devices to eavesdrop or record confidential communications; section 2511 of title 18 of the United States Code prohibits the wilful interception of oral communications.
There is no merit to appellant's contention. The constitutional right of privacy and the state and federal regulations prohibiting the recording of conversations are all designed to protect confidential communications. Therefore, the test as to whether these salutary laws have been violated depends upon whether the person whose conversation was recorded had a reasonable expectation of privacy at the time of the recording. Because appellant and Miss Pack were under arrest and in police custody in a patrol car when their conversation was recorded, it cannot be argued successfully that they had a reasonable and justifiable expectation of privacy at the time of the recording.
The case of People v. Todd, 26 Cal. App.3d 15, 17 [102 Cal. Rptr. 539], is apposite. In that case, as here, the defendant and his brother were arrested and placed in the rear of a patrol car. Also, in Todd, as in this case, the police activated a device for the purpose of recording the suspects' conversations during the officer's absence. The court stated: "... while it is clear in the case before us that defendant was subjectively unaware his incriminating statement would be recorded or otherwise heard by the investigating officers, we do not believe society is prepared to recognize his expectation of privacy to have been reasonable. Nor did the trial judge, who noted it was unlikely for defendant to have concluded he was being placed in the police car for a sight-seeing tour of the city."

THE PLEA BARGAIN
(2) On January 8, 1973, appellant, a deputy public defender and a deputy district attorney appeared before Superior Court Judge Jeremy C. Cook and informed the judge that appellant intended to plead guilty to *297 receiving stolen property, a felony, using a stolen credit card, a misdemeanor, and possession of heroin, a felony. Judge Cook promptly advised appellant of all his constitutional rights. He also thoroughly inquired into appellant's understanding of the nature and consequences of the proposed pleas. Then, the judge asked appellant if he was intending to plead guilty to each offense because "in truth and in fact you are guilty and for no other reason." Appellant answered in the affirmative; he admitted that he had possession of the stolen wallet and credit card and that he used the credit card, knowing that it was stolen; he said that he had possession of heroin and knew that it was a prohibited narcotic. At that point, Judge Cook inquired as to whether any promises had "been made to [appellant] as to what sentences would be imposed." The following transpired: "DEFENDANT NEWTON: No, sir. MR. CAMPBELL [Deputy Public Defender]: I might indicate there was a representation made to Newton regarding Count IV at the time of sentence, Mr.  the District Attorney would recommend C.R.C. MR. GIUDICE [Deputy District Attorney]: That is correct, but we don't feel it's a conditional plea, no, sir, but that representation is correct. THE COURT: I suppose if that recommendation is to be made it would be made to each of the counts, would it not? MR. GIUDICE: As to the heroin to which it would be appropriate, yes, sir. THE COURT: Appropriate with respect to any offense, as far as that goes, if it were appropriate. Let me ask you this, Mr. Newton: You understand the District Attorney is going to make that recommendation. DEFENDANT NEWTON: Yes, I do. THE COURT: You also understand that the matter of sentencing is solely up to the Court? DEFENDANT NEWTON: Yes, I realize that. THE COURT: You understand that is only one of the factors the Court will take into account in determining what sentence should be imposed? DEFENDANT NEWTON: Yes, sir."
On January 26, 1973, appellant, a different public defender and a different deputy district attorney, appeared before the Honorable Francis W. Halley for sentencing. The following took place: "THE COURT: People v. James Doyle Newton, No. 118994. This is the time fixed for hearing the Probation Officer's Report and for the pronouncement of judgment in this case. The court has received, considered and read the Probation Officer's Report and it is ordered filed. Mr. Stone, have you received a copy within the time required by law? MR. STONE [Deputy Public Defender]: Yes, we have received a copy within the time prescribed by law, but Your Honor, we would ask that the Court make any sentence imposed in this case run concurrently with any other time that Mr. Newton may have to serve. THE COURT: All right. Mr. Peluso, do you have any comments? MR. PELUSO [Deputy District Attorney]: No comments. THE COURT: *298 Does the Defendant waive formal arraignment for the purpose of pronouncement of judgment and sentence? MR. STONE: Yes."
This is a unique case, and when the totality of the circumstances is considered, it requires a unique solution.
First, it is true that the deputy district attorney told Judge Cook that he did not consider his representation to appellant that he would recommend commitment to the California Rehabilitation Center to be part of a "conditional plea." But, the deputy admitted that he made the representation, and when the judge asked appellant if he understood that the district attorney was going to recommend commitment to the rehabilitation facility, appellant answered in the affirmative. Clearly, the prosecutor made a commitment to the appellant in connection with the plea bargain, and the commitment should have been kept by the district attorney's office. (Santobello v. New York, 404 U.S. 257, 262 [30 L.Ed.2d 427, 433, 92 S.Ct. 495, 499].)
Second, this is not a case where a public official deliberately repudiated a promise made as a part of a plea bargain. On the contrary, it is apparent that the district attorney's commitment was not kept because the plea was taken by one judge, and appellant not only was sentenced by another judge, but a different deputy public defender and a different deputy district attorney were present at the sentencing proceeding. It cannot be said that the cases which articulate the "waiver" rule upon which the Attorney General relies are directly in point. For all the record shows, appellant, a layman, may not even have known that the district attorney's commitment was not kept.
Third, we are not faced with a situation whereby the court was committed by the plea bargain to any particular sentence or course of action; the court only was committed to consider the favorable recommendation of the district attorney before sentencing appellant. Nor can it be said with complete certainty that the trial judge would not have instituted proceedings for the commitment of appellant to the California Rehabilitation Center if the district attorney's recommendation had been made; the probation report shows that appellant had a pattern of criminality, but it also shows that he was addicted to the use of heroin and that he could have committed the crimes to which he pled guilty in order to feed that habit.
Because this case lends itself to specific performance under the alternative procedure delineated in Santobello v. New York, supra, 404 U.S. 257, 263 [30 L.Ed.2d 427, 433-434, 92 S.Ct. 495, 497], and People v. Johnson, 10 Cal.3d 868, 873 [112 Cal. Rptr. 556, 519 P.2d 604], the judgment sentencing appellant to state prison is reversed with directions to the trial *299 court to give the District Attorney of Stanislaus County the opportunity to comply with the commitment his deputy made in connection with appellant's pleas of guilty and, if the commitment is kept, to consider the district attorney's recommendation before resentencing appellant; if the district attorney should repudiate the commitment, appellant shall be permitted to withdraw his plea of guilty and enter a new plea.
Brown (G.A.), P.J., and Franson, J., concurred.
A petition for a rehearing was denied September 6, 1974, and appellant's petition for a hearing by the Supreme Court was denied October 2, 1974.
