SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Electronic Communications Privacy 
Act Modernization Act of 2012''.

SEC. 2. REQUIREMENT FOR WARRANT FOR ACCESS TO CONTENTS; NOTICE RULES.

    (a) Standard for Access to Stored Communications.--
            (1) In general.--Section 2703(a) of title 18, United States 
        Code, is amended to read as follows:
    ``(a) Contents of Wire or Electronic Communications.--(1) A 
governmental entity may require the disclosure by a provider of 
electronic communication service or remote computing service of the 
contents of a wire or electronic communication that is stored, held or 
maintained by that service only pursuant to--
            ``(A) a warrant complying with the Federal Rules of 
        Criminal Procedure and issued by a court with jurisdiction over 
        the offense under investigation or equivalent State warrant; or
            ``(B) a court under title I or title VII of the Foreign 
        Intelligence Surveillance Act of 1978 (50 U.S.C. 1801 et seq. 
        and 1881 et seq.).
    ``(2) Unless delayed notice is ordered under section 2705, not 
later than three days after a governmental entity receives contents of 
a communication under this subsection, the governmental entity shall 
notify the subscriber or customer concerned of the matters required in 
notices under, and by the means described in, paragraphs (4) and (5) of 
section 2705(a).''.
            (2) Conforming amendment.--Section 2703 of title 18, United 
        States Code, is amended by striking subsection (b).
    (b) Prohibition on Disclosure of Customer Communications or 
Records.--Section 2702(a)(3) of title 18, United States Code, is 
amended to read as follows:
            ``(3) a provider of remote computing service or electronic 
        communication service to the public shall not knowingly divulge 
        to any governmental entity the contents of any communication 
        described in section 2703(a) or any record or other information 
        pertaining to a subscriber to or customer of such service.''.
    (c) Delayed Notice.--Section 2705 of title 18, United States Code, 
is amended to read as follows:

``SEC. 2705. DELAYED NOTICE.

    ``(a) Delay of Notification.--(1) A governmental entity acting 
under section 2703(a) may, when a warrant is sought, include in the 
application a request for an order delaying the notification required 
under section 2703(a) for a period not to exceed 90 days, and the court 
shall issue the order if the court determines that there is reason to 
believe that notification of the existence of the warrant may have an 
adverse result.
    ``(2) In paragraph (1) the term `adverse result' means--
            ``(A) endangering the life or physical safety of an 
        individual;
            ``(B) flight from prosecution;
            ``(C) destruction of or tampering with evidence;
            ``(D) intimidation of potential witnesses; or
            ``(E) otherwise seriously jeopardizing an investigation or 
        unduly delaying a trial.
    ``(3) The court may, upon application, grant an extension of an 
order issued under paragraph (1), or of a previous extension of such an 
order, for up to an additional 90 days.
    ``(4) Upon expiration of the period of delay granted under this 
subsection, the governmental entity shall provide the customer or 
subscriber a copy of warrant together with notice that--
            ``(A) states with reasonable specificity the nature of the 
        law enforcement inquiry; and
            ``(B) informs such customer or subscriber--
                    ``(i) that information maintained for such customer 
                or subscriber by the service provider named in such 
                process or request was supplied to or requested by that 
                governmental authority and the date on which the 
                supplying or request took place;
                    ``(ii) that notification of such customer or 
                subscriber was delayed;
                    ``(iii) what court made the determination pursuant 
                to which that delay was made; and
                    ``(iv) which provision of this chapter allowed such 
                delay.
    ``(5) The method of providing matter required to be provided under 
paragraph (4) may be by service upon the person to whom the matter is 
to be provided, or delivery by registered or first-class mail, 
electronic mail, or other means reasonably calculated to be effective 
as specified by the court issuing the warrant.
    ``(b) Preclusion of Notice to Subject of Governmental Access.--A 
governmental entity acting under section 2703, to the extent that it 
may delay notice pursuant to subsection (a) of this section, may apply 
to a court for an order commanding a provider of electronic 
communications service or remote computing service to whom a warrant is 
directed not to notify any other person of the existence of the 
warrant. The court shall enter such an order, or an extension of such 
an order (or earlier extension), for a period up to 90 days, if the 
court determines there is reason to believe that notification of the 
existence of the warrant will result in an adverse result as that term 
is defined in subsection (a)(2).''.

SEC. 3. REPORTING REQUIREMENTS.

    (a) In General.--Chapter 121 of title 18, United States Code, is 
amended by adding at the end the following:
``Sec. 2713. Reporting requirements
    ``(a) General Rulemaking Authority for Reports Under This 
Section.--The Director of the Administrative Office of the United 
States Courts may make rules regarding the content and form of the 
reports required under this section and reports required under section 
3126.
    ``(b) Reports Concerning Disclosures.--
            ``(1) To administrative office.--Not later than 30 days 
        after the issuance or denial of an order or warrant compelling 
        the disclosure of the contents of any wire or electronic 
        communication or records or information under this chapter the 
        issuing or denying judge shall report to the Administrative 
        Office of the United States Courts--
                    ``(A) the fact that an order was applied for;
                    ``(B) the type of order applied for;
                    ``(C) whether the order was granted as applied for, 
                was modified, or was denied;
                    ``(D) whether the court also granted delayed notice 
                and the number of times such delay was granted;
                    ``(E) the identity, including district where 
                applicable, of the applying investigative or law 
                enforcement agency making the application and the 
                person authorizing the application; and
                    ``(F) the type of information or records sought in 
                the order.
            ``(2) To congress.--In April of each year the Director of 
        the Administrative Office of the United States Courts shall 
        report to Congress with respect to the preceding calendar 
        year--
                    ``(A) the overall total number of each of the 
                events described in the subparagraphs of paragraph (1), 
                regarding applications reported to that Office; and
                    ``(B) a summary and analysis of the data described 
                in paragraph (1).
    ``(c) Reports Concerning Emergency Disclosures.--
            ``(1) To administrative office.--In January of each year, 
        the Attorney General, the Secretary of the Department of 
        Homeland Security, the principal prosecuting attorney of a 
        State, and the principal prosecuting attorney for any political 
        subdivision of a State shall report to the Administrative 
        Office of the United States Courts--
                    ``(A) the number of accounts from which voluntary 
                disclosures were made under sections (b)(8), (c)(4), or 
                (e) of section 2702; and
                    ``(B) a summary of the basis for disclosure in 
                those instances where--
                            ``(i) voluntary disclosures under section 
                        2702(b)(8) were made; and
                            ``(ii) the investigation pertaining to 
                        those disclosures was closed without the filing 
                        of criminal charges.
            ``(2) To congress.--In April of each year the Director of 
        the Administrative Office of the United States Courts shall 
        report to Congress with respect to the preceding calendar 
        year--
                    ``(A) the number of voluntary disclosures described 
                in paragraph (1) that were made during the preceding 
                calendar year; and
                    ``(B) a summary and analysis of the information 
                required to be reported by paragraph (1).
    ``(d) Provider Reporting Requirements.--
            ``(1) To administrative office.--Except as provided in 
        paragraph (2), in January of each year each provider of 
        electronic communication service or remote computing services 
        shall report with respect to the preceding calendar year to the 
        Administrative Office of the United States Courts--
                    ``(A) the number of legal demands received from 
                Federal law enforcement agencies during the preceding 
                calendar year for records concerning electronic 
                communication service or remote computing service;
                    ``(B) the number of legal demands received from 
                Federal law enforcement agencies during the preceding 
                calendar year for the contents of wire or electronic 
                communications in an electronic communications service 
                or a remote computing service;
                    ``(C) the number of legal demands received from 
                State and local law enforcement agencies during the 
                preceding calendar year for records concerning 
                electronic communication service or remote computing 
                service;
                    ``(D) the number of legal demands received from 
                State and local law enforcement agencies during the 
                preceding calendar year for the contents of wire or 
                electronic communications in an electronic 
                communications service or a remote computing service; 
                and
                    ``(E) the number of accounts about which 
                information, including subscriber or customer 
                information, was disclosed, specifying the numbers 
                disclosed pursuant to legal demand and the numbers 
                disclosed voluntarily, to Federal, State, or local law 
                enforcement agencies.
            ``(2) Exceptions.--The requirement of paragraph (1) does 
        not apply to a provider of electronic communication services or 
        remote computing services that, during the reporting period--
                    ``(A) received less than 50 requests combined from 
                law enforcement agencies;
                    ``(B) disclosed account information concerning less 
                than 100 subscribers or customers; or
                    ``(C) had less than 100,000 total customers or 
                subscribers at the end of the calendar year.
            ``(3) Compensation.--The Director of the Administrative 
        Office of the United States Court may provide reasonable 
        compensation to a provider for the costs of compiling a report 
        required under this subsection.
            ``(4) Confidentiality of identity of service providers.--
        The Director of the Administrative Office of the United States 
        Courts shall establish procedures to prevent the release to the 
        public of the identity of service providers with respect to 
        disclosures they make under this subsection.
            ``(5) To congress.--In April of each year, the Director of 
        the Administrative Office of the United States Courts shall 
        report to Congress with respect to the preceding calendar 
        year--
                    ``(A) the total numbers of legal demands and of 
                disclosures required to be reported under paragraph 
                (1); and
                    ``(B) a summary and analysis of the information 
                required to be reported by paragraph (1), but without 
                disclosing the identity of any service provider with 
                respect to the disclosures to law enforcement that 
                service provider made.''.
    (b) Clerical Amendment.--The table of sections at the beginning of 
chapter 121 of title 18, United States Code, is amended by adding at 
the end the following new item:

``2713. Reporting requirements.''.
    (c) Conforming Amendment.--Section 2702 of title 18, United States 
Code, is amended by striking subsection (d).

SEC. 4. REPORT REGARDING MOBILE TRACKING DEVICES.

    Not later than two years after the date of the enactment of this 
subsection, the Attorney General shall complete a study to determine 
trends relating to the frequency and effectiveness of the use of mobile 
tracking devices under section 3117 and report the results of that 
study to Congress.

SEC. 5. REPORTS CONCERNING PEN REGISTERS AND TRAP AND TRACE DEVICES.

    Section 3126 of title 18 is amended to read as follows:
``Sec. 3126. Reports concerning pen registers and trap and trace 
              devices
    ``(a) To Administrative Office.--Not later than 30 days after the 
expiration of an order (or each extension thereof) entered under 
section 3123, or the denial of an order for a pen register or trap and 
trace device, the issuing or denying judge shall report to the 
Administrative Office of the United States Courts--
            ``(1) the fact that an order or extension was applied for;
            ``(2) whether the order or extension was granted as applied 
        for, was modified, or was denied;
            ``(3) the period of interceptions authorized by the order, 
        and the number and duration of any extensions of the order;
            ``(4) the offense specified in the order or application, or 
        extension of an order;
            ``(5) the number and nature of the facilities affected; and
            ``(6) the identity, including district, of the applying 
        investigative or law enforcement agency making the application 
        and the person authorizing the order.
    ``(b) To Congress.--In April of each year the Director of the 
Administrative Office of the United States Courts shall report to 
Congress with respect to the preceding calendar year--
            ``(1) the number of applications for pen register orders 
        and orders for trap and trace devices; and
            ``(2) a summary and analysis of the information required to 
        be reported by subsection (a).''.

SEC. 6. TRANSITION PROVISION RELATED TO REPORTING REQUIREMENTS UNDER 
              AMENDMENTS MADE BY THIS ACT.

    (a) For Reports to the Administrative Office.--Any requirement to 
report to the Administrative Office of the United States Courts 
contained in an amendment made by this Act shall not take effect until 
the beginning of the first January that begins one year or later after 
the date of the enactment of this Act.
    (b) For Reports to Congress.--Any requirement for a report to 
Congress contained in an amendment made by this Act shall not take 
effect until reports have been required to be made under that amendment 
to the Administrative Office of the United States Courts pursuant to 
subsection (a) for an entire calendar year.

SEC. 7. MAKING SUPPRESSION REMEDIES THE SAME FOR INTERCEPTED WIRE, 
              ORAL, AND ELECTRONIC COMMUNICATIONS.

    (a) Section 2518 Amendments.--Section 2518(10) of title 18, United 
States Code, is amended--
            (1) in paragraph (a), by striking ``wire'' and inserting 
        ``electronic, wire,''; and
            (2) by striking paragraph (c).
    (b) Section 2515 Amendment.--Section 2515 of title 18, United 
States Code, is amended by striking ``wire'' and inserting 
``electronic, wire,''.
Electronic Communications Privacy Act Modernization Act of 2012 - Amends the federal criminal code to revise rules for requiring disclosure by a governmental entity of wire or electronic communications and for delaying notification of the issuance of a warrant requiring such disclosure. Extends such disclosure requirements to providers of a remote computing service. Permits disclosure by a service provider only pursuant to: (1) a warrant complying with the Federal Rules of Criminal Procedure and issued by a court with jurisdiction over the offense under investigation or equivalent state warrant, or (2) a court under title I or title VII of the Foreign Intelligence Surveillance Act of 1978.

Authorizes the Director of the Administrative Office of the United States Courts to make rules regarding the content and form of reports required under this Act.

Requires the Attorney General to study trends relating to the frequency and effectiveness of the use of mobile tracking devices.

Revises reporting requirements for orders for pen registers and trap and trace devices to require issuing or denying judges to report specified information about such orders to the Administrative Office of the U.S. Courts and to require the Director of such Office to report to Congress on such orders.

Amends the federal criminal code to allow individuals aggrieved by the interception of an electronic communication to move in court to suppress the content of any such communication (currently, allowed for wire or oral communications only).
To amend title 18, United States Code, regarding access to stored communications and customer records, and for other purposes.