[
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.ap_\n\n# Files for the Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# IDEs\n.idea/\n.vscode/\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    {one line to give the program's name and a brief idea of what it does.}\n    Copyright (C) {year}  {name of author}\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    {project}  Copyright (C) {year}  {fullname}\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n\n"
  },
  {
    "path": "README.md",
    "content": "Echo\n====\n\nTime travelling recorder for Android.\nIt is free/libre and gratis software.\n\nDownload\n---\n\n* [F-Droid](https://f-droid.org/repository/browse/?fdid=eu.mrogalski.saidit)\n\nArchitecture\n---\n\n**SaidItFragment** the main view of the app.\n\n**SaidItService** manages a high priority thread that records audio. The thread is a state machine that can be accessed by sending it tasks using Android's Handler (`audioHandler`).\n\n**AudioMemory** (not thread-safe) manages the in-memory ring buffer of audio chunks.\n"
  },
  {
    "path": "SaidIt/SaidIt-SaidIt.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<module external.linked.project.path=\"$MODULE_DIR$\" external.root.project.path=\"$MODULE_DIR$/..\" external.system.id=\"GRADLE\" external.system.module.group=\"SaidIt\" external.system.module.version=\"unspecified\" type=\"JAVA_MODULE\" version=\"4\">\r\n  <component name=\"FacetManager\">\r\n    <facet type=\"android-gradle\" name=\"Android-Gradle\">\r\n      <configuration>\r\n        <option name=\"GRADLE_PROJECT_PATH\" value=\":SaidIt\" />\r\n      </configuration>\r\n    </facet>\r\n    <facet type=\"android\" name=\"Android\">\r\n      <configuration>\r\n        <option name=\"SELECTED_BUILD_VARIANT\" value=\"debug\" />\r\n        <option name=\"ASSEMBLE_TASK_NAME\" value=\"assembleDebug\" />\r\n        <option name=\"COMPILE_JAVA_TASK_NAME\" value=\"compileDebugJava\" />\r\n        <option name=\"ASSEMBLE_TEST_TASK_NAME\" value=\"assembleDebugTest\" />\r\n        <option name=\"SOURCE_GEN_TASK_NAME\" value=\"generateDebugSources\" />\r\n        <option name=\"ALLOW_USER_CONFIGURATION\" value=\"false\" />\r\n        <option name=\"MANIFEST_FILE_RELATIVE_PATH\" value=\"/src/main/AndroidManifest.xml\" />\r\n        <option name=\"RES_FOLDER_RELATIVE_PATH\" value=\"/src/main/res\" />\r\n        <option name=\"RES_FOLDERS_RELATIVE_PATH\" value=\"file://$MODULE_DIR$/src/main/res\" />\r\n        <option name=\"ASSETS_FOLDER_RELATIVE_PATH\" value=\"/src/main/assets\" />\r\n      </configuration>\r\n    </facet>\r\n  </component>\r\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"false\">\r\n    <output url=\"file://$MODULE_DIR$/build/intermediates/classes/debug\" />\r\n    <exclude-output />\r\n    <content url=\"file://$MODULE_DIR$\">\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/r/debug\" isTestSource=\"false\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/aidl/debug\" isTestSource=\"false\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/buildConfig/debug\" isTestSource=\"false\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/rs/debug\" isTestSource=\"false\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/res/rs/debug\" type=\"java-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/r/test/debug\" isTestSource=\"true\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/aidl/test/debug\" isTestSource=\"true\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug\" isTestSource=\"true\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/rs/test/debug\" isTestSource=\"true\" generated=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/res/rs/test/debug\" type=\"java-test-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/res\" type=\"java-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/resources\" type=\"java-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/aidl\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/assets\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/java\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/jni\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/rs\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/res\" type=\"java-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/resources\" type=\"java-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/aidl\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/assets\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/java\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/jni\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/rs\" isTestSource=\"false\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/res\" type=\"java-test-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/resources\" type=\"java-test-resource\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/aidl\" isTestSource=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/assets\" isTestSource=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/java\" isTestSource=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/jni\" isTestSource=\"true\" />\r\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/rs\" isTestSource=\"true\" />\r\n      <excludeFolder url=\"file://$MODULE_DIR$/build/intermediates\" />\r\n      <excludeFolder url=\"file://$MODULE_DIR$/build/outputs\" />\r\n    </content>\r\n    <orderEntry type=\"jdk\" jdkName=\"Android API 19 Platform\" jdkType=\"Android SDK\" />\r\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"support-v4-19.1.0\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"library-2.4.0\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"additionnal\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"mail\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"jcaki-1.0-Alpha\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"appcompat-v7-19.1.0\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"activation\" level=\"project\" />\r\n    <orderEntry type=\"library\" exported=\"\" name=\"PayPalAndroidSDK\" level=\"project\" />\r\n  </component>\r\n</module>\r\n\r\n"
  },
  {
    "path": "SaidIt/build.gradle",
    "content": "buildscript {\n    repositories {\n        google()\n        mavenCentral()\n        maven { url \"https://repo.maven.apache.org/maven2\" }\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.10.1'\n    }\n}\napply plugin: 'com.android.application'\n\nrepositories {\n        mavenCentral()\n        maven { url \"https://maven.google.com\" }\n}\n\nandroid {\n    namespace 'eu.mrogalski.saidit'\n    compileSdk 34\n\n    defaultConfig{\n        applicationId \"eu.mrogalski.saidit\"\n        minSdk 30\n        targetSdk 34\n        versionCode 15\n        versionName \"2.0.0\"\n    }\n\n    signingConfigs {\n        release {\n            storeFile file(\"<relative path>\")\n            storePassword \"<fill in>\"\n            keyAlias \"<fill in>\"\n            keyPassword \"<fill in>\"\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled true\n            proguardFile file('proguard.cfg')\n            proguardFile getDefaultProguardFile('proguard-android-optimize.txt')\n            signingConfig signingConfigs.release\n        }\n\n        debug {\n            //signingConfig signingConfigs.release\n        }\n    }\n    lint {\n        abortOnError false\n    }\n    buildFeatures {\n        buildConfig true\n    }\n\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: '*.jar')\n    implementation 'androidx.appcompat:appcompat:1.6.1'\n}\n"
  },
  {
    "path": "SaidIt/proguard.cfg",
    "content": "-renamesourcefileattribute SourceFile\n-keepattributes SourceFile,LineNumberTable\n\n-dontwarn java.awt.**\n-dontwarn javax.security.**\n-dontwarn java.beans.**\n\n-keepattributes *Annotation*\n\n-keep class org.acra.ACRA {\n\t*;\n}\n\n-keep class org.acra.ReportingInteractionMode {\n    *;\n}\n\n-keepnames class org.acra.sender.HttpSender$** {\n    *;\n}\n\n-keepnames class org.acra.ReportField {\n    *;\n}\n\n-keep public class org.acra.ErrorReporter\n{\n    public void addCustomData(java.lang.String,java.lang.String);\n    public void putCustomData(java.lang.String,java.lang.String);\n    public void removeCustomData(java.lang.String);\n}\n\n-keep public class org.acra.ErrorReporter\n{\n    public void handleSilentException(java.lang.Throwable);\n}\n\n-keep class com.android.vending.billing.**\n"
  },
  {
    "path": "SaidIt/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- Basic functionality -->\n    <uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />\n    <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\n    <uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n    <uses-permission android:name=\"android.permission.MANAGE_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE_MICROPHONE\" />\n\n    <supports-screens\n        android:largeScreens=\"true\"\n        android:xlargeScreens=\"true\" />\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@drawable/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:largeHeap=\"true\"\n        android:theme=\"@style/Theme\" >\n        <activity\n            android:name=\".SaidItActivity\"\n            android:label=\"@string/app_name\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n\n            <intent-filter>\n                <action android:name=\"android.intent.action.VIEW\" />\n                <category android:name=\"android.intent.category.DEFAULT\" />\n                <category android:name=\"android.intent.category.BROWSABLE\" />\n                <data android:scheme=\"echoLicense\"/>\n            </intent-filter>\n\n            <intent-filter>\n                <action android:name=\"android.intent.action.VIEW\" />\n                <category android:name=\"android.intent.category.DEFAULT\" />\n                <category android:name=\"android.intent.category.BROWSABLE\" />\n                <data android:scheme=\"echoCoupon\"/>\n            </intent-filter>\n        </activity>\n\n        <service\n            android:name=\".SaidItService\"\n            android:foregroundServiceType=\"microphone\"\n            android:enabled=\"true\"\n            android:exported=\"false\">\n        </service>\n\n        <receiver android:name=\".BroadcastReceiver\"\n            android:exported=\"false\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n            </intent-filter>\n        </receiver>\n\n        <activity\n            android:name=\".SettingsActivity\"\n            android:parentActivityName=\".SaidItActivity\" >\n            <meta-data\n                android:name=\"android.support.PARENT_ACTIVITY\"\n                android:value=\"SaidItActivity\" />\n        </activity>\n\n        <provider\n            android:name=\"androidx.core.content.FileProvider\"\n            android:authorities=\"${applicationId}.provider\"\n            android:exported=\"false\"\n            android:grantUriPermissions=\"true\">\n            <meta-data\n                android:name=\"android.support.FILE_PROVIDER_PATHS\"\n                android:resource=\"@xml/path_provider\">\n\n            </meta-data>\n        </provider>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/StringFormat.java",
    "content": "package eu.mrogalski;\n\nimport java.text.DecimalFormat;\n\npublic class StringFormat {\n    public static String shortFileSize(long size) {\n        if(size <= 0) return \"0\";\n        final String[] units = new String[] { \"B\", \"KB\", \"MB\", \"GB\", \"TB\" };\n        int digitGroups = (int) (Math.log10(size)/Math.log10(1024));\n        return new DecimalFormat(\"#,##0.#\").format(size/Math.pow(1024, digitGroups)) + \" \" + units[digitGroups];\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/android/TimeFormat.java",
    "content": "package eu.mrogalski.android;\n\nimport android.content.res.Resources;\n\nimport eu.mrogalski.saidit.R;\n\npublic class TimeFormat {\n    public static void naturalLanguage(Resources resources, float secondsF, Result outResult) {\n        int seconds = (int) Math.floor(secondsF);\n        int minutes = seconds / 60;\n        seconds %= 60;\n\n        String out = \"\";\n\n        if(minutes != 0) {\n            outResult.count = minutes;\n            out += resources.getQuantityString(R.plurals.minute, minutes, minutes);\n\n            if(seconds != 0) {\n                out += resources.getString(R.string.minute_second_join);\n                out += resources.getQuantityString(R.plurals.second, seconds, seconds);\n            }\n        } else {\n            outResult.count = seconds;\n            out += resources.getQuantityString(R.plurals.second, seconds, seconds);\n        }\n\n        outResult.text = out + \".\";\n    }\n\n    public static String shortTimer(float seconds) {\n        return String.format(\"%d:%02d\", (int) Math.floor(seconds / 60), (int) Math.floor(seconds % 60));\n    }\n\n    public static class Result {\n        public String text;\n        public int count;\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/android/Views.java",
    "content": "package eu.mrogalski.android;\n\nimport android.view.View;\nimport android.view.ViewGroup;\n\npublic class Views {\n    public static void search(ViewGroup viewGroup, SearchViewCallback callback) {\n        final int cnt = viewGroup.getChildCount();\n        for(int i = 0; i < cnt; ++i) {\n            final View child = viewGroup.getChildAt(i);\n            if(child instanceof ViewGroup) {\n                search((ViewGroup) child, callback);\n            }\n            callback.onView(child, viewGroup);\n        }\n\n    }\n\n    public static interface SearchViewCallback {\n        public void onView(View view, ViewGroup parent);\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/AudioMemory.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.os.SystemClock;\n\nimport java.io.IOException;\nimport java.util.LinkedList;\n\npublic class AudioMemory {\n\n    private final LinkedList<byte[]> filled = new LinkedList<byte[]>();\n    private final LinkedList<byte[]> free = new LinkedList<byte[]>();\n\n    private long fillingStartUptimeMillis;\n    private boolean filling = false;\n    private boolean currentWasFilled = false;\n    private byte[] current = null;\n    private int offset = 0;\n    static final int CHUNK_SIZE = 1920000; // 20 seconds of 48kHz wav (single channel, 16-bit samples) (1875 kB)\n\n    synchronized public void allocate(long sizeToEnsure) {\n        long currentSize = getAllocatedMemorySize();\n        while(currentSize < sizeToEnsure) {\n            currentSize += CHUNK_SIZE;\n            free.addLast(new byte[CHUNK_SIZE]);\n        }\n        while(!free.isEmpty() && (currentSize - CHUNK_SIZE >= sizeToEnsure)) {\n            currentSize -= CHUNK_SIZE;\n            free.removeLast();\n        }\n        while(!filled.isEmpty() && (currentSize - CHUNK_SIZE >= sizeToEnsure)) {\n            currentSize -= CHUNK_SIZE;\n            filled.removeFirst();\n        }\n        if((current != null) && (currentSize - CHUNK_SIZE >= sizeToEnsure)) {\n            //currentSize -= CHUNK_SIZE;\n            current = null;\n            offset = 0;\n            currentWasFilled = false;\n        }\n        System.gc();\n    }\n\n    synchronized public long getAllocatedMemorySize() {\n        return (free.size() + filled.size() + (current == null ? 0 : 1)) * CHUNK_SIZE;\n    }\n\n    public interface Consumer {\n        public int consume(byte[] array, int offset, int count) throws IOException;\n    }\n\n    private int skipAndFeed(int bytesToSkip, byte[] arr, int offset, int length, Consumer consumer)  throws IOException {\n        if(bytesToSkip >= length) {\n            return length;\n        } else if(bytesToSkip > 0) {\n            consumer.consume(arr, offset + bytesToSkip, length - bytesToSkip);\n            return bytesToSkip;\n        }\n        consumer.consume(arr, offset, length);\n        return 0;\n    }\n\n    public void read(int skipBytes, Consumer reader)  throws IOException {\n        synchronized (this) {\n            if(!filling && current != null && currentWasFilled) {\n                skipBytes -= skipAndFeed(skipBytes, current, offset, current.length - offset, reader);\n            }\n            for(byte[] arr : filled) {\n                skipBytes -= skipAndFeed(skipBytes, arr, 0, arr.length, reader);\n            }\n            if(current != null && offset > 0) {\n                skipAndFeed(skipBytes, current, 0, offset, reader);\n            }\n        }\n    }\n\n    public int countFilled() {\n        int sum = 0;\n        synchronized (this) {\n            if(!filling && current != null && currentWasFilled) {\n                sum += current.length - offset;\n            }\n            for(byte[] arr : filled) {\n                sum += arr.length;\n            }\n            if(current != null && offset > 0) {\n                sum += offset;\n            }\n        }\n        return sum;\n    }\n\n    public void fill(Consumer filler) throws IOException {\n        synchronized (this) {\n            if(current == null) {\n                if(free.isEmpty()) {\n                    if(filled.isEmpty()) return;\n                    currentWasFilled = true;\n                    current = filled.removeFirst();\n                } else {\n                    currentWasFilled = false;\n                    current = free.removeFirst();\n                }\n                offset = 0;\n            }\n            filling = true;\n            fillingStartUptimeMillis = SystemClock.uptimeMillis();\n        }\n\n        final int read = filler.consume(current, offset, current.length - offset);\n\n        synchronized (this) {\n            if(offset + read >= current.length) {\n                filled.addLast(current);\n                current = null;\n                offset = 0;\n            } else {\n                offset += read;\n            }\n            filling = false;\n        }\n    }\n\n    public static class Stats {\n        public int filled; // taken\n        public int total;\n        public int estimation;\n        public boolean overwriting; // currentWasFilled;\n    }\n\n    public synchronized Stats getStats(int fillRate) {\n        final Stats stats = new Stats();\n        stats.filled = filled.size() * CHUNK_SIZE + (current == null ? 0 : currentWasFilled ? CHUNK_SIZE : offset);\n        stats.total = (filled.size() + free.size() + (current == null ? 0 : 1)) * CHUNK_SIZE;\n        stats.estimation = (int) (filling ? (SystemClock.uptimeMillis() - fillingStartUptimeMillis) * fillRate / 1000 : 0);\n        stats.overwriting = currentWasFilled;\n        return stats;\n    }\n\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/BroadcastReceiver.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.content.Context;\nimport android.content.Intent;\n\npublic class BroadcastReceiver extends android.content.BroadcastReceiver {\n\n\t@Override\n\tpublic void onReceive(Context context, Intent intent) {\n        // Start only if tutorial has been finished\n        if (context.getSharedPreferences(SaidIt.PACKAGE_NAME, Context.MODE_PRIVATE).getBoolean(\"skip_tutorial\", false)) {\n            context.startService(new Intent(context, SaidItService.class));\n        }\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/ErrorResponseDialog.java",
    "content": "package eu.mrogalski.saidit;\n\npublic class ErrorResponseDialog extends ThemedDialog {\n    @Override\n    int getShadowColorId() {\n        return R.color.dark_red;\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/IntentResult.java",
    "content": "package eu.mrogalski.saidit;\npublic final class IntentResult {\n\n    private final String contents;\n    private final String formatName;\n    private final byte[] rawBytes;\n    private final Integer orientation;\n    private final String errorCorrectionLevel;\n\n    IntentResult() {\n        this(null, null, null, null, null);\n    }\n\n    IntentResult(String contents,\n                 String formatName,\n                 byte[] rawBytes,\n                 Integer orientation,\n                 String errorCorrectionLevel) {\n        this.contents = contents;\n        this.formatName = formatName;\n        this.rawBytes = rawBytes;\n        this.orientation = orientation;\n        this.errorCorrectionLevel = errorCorrectionLevel;\n    }\n\n    /**\n     * @return raw content of barcode\n     */\n    public String getContents() {\n        return contents;\n    }\n\n    /**\n     * @return name of format, like \"QR_CODE\", \"UPC_A\". See {@code BarcodeFormat} for more format names.\n     */\n    public String getFormatName() {\n        return formatName;\n    }\n\n    /**\n     * @return raw bytes of the barcode content, if applicable, or null otherwise\n     */\n    public byte[] getRawBytes() {\n        return rawBytes;\n    }\n\n    /**\n     * @return rotation of the image, in degrees, which resulted in a successful scan. May be null.\n     */\n    public Integer getOrientation() {\n        return orientation;\n    }\n\n    /**\n     * @return name of the error correction level used in the barcode, if applicable\n     */\n    public String getErrorCorrectionLevel() {\n        return errorCorrectionLevel;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder dialogText = new StringBuilder(100);\n        dialogText.append(\"Format: \").append(formatName).append('\\n');\n        dialogText.append(\"Contents: \").append(contents).append('\\n');\n        int rawBytesLength = rawBytes == null ? 0 : rawBytes.length;\n        dialogText.append(\"Raw bytes: (\").append(rawBytesLength).append(\" bytes)\\n\");\n        dialogText.append(\"Orientation: \").append(orientation).append('\\n');\n        dialogText.append(\"EC level: \").append(errorCorrectionLevel).append('\\n');\n        return dialogText.toString();\n    }\n\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/RecordingDoneDialog.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.app.Activity;\nimport android.content.ActivityNotFoundException;\nimport android.content.Intent;\nimport android.content.res.Resources;\nimport android.net.Uri;\nimport android.os.Bundle;\nimport android.os.Environment;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport androidx.core.content.FileProvider;\n\nimport java.io.File;\nimport java.net.URLConnection;\n\nimport eu.mrogalski.StringFormat;\nimport eu.mrogalski.android.TimeFormat;\n\npublic class RecordingDoneDialog extends ThemedDialog {\n\n    private static final String KEY_RUNTIME = \"runtime\";\n    private static final String KEY_FILE = \"file\";\n\n    private File file;\n    private float runtime;\n    private final TimeFormat.Result timeFormatResult = new TimeFormat.Result();\n\n    @Override\n    public void onSaveInstanceState(Bundle outState) {\n        super.onSaveInstanceState(outState);\n        outState.putFloat(KEY_RUNTIME, runtime);\n        outState.putString(KEY_FILE, file.getPath());\n    }\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        if(savedInstanceState != null) {\n            if(savedInstanceState.containsKey(KEY_FILE))\n                file = new File(savedInstanceState.getString(KEY_FILE));\n            if(savedInstanceState.containsKey(KEY_RUNTIME))\n                runtime = savedInstanceState.getFloat(KEY_RUNTIME);\n        }\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n        final View root = inflater.inflate(R.layout.recording_done_dialog, container);\n        assert root != null;\n\n        fixFonts(root);\n\n        final Activity activity = getActivity();\n        assert activity != null;\n        final Resources resources = activity.getResources();\n        TimeFormat.naturalLanguage(resources, runtime, timeFormatResult);\n\n        ((TextView) root.findViewById(R.id.recording_done_filename)).setText(file.getName());\n        ((TextView) root.findViewById(R.id.recording_done_dirname)).setText(file.getParent());\n        ((TextView) root.findViewById(R.id.recording_done_runtime)).setText(timeFormatResult.text);\n        ((TextView) root.findViewById(R.id.recording_done_size)).setText(StringFormat.shortFileSize(file.length()));\n\n        root.findViewById(R.id.recording_done_open_dir).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                openFolder();\n            }\n        });\n\n        root.findViewById(R.id.recording_done_send).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent shareIntent = new Intent();\n                shareIntent.setAction(Intent.ACTION_SEND);\n                Uri fileUri = FileProvider.getUriForFile(activity, BuildConfig.APPLICATION_ID + \".provider\", file);\n                shareIntent.putExtra(Intent.EXTRA_STREAM, fileUri);\n                shareIntent.setType(activity.getContentResolver().getType(fileUri)); // Get MIME type from content resolver\n                shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); // Grant read permission\n                startActivity(Intent.createChooser(shareIntent, \"Send to\"));\n\n            }\n        });\n\n        root.findViewById(R.id.recording_done_play).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent intent = new Intent();\n                intent.setAction(android.content.Intent.ACTION_VIEW);\n                Uri fileUri = FileProvider.getUriForFile(activity, BuildConfig.APPLICATION_ID + \".provider\", file);\n                intent.setDataAndType(fileUri, \"audio/*\");\n                intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); // Grant read permission\n                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n                startActivity(intent);\n            }\n        });\n\n        return root;\n    }\n\n    public RecordingDoneDialog setFile(File file) {\n        this.file = file;\n        return this;\n    }\n\n    public RecordingDoneDialog setRuntime(float runtime) {\n        this.runtime = runtime;\n        return this;\n    }\n\n    public void openFolder() {\n        File folder = file.getParentFile();\n        if (folder.exists() && folder.isDirectory()) {\n            Uri uri = Uri.parse(folder.getAbsolutePath());\n            Intent intent = new Intent(Intent.ACTION_VIEW);\n            intent.setDataAndType(uri, \"*/*\");\n            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n            startActivity(intent);\n        } else {\n            Log.e(\"OpenFolder\", \"Folder does not exist or is not a directory\");\n        }\n    }\n\n\n    private static boolean isExternalStorageWritable() {\n        String state = Environment.getExternalStorageState();\n        return Environment.MEDIA_MOUNTED.equals(state);\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/SaidIt.java",
    "content": "package eu.mrogalski.saidit;\n\npublic class SaidIt {\n\n    static final String PACKAGE_NAME = \"eu.mrogalski.saidit\";\n    static final String AUDIO_MEMORY_ENABLED_KEY = \"audio_memory_enabled\";\n    static final String AUDIO_MEMORY_SIZE_KEY = \"audio_memory_size\";\n    static final String SAMPLE_RATE_KEY = \"sample_rate\";\n    static final String SKU = \"unlimited_history\";\n    static final String BASE64_KEY = \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlD0FMFGp4AWzjW\" +\n            \"LTsUZgm0soga0mVVNGFj0qoATaoQCE/LamF7yrMCIFm9sEOB1guCEhzdr16sjysrVc2EPRisS83FoJ4K0R8\" +\n            \"XPDP2TrVT2SAeQpTCG27NNH+W86SlGEqQeQhMPMhR+HDTckHv3KBpD8BZEEIbkXPv6SGFqcZub6xzn9r14l\" +\n            \"6ptYIWboKGGBh1i9/nJpdhCMPxuLn/WZnRXGxqGpfNw2xT25/muUDZgRVezy6/5eI+ciMn5H1U0ADBjXvl1\" +\n            \"Py+4ClkR1V1Mfo9lvauB03zM8Fsa3LlIPle5a+wGKsRCLW/rJ/eE/rje6X7x/n+w8J4OiFvVATj0T8QIDAQ\" +\n            \"AB\";\n\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/SaidItActivity.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.Manifest;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.content.pm.PackageManager;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.Environment;\nimport android.provider.Settings;\n\nimport androidx.annotation.NonNull;\nimport androidx.core.app.ActivityCompat;\n\npublic class SaidItActivity extends Activity {\n\n    private static final int PERMISSION_REQUEST_CODE = 5465;\n    private boolean isFragmentSet = false;\n    private AlertDialog permissionDeniedDialog;\n    private AlertDialog storagePermissionDialog;\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_background_recorder);\n    }\n\n    @Override\n    protected void onStart() {\n        super.onStart();\n        if(permissionDeniedDialog != null) {\n            permissionDeniedDialog.dismiss();\n        }\n        if(storagePermissionDialog != null) {\n            storagePermissionDialog.dismiss();\n        }\n        requestPermissions();\n    }\n\n    @Override\n    protected void onRestart() {\n        super.onRestart();\n        if(permissionDeniedDialog != null) {\n            permissionDeniedDialog.dismiss();\n        }\n        if(storagePermissionDialog != null) {\n            storagePermissionDialog.dismiss();\n        }\n        requestPermissions();\n    }\n\n    private void requestPermissions() {\n        // Ask for storage permission\n\n        String[] permissions = {Manifest.permission.RECORD_AUDIO, Manifest.permission.FOREGROUND_SERVICE};\n        if(Build.VERSION.SDK_INT >= 33) {\n            permissions = new String[]{Manifest.permission.RECORD_AUDIO, Manifest.permission.FOREGROUND_SERVICE, Manifest.permission.POST_NOTIFICATIONS};\n        }\n        ActivityCompat.requestPermissions(this, permissions, PERMISSION_REQUEST_CODE);\n    }\n\n    @Override\n    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n        if (requestCode == PERMISSION_REQUEST_CODE) {\n            // Check if all permissions are granted\n            boolean allPermissionsGranted = true;\n            for (int result : grantResults) {\n                if (result != PackageManager.PERMISSION_GRANTED) {\n                    allPermissionsGranted = false;\n                    break;\n                }\n            }\n            if (allPermissionsGranted) {\n                // All permissions are granted\n                if (Environment.isExternalStorageManager()) {\n                    // Permission already granted\n                    if(storagePermissionDialog != null) {\n                        storagePermissionDialog.dismiss();\n                    }\n                    showFragment();\n                } else {\n                    // Request MANAGE_EXTERNAL_STORAGE permission\n                    storagePermissionDialog = new AlertDialog.Builder(this)\n                            .setTitle(R.string.permission_required)\n                            .setMessage(R.string.permission_required_message)\n                            .setPositiveButton(R.string.allow, new DialogInterface.OnClickListener() {\n                                @Override\n                                public void onClick(DialogInterface dialog, int which) {\n                                    // Open app settings\n                                    Intent intent = new Intent();\n                                    intent.setAction(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);\n                                    intent.setData(Uri.fromParts(\"package\", getPackageName(), null));\n                                    startActivity(intent);\n                                }\n                            })\n                            .setNegativeButton(R.string.exit, new DialogInterface.OnClickListener() {\n                                @Override\n                                public void onClick(DialogInterface dialog, int which) {\n                                    finish();\n                                }\n                            })\n                            .setCancelable(false)\n                            .show();\n                }\n            } else {\n                if(permissionDeniedDialog == null || !permissionDeniedDialog.isShowing()) {\n                    showPermissionDeniedDialog();\n                }\n            }\n        }\n    }\n\n    private void showFragment() {\n        if (!isFragmentSet) {\n            isFragmentSet = true;\n            getFragmentManager().beginTransaction()\n                    .replace(R.id.container, new SaidItFragment(), \"main-fragment\")\n                    .commit();\n        }\n    }\n    private void showPermissionDeniedDialog() {\n        permissionDeniedDialog = new AlertDialog.Builder(this)\n                .setTitle(R.string.permission_required)\n                .setMessage(R.string.permission_required_message)\n                .setPositiveButton(R.string.allow, new DialogInterface.OnClickListener() {\n                    @Override\n                    public void onClick(DialogInterface dialog, int which) {\n                        // Open app settings\n                        Intent intent = new Intent();\n                        intent.setAction(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n                        intent.setData(Uri.fromParts(\"package\", getPackageName(), null));\n                        startActivity(intent);\n                    }\n                })\n                .setNegativeButton(R.string.exit, new DialogInterface.OnClickListener() {\n                    @Override\n                    public void onClick(DialogInterface dialog, int which) {\n                        finish();\n                    }\n                })\n                .setCancelable(false)\n                .show();\n    }\n}"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/SaidItFragment.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.annotation.SuppressLint;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.app.Dialog;\nimport android.app.Fragment;\nimport android.app.Notification;\nimport android.app.PendingIntent;\nimport android.app.ProgressDialog;\nimport android.content.ComponentName;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.content.ServiceConnection;\nimport android.content.pm.PackageManager;\nimport android.content.res.AssetManager;\nimport android.content.res.Resources;\nimport android.graphics.Typeface;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.IBinder;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.animation.Animation;\nimport android.view.animation.AnimationUtils;\nimport android.util.Log;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.ImageButton;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport androidx.core.app.ActivityCompat;\nimport androidx.core.app.NotificationCompat;\nimport androidx.core.app.NotificationManagerCompat;\nimport androidx.core.content.FileProvider;\n\nimport java.io.File;\n\nimport eu.mrogalski.android.TimeFormat;\nimport eu.mrogalski.android.Views;\n\npublic class SaidItFragment extends Fragment {\n\n    private static final String TAG = SaidItFragment.class.getSimpleName();\n    private static final String YOUR_NOTIFICATION_CHANNEL_ID = \"SaidItServiceChannel\";\n    private Button record_pause_button;\n    private Button listenButton;\n\n    ListenButtonClickListener listenButtonClickListener = new ListenButtonClickListener();\n    RecordButtonClickListener recordButtonClickListener = new RecordButtonClickListener();\n\n    private boolean isListening = true;\n    private boolean isRecording = false;\n\n    private LinearLayout ready_section;\n    private Button recordLastFiveMinutesButton;\n    private Button recordMaxButton;\n    private Button recordLastMinuteButton;\n    private Button recordLastThirtyMinuteButton;\n    private Button recordLastTwoHrsButton;\n    private Button recordLastSixHrsButton;\n    private TextView history_limit;\n    private TextView history_size;\n    private TextView history_size_title;\n\n    private LinearLayout rec_section;\n    private TextView rec_indicator;\n    private TextView rec_time;\n\n    private ImageButton rate_on_google_play;\n    private ImageView heart;\n\n    @Override\n    public void onStart() {\n        Log.d(TAG, \"onStart\");\n        super.onStart();\n        final Activity activity = getActivity();\n        assert activity != null;\n        activity.bindService(new Intent(activity, SaidItService.class), echoConnection, Context.BIND_AUTO_CREATE);\n    }\n\n    @Override\n    public void onStop() {\n        Log.d(TAG, \"onStop\");\n        super.onStop();\n        final Activity activity = getActivity();\n        assert activity != null;\n        activity.unbindService(echoConnection);\n        echo = null;\n    }\n\n    class ActivityResult {\n        final int requestCode;\n        final int resultCode;\n        final Intent data;\n\n        ActivityResult(int requestCode, int resultCode, Intent data) {\n            this.requestCode = requestCode;\n            this.resultCode = resultCode;\n            this.data = data;\n        }\n    }\n\n    private Runnable updater = new Runnable() {\n        @Override\n        public void run() {\n            final View view = getView();\n            if (view == null) return;\n            if (echo == null) return;\n            echo.getState(serviceStateCallback);\n        }\n    };\n\n    SaidItService echo;\n    private ServiceConnection echoConnection = new ServiceConnection() {\n\n        @Override\n        public void onServiceConnected(ComponentName className,\n                                       IBinder binder) {\n            Log.d(TAG, \"onServiceConnected\");\n            SaidItService.BackgroundRecorderBinder typedBinder = (SaidItService.BackgroundRecorderBinder) binder;\n            if (echo != null && echo == typedBinder.getService()) {\n                Log.d(TAG, \"update loop already running, skipping\");\n                return;\n            }\n            echo = typedBinder.getService();\n            getView().postOnAnimation(updater);\n        }\n\n        @Override\n        public void onServiceDisconnected(ComponentName arg0) {\n            Log.d(TAG, \"onServiceDisconnected\");\n            echo = null;\n        }\n    };\n\n    public int getStatusBarHeight() {\n        int result = 0;\n        int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n        if (resourceId > 0) {\n            result = getResources().getDimensionPixelSize(resourceId);\n        }\n        return result;\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                             Bundle savedInstanceState) {\n\n        View rootView = inflater.inflate(R.layout.fragment_background_recorder, container, false);\n\n        if (rootView == null) return null;\n\n        final Activity activity = getActivity();\n        final AssetManager assets = activity.getAssets();\n        final Typeface robotoCondensedBold = Typeface.createFromAsset(assets, \"RobotoCondensedBold.ttf\");\n        final Typeface robotoCondensedRegular = Typeface.createFromAsset(assets, \"RobotoCondensed-Regular.ttf\");\n        final float density = activity.getResources().getDisplayMetrics().density;\n\n        Views.search((ViewGroup) rootView, new Views.SearchViewCallback() {\n            @Override\n            public void onView(View view, ViewGroup parent) {\n\n                if (view instanceof Button) {\n                    final Button button = (Button) view;\n                    button.setTypeface(robotoCondensedBold);\n                    final int shadowColor = button.getShadowColor();\n                    button.setShadowLayer(0.01f, 0, density * 2, shadowColor);\n                } else if (view instanceof TextView) {\n\n                    final TextView textView = (TextView) view;\n                    textView.setTypeface(robotoCondensedRegular);\n                }\n            }\n        });\n\n        history_limit = (TextView) rootView.findViewById(R.id.history_limit);\n        history_size = (TextView) rootView.findViewById(R.id.history_size);\n        history_size_title = (TextView) rootView.findViewById(R.id.history_size_title);\n\n        history_limit.setTypeface(robotoCondensedBold);\n        history_size.setTypeface(robotoCondensedBold);\n\n        listenButton = (Button) rootView.findViewById(R.id.listen_button);\n        if (listenButton != null) {\n            listenButton.setOnClickListener(listenButtonClickListener);\n        }\n\n        final int statusBarHeight = getStatusBarHeight();\n        listenButton.setPadding(listenButton.getPaddingLeft(), listenButton.getPaddingTop() + statusBarHeight, listenButton.getPaddingRight(), listenButton.getPaddingBottom());\n        final ViewGroup.LayoutParams layoutParams = listenButton.getLayoutParams();\n        layoutParams.height += statusBarHeight;\n        listenButton.setLayoutParams(layoutParams);\n\n\n        record_pause_button = (Button) rootView.findViewById(R.id.rec_stop_button);\n        record_pause_button.setOnClickListener(recordButtonClickListener);\n\n        recordLastMinuteButton = (Button) rootView.findViewById(R.id.record_last_minute);\n        recordLastMinuteButton.setOnClickListener(recordButtonClickListener);\n        recordLastMinuteButton.setOnLongClickListener(recordButtonClickListener);\n\n        recordLastFiveMinutesButton = (Button) rootView.findViewById(R.id.record_last_5_minutes);\n        recordLastFiveMinutesButton.setOnClickListener(recordButtonClickListener);\n        recordLastFiveMinutesButton.setOnLongClickListener(recordButtonClickListener);\n\n        recordLastThirtyMinuteButton = (Button) rootView.findViewById(R.id.record_last_30_minutes);\n        recordLastThirtyMinuteButton.setOnClickListener(recordButtonClickListener);\n        recordLastThirtyMinuteButton.setOnLongClickListener(recordButtonClickListener);\n\n        recordLastTwoHrsButton = (Button) rootView.findViewById(R.id.record_last_2_hrs);\n        recordLastTwoHrsButton.setOnClickListener(recordButtonClickListener);\n        recordLastTwoHrsButton.setOnLongClickListener(recordButtonClickListener);\n\n        recordLastSixHrsButton = (Button) rootView.findViewById(R.id.record_last_6_hrs);\n        recordLastSixHrsButton.setOnClickListener(recordButtonClickListener);\n        recordLastSixHrsButton.setOnLongClickListener(recordButtonClickListener);\n\n        recordMaxButton = (Button) rootView.findViewById(R.id.record_last_max);\n        recordMaxButton.setOnClickListener(recordButtonClickListener);\n        recordMaxButton.setOnLongClickListener(recordButtonClickListener);\n\n        ready_section = (LinearLayout) rootView.findViewById(R.id.ready_section);\n        rec_section = (LinearLayout) rootView.findViewById(R.id.rec_section);\n        rec_indicator = (TextView) rootView.findViewById(R.id.rec_indicator);\n        rec_time = (TextView) rootView.findViewById(R.id.rec_time);\n\n        rate_on_google_play = (ImageButton) rootView.findViewById(R.id.rate_on_google_play);\n\n        final Animation pulse = AnimationUtils.loadAnimation(activity, R.anim.pulse);\n        heart = (ImageView) rootView.findViewById(R.id.heart);\n        heart.startAnimation(pulse);\n\n        rate_on_google_play.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                try {\n                    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://github.com/mafik/echo\")));\n                } catch (android.content.ActivityNotFoundException anfe) {\n                    // ignore\n                }\n            }\n        });\n\n        heart.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                heart.animate().scaleX(10).scaleY(10).alpha(0).setDuration(2000).start();\n                Handler handler = new Handler(activity.getMainLooper());\n                handler.postDelayed(new Runnable() {\n                    @Override\n                    public void run() {\n                        // star the app\n                        try {\n                            startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://github.com/sponsors/mafik\")));\n                        } catch (android.content.ActivityNotFoundException anfe) {\n                            // ignore\n                        }\n                    }\n                }, 1000);\n                handler.postDelayed(new Runnable() {\n                    @Override\n                    public void run() {\n                        heart.setAlpha(0f);\n                        heart.setScaleX(1);\n                        heart.setScaleY(1);\n                        heart.animate().alpha(1).start();\n\n                    }\n                }, 3000);\n            }\n        });\n\n        rootView.findViewById(R.id.settings_button).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                startActivity(new Intent(activity, SettingsActivity.class));\n            }\n        });\n        serviceStateCallback.state(isListening, isRecording, 0, 0, 0);\n        return rootView;\n    }\n\n    private SaidItService.StateCallback serviceStateCallback = new SaidItService.StateCallback() {\n        @Override\n        public void state(final boolean listeningEnabled, final boolean recording, final float memorized, final float totalMemory, final float recorded) {\n            final Activity activity = getActivity();\n            if (activity == null) return;\n            final Resources resources = activity.getResources();\n            if ((isRecording != recording) || (isListening != listeningEnabled)) {\n                if (recording != isRecording) {\n                    isRecording = recording;\n                    if (recording) {\n                        rec_section.setVisibility(View.VISIBLE);\n                    } else {\n                        rec_section.setVisibility(View.GONE);\n                    }\n                }\n\n                if (listeningEnabled != isListening) {\n                    isListening = listeningEnabled;\n                    if (listeningEnabled) {\n                        listenButton.setText(R.string.listening_enabled_disable);\n                        listenButton.setBackgroundResource(R.drawable.top_green_button);\n                        listenButton.setShadowLayer(0.01f, 0, resources.getDimensionPixelOffset(R.dimen.shadow_offset), resources.getColor(R.color.dark_green));\n                    } else {\n                        listenButton.setText(R.string.listening_disabled_enable);\n                        listenButton.setBackgroundResource(R.drawable.top_gray_button);\n                        listenButton.setShadowLayer(0.01f, 0, resources.getDimensionPixelOffset(R.dimen.shadow_offset), 0xff666666);\n                    }\n                }\n\n                if (listeningEnabled && !recording) {\n                    ready_section.setVisibility(View.VISIBLE);\n                } else {\n                    ready_section.setVisibility(View.GONE);\n                }\n            }\n\n            TimeFormat.naturalLanguage(resources, totalMemory, timeFormatResult);\n\n            if (!history_limit.getText().equals(timeFormatResult.text)) {\n                history_limit.setText(timeFormatResult.text);\n            }\n\n            TimeFormat.naturalLanguage(resources, memorized, timeFormatResult);\n\n            if (!history_size.getText().equals(timeFormatResult.text)) {\n                history_size_title.setText(resources.getQuantityText(R.plurals.history_size_title, timeFormatResult.count));\n                history_size.setText(timeFormatResult.text);\n                recordMaxButton.setText(TimeFormat.shortTimer(memorized));\n            }\n\n            TimeFormat.naturalLanguage(resources, recorded, timeFormatResult);\n\n            if (!rec_time.getText().equals(timeFormatResult.text)) {\n                rec_indicator.setText(resources.getQuantityText(R.plurals.recorded, timeFormatResult.count));\n                rec_time.setText(timeFormatResult.text);\n            }\n\n            history_size.postOnAnimationDelayed(updater, 100);\n        }\n    };\n\n    final TimeFormat.Result timeFormatResult = new TimeFormat.Result();\n\n\n    private class ListenButtonClickListener implements View.OnClickListener {\n\n        @SuppressLint(\"ValidFragment\")\n        final WorkingDialog dialog = new WorkingDialog();\n\n        public ListenButtonClickListener() {\n            dialog.setDescriptionStringId(R.string.work_preparing_memory);\n        }\n\n        @Override\n        public void onClick(View v) {\n            echo.getState(new SaidItService.StateCallback() {\n                @Override\n                public void state(final boolean listeningEnabled, boolean recording, float memorized, float totalMemory, float recorded) {\n                    if (listeningEnabled) {\n                        echo.disableListening();\n                    } else {\n                        dialog.show(getFragmentManager(), \"Preparing memory\");\n\n                        new Handler().post(new Runnable() {\n                            @Override\n                            public void run() {\n                                echo.enableListening();\n                                echo.getState(new SaidItService.StateCallback() {\n                                    @Override\n                                    public void state(boolean listeningEnabled, boolean recording, float memorized, float totalMemory, float recorded) {\n                                        dialog.dismiss();\n                                    }\n                                });\n                            }\n                        });\n                    }\n                }\n            });\n        }\n    }\n\n    private class RecordButtonClickListener implements View.OnClickListener, View.OnLongClickListener {\n\n        @Override\n        public void onClick(final View v) {\n            record(v, false);\n        }\n\n        @Override\n        public boolean onLongClick(final View v) {\n            record(v, true);\n            return true;\n        }\n\n        public void record(final View button, final boolean keepRecording) {\n            echo.getState(new SaidItService.StateCallback() {\n                @Override\n                public void state(final boolean listeningEnabled, final boolean recording, float memorized, float totalMemory, float recorded) {\n                    getActivity().runOnUiThread(new Runnable() {\n                        @Override\n                        public void run() {\n                            if (recording) {\n                                echo.stopRecording(new PromptFileReceiver(getActivity()),\"\");\n                            } else {\n                                ProgressDialog pd = new ProgressDialog(getActivity());\n                                pd.setMessage(\"Recording...\");\n                                pd.show();\n                                final float seconds = getPrependedSeconds(button);\n                                if (keepRecording) {\n                                    echo.startRecording(seconds);\n                                } else {\n                                    //create alert dialog with exittext to name the file\n                                    View dialogView = View.inflate(getActivity(), R.layout.dialog_save_recording, null);\n                                    EditText fileName = dialogView.findViewById(R.id.recording_name);\n                                    new AlertDialog.Builder(getActivity())\n                                        .setView(dialogView)\n                                        .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n                                            @Override\n                                            public void onClick(DialogInterface dialog, int which) {\n                                                if(fileName.getText().toString().length() > 0){\n                                                    echo.dumpRecording(seconds, new PromptFileReceiver(getActivity()),fileName.getText().toString());\n                                                } else {\n                                                    Toast.makeText(getActivity(), \"Please enter a file name\", Toast.LENGTH_SHORT).show();\n                                                }\n                                            }\n                                        })\n                                        .setNegativeButton(\"Cancel\", null)\n                                        .show();\n                                    pd.dismiss();\n                                }\n                            }\n                        }\n                    });\n                }\n            });\n        }\n\n        float getPrependedSeconds(View button) {\n            switch (button.getId()) {\n                case R.id.record_last_minute:\n                    return 60;\n                case R.id.record_last_5_minutes:\n                    return 60 * 5;\n                case R.id.record_last_30_minutes:\n                    return 60 * 30;\n                case R.id.record_last_2_hrs:\n                    return 60 * 60 * 2;\n                case R.id.record_last_6_hrs:\n                    return 60 * 60 * 6;\n                case R.id.record_last_max:\n                    return 60 * 60 * 24 * 365;\n            }\n            return 0;\n        }\n    }\n\n    static Notification buildNotificationForFile(Context context, File outFile) {\n        Intent intent = new Intent(Intent.ACTION_VIEW);\n        Uri fileUri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + \".provider\", outFile);\n        intent.setDataAndType(fileUri, \"audio/wav\");\n        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); // Grant read permission to the receiving app\n\n        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);\n\n        NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, YOUR_NOTIFICATION_CHANNEL_ID)\n                .setContentTitle(context.getString(R.string.recording_saved))\n                .setContentText(outFile.getName())\n                .setSmallIcon(R.drawable.ic_stat_notify_recorded)\n                .setTicker(outFile.getName())\n                .setContentIntent(pendingIntent)\n                .setAutoCancel(true);\n        notificationBuilder.setPriority(NotificationCompat.PRIORITY_DEFAULT);\n        notificationBuilder.setCategory(NotificationCompat.CATEGORY_MESSAGE);\n        return notificationBuilder.build();\n    }\n\n    static class NotifyFileReceiver implements SaidItService.WavFileReceiver {\n\n        private Context context;\n\n        public NotifyFileReceiver(Context context) {\n            this.context = context;\n        }\n\n        @Override\n        public void fileReady(final File file, float runtime) {\n            NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n            if (ActivityCompat.checkSelfPermission(context, android.Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {\n                // TODO: Consider calling\n                //    ActivityCompat#requestPermissions\n                // here to request the missing permissions, and then overriding\n                //   public void onRequestPermissionsResult(int requestCode, String[] permissions,\n                //                                          int[] grantResults)\n                // to handle the case where the user grants the permission. See the documentation\n                // for ActivityCompat#requestPermissions for more details.\n                return;\n            }\n            notificationManager.notify(43, buildNotificationForFile(context, file));\n        }\n    }\n\n    static class PromptFileReceiver implements SaidItService.WavFileReceiver {\n\n        private Activity activity;\n\n        public PromptFileReceiver(Activity activity) {\n            this.activity = activity;\n        }\n\n        @Override\n        public void fileReady(final File file, float runtime) {\n            new RecordingDoneDialog()\n                    .setFile(file)\n                    .setRuntime(runtime)\n                    .show(activity.getFragmentManager(), \"Recording Done\");\n        }\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/SaidItService.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.annotation.SuppressLint;\nimport android.app.AlarmManager;\nimport android.app.Notification;\nimport android.app.NotificationChannel;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.app.Service;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.content.pm.ServiceInfo;\nimport android.media.AudioFormat;\nimport android.media.AudioManager;\nimport android.media.AudioRecord;\nimport android.media.AudioTrack;\nimport android.media.MediaRecorder;\nimport android.os.Binder;\nimport android.os.Build;\nimport android.os.Environment;\nimport android.os.Handler;\nimport android.os.HandlerThread;\nimport android.os.IBinder;\nimport android.os.Looper;\nimport android.os.SystemClock;\nimport androidx.core.app.NotificationCompat;\nimport android.text.format.DateUtils;\nimport android.util.Log;\nimport android.widget.Toast;\n\nimport java.io.File;\nimport java.io.IOException;\n\nimport simplesound.pcm.WavAudioFormat;\nimport simplesound.pcm.WavFileWriter;\nimport static eu.mrogalski.saidit.SaidIt.*;\n\npublic class SaidItService extends Service {\n    static final String TAG = SaidItService.class.getSimpleName();\n    private static final int FOREGROUND_NOTIFICATION_ID = 458;\n    private static final String YOUR_NOTIFICATION_CHANNEL_ID = \"SaidItServiceChannel\";\n\n    volatile int SAMPLE_RATE;\n    volatile int FILL_RATE;\n\n\n    File wavFile;\n    AudioRecord audioRecord; // used only in the audio thread\n    WavFileWriter wavFileWriter; // used only in the audio thread\n    final AudioMemory audioMemory = new AudioMemory(); // used only in the audio thread\n\n    HandlerThread audioThread;\n    Handler audioHandler; // used to post messages to audio thread\n\n    @Override\n    public void onCreate() {\n\n        Log.d(TAG, \"Reading native sample rate\");\n\n        final SharedPreferences preferences = this.getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE);\n        SAMPLE_RATE = preferences.getInt(SAMPLE_RATE_KEY, AudioTrack.getNativeOutputSampleRate (AudioManager.STREAM_MUSIC));\n        Log.d(TAG, \"Sample rate: \" + SAMPLE_RATE);\n        FILL_RATE = 2 * SAMPLE_RATE;\n\n        audioThread = new HandlerThread(\"audioThread\", Thread.MAX_PRIORITY);\n        audioThread.start();\n        audioHandler = new Handler(audioThread.getLooper());\n\n        if(preferences.getBoolean(AUDIO_MEMORY_ENABLED_KEY, true)) {\n            innerStartListening();\n        }\n\n    }\n\n    @Override\n    public void onDestroy() {\n        stopRecording(null, \"\");\n        innerStopListening();\n        stopForeground(true);\n    }\n\n    @Override\n    public IBinder onBind(Intent intent) {\n        return new BackgroundRecorderBinder();\n    }\n\n    @Override\n    public boolean onUnbind(Intent intent) {\n        return true;\n    }\n\n    public void enableListening() {\n        getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE)\n                .edit().putBoolean(AUDIO_MEMORY_ENABLED_KEY, true).commit();\n\n        innerStartListening();\n    }\n\n    public void disableListening() {\n        getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE)\n                .edit().putBoolean(AUDIO_MEMORY_ENABLED_KEY, false).commit();\n\n        innerStopListening();\n    }\n\n    int state;\n\n    static final int STATE_READY = 0;\n    static final int STATE_LISTENING = 1;\n    static final int STATE_RECORDING = 2;\n\n    private void innerStartListening() {\n        switch(state) {\n            case STATE_READY:\n                break;\n            case STATE_LISTENING:\n            case STATE_RECORDING:\n                return;\n        }\n        state = STATE_LISTENING;\n\n        Log.d(TAG, \"Queueing: START LISTENING\");\n\n        startService(new Intent(this, this.getClass()));\n\n        final long memorySize = getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE).getLong(AUDIO_MEMORY_SIZE_KEY, Runtime.getRuntime().maxMemory() / 4);\n\n        audioHandler.post(new Runnable() {\n            @SuppressLint(\"MissingPermission\")\n            @Override\n            public void run() {\n                Log.d(TAG, \"Executing: START LISTENING\");\n                Log.d(TAG, \"Audio: INITIALIZING AUDIO_RECORD\");\n\n                audioRecord = new AudioRecord(\n                       MediaRecorder.AudioSource.MIC,\n                       SAMPLE_RATE,\n                       AudioFormat.CHANNEL_IN_MONO,\n                       AudioFormat.ENCODING_PCM_16BIT,\n                       AudioMemory.CHUNK_SIZE);\n\n                if(audioRecord.getState() != AudioRecord.STATE_INITIALIZED) {\n                    Log.e(TAG, \"Audio: INITIALIZATION ERROR - releasing resources\");\n                    audioRecord.release();\n                    audioRecord = null;\n                    state = STATE_READY;\n                    return;\n                }\n\n                Log.d(TAG, \"Audio: STARTING AudioRecord\");\n                audioMemory.allocate(memorySize);\n\n                Log.d(TAG, \"Audio: STARTING AudioRecord\");\n                audioRecord.startRecording();\n                audioHandler.post(audioReader);\n            }\n        });\n\n\n    }\n\n    private void innerStopListening() {\n        switch(state) {\n            case STATE_READY:\n            case STATE_RECORDING:\n                return;\n            case STATE_LISTENING:\n                break;\n        }\n        state = STATE_READY;\n        Log.d(TAG, \"Queueing: STOP LISTENING\");\n\n        stopForeground(true);\n        stopService(new Intent(this, this.getClass()));\n\n        audioHandler.post(new Runnable() {\n            @Override\n            public void run() {\n                Log.d(TAG, \"Executing: STOP LISTENING\");\n                if(audioRecord != null)\n                    audioRecord.release();\n                audioHandler.removeCallbacks(audioReader);\n                audioMemory.allocate(0);\n            }\n        });\n\n    }\n\n    public void dumpRecording(final float memorySeconds, final WavFileReceiver wavFileReceiver, String newFileName) {\n        if(state != STATE_LISTENING) throw new IllegalStateException(\"Not listening!\");\n\n        audioHandler.post(new Runnable() {\n            @Override\n            public void run() {\n                flushAudioRecord();\n                int prependBytes = (int)(memorySeconds * FILL_RATE);\n                int bytesAvailable = audioMemory.countFilled();\n\n                int skipBytes = Math.max(0, bytesAvailable - prependBytes);\n\n                int useBytes = bytesAvailable - skipBytes;\n                long millis  = System.currentTimeMillis() - 1000 * useBytes / FILL_RATE;\n                final int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_SHOW_DATE;\n                final String dateTime = DateUtils.formatDateTime(SaidItService.this, millis, flags);\n                String filename = \"Echo - \" + dateTime + \".wav\";\n                if(!newFileName.equals(\"\")){\n                    filename = newFileName + \".wav\";\n                }\n\n                File storageDir;\n                if(isExternalStorageWritable()){\n                    // Use public storage directory for Android 11+ (min SDK 30)\n                    storageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC), \"Echo\");\n                }else{\n                    storageDir = new File(getFilesDir(), \"Echo\");\n                }\n\n                if(!storageDir.exists()){\n                    storageDir.mkdir();\n                }\n                File file = new File(storageDir, filename);\n\n                // Create the file if it doesn't exist\n                if (!file.exists()) {\n                    try {\n                        if (!file.createNewFile()) {\n                            // Handle file creation failure\n                            throw new IOException(\"Failed to create file\");\n                        }\n                    } catch (IOException e) {\n                        e.printStackTrace();\n                        // Handle IOException\n                        showToast(getString(R.string.cant_create_file) + file.getAbsolutePath());\n                    }\n                }\n                final WavAudioFormat format = new WavAudioFormat.Builder().sampleRate(SAMPLE_RATE).build();\n                try (WavFileWriter writer = new WavFileWriter(format, file)) {\n                    try {\n                        audioMemory.read(skipBytes, new AudioMemory.Consumer() {\n                            @Override\n                            public int consume(byte[] array, int offset, int count) throws IOException {\n                                writer.write(array, offset, count);\n                                return 0;\n                            }\n                        });\n                    } catch (IOException e) {\n                        // Handle error during file writing\n                        showToast(getString(R.string.error_during_writing_history_into) + file.getAbsolutePath());\n                        Log.e(TAG, \"Error during writing history into \" + file.getAbsolutePath(), e);\n                    }\n                    if (wavFileReceiver != null) {\n                        wavFileReceiver.fileReady(file, writer.getTotalSampleBytesWritten() * getBytesToSeconds());\n                    }\n                } catch (IOException e) {\n                    // Handle error during file creation or closing writer\n                    showToast(getString(R.string.cant_create_file) + file.getAbsolutePath());\n                    Log.e(TAG, \"Can't create file \" + file.getAbsolutePath(), e);\n                }\n            }\n        });\n\n    }\n    private static boolean isExternalStorageWritable() {\n        String state = Environment.getExternalStorageState();\n        return Environment.MEDIA_MOUNTED.equals(state);\n    }\n    private void showToast(String message) {\n        Toast.makeText(SaidItService.this, message, Toast.LENGTH_LONG).show();\n    }\n\n    public void startRecording(final float prependedMemorySeconds) {\n        switch(state) {\n            case STATE_READY:\n                innerStartListening();\n                break;\n            case STATE_LISTENING:\n                break;\n            case STATE_RECORDING:\n                return;\n        }\n        state = STATE_RECORDING;\n\n        audioHandler.post(new Runnable() {\n            @Override\n            public void run() {\n                flushAudioRecord();\n                int prependBytes = (int)(prependedMemorySeconds * FILL_RATE);\n                int bytesAvailable = audioMemory.countFilled();\n\n                int skipBytes = Math.max(0, bytesAvailable - prependBytes);\n\n                int useBytes = bytesAvailable - skipBytes;\n                long millis  = System.currentTimeMillis() - 1000 * useBytes / FILL_RATE;\n                final int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_SHOW_DATE;\n                final String dateTime = DateUtils.formatDateTime(SaidItService.this, millis, flags);\n                String filename = \"Echo - \" + dateTime + \".wav\";\n\n                File storageDir;\n                if(isExternalStorageWritable()){\n                    // Use public storage directory for Android 11+ (min SDK 30)\n                    storageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC), \"Echo\");\n                }else{\n                    storageDir = new File(getFilesDir(), \"Echo\");\n                }\n                final String storagePath = storageDir.getAbsolutePath();\n\n                String path = storagePath + \"/\" + filename;\n\n                wavFile = new File(path);\n                try {\n                    wavFile.createNewFile();\n                } catch (IOException e) {\n                    filename = filename.replace(':', '.');\n                    path = storagePath + \"/\" + filename;\n                    wavFile = new File(path);\n                }\n                WavAudioFormat format = new WavAudioFormat.Builder().sampleRate(SAMPLE_RATE).build();\n                try {\n                    wavFileWriter = new WavFileWriter(format, wavFile);\n                } catch (IOException e) {\n                    final String errorMessage = getString(R.string.cant_create_file) + path;\n                    Toast.makeText(SaidItService.this, errorMessage, Toast.LENGTH_LONG).show();\n                    Log.e(TAG, errorMessage, e);\n                    return;\n                }\n\n                final String finalPath = path;\n\n                if(skipBytes < bytesAvailable) {\n                    try {\n                        audioMemory.read(skipBytes, new AudioMemory.Consumer() {\n                            @Override\n                            public int consume(byte[] array, int offset, int count) throws IOException {\n                                wavFileWriter.write(array, offset, count);\n                                return 0;\n                            }\n                        });\n                    } catch (IOException e) {\n                        final String errorMessage = getString(R.string.error_during_writing_history_into) + finalPath;\n                        Toast.makeText(SaidItService.this, errorMessage, Toast.LENGTH_LONG).show();\n                        Log.e(TAG, errorMessage, e);\n                        stopRecording(new SaidItFragment.NotifyFileReceiver(SaidItService.this), \"\");\n                    }\n                }\n            }\n        });\n\n    }\n\n    public long getMemorySize() {\n        return audioMemory.getAllocatedMemorySize();\n    }\n\n    public void setMemorySize(final long memorySize) {\n        final SharedPreferences preferences = this.getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE);\n        preferences.edit().putLong(AUDIO_MEMORY_SIZE_KEY, memorySize).commit();\n\n        if(preferences.getBoolean(AUDIO_MEMORY_ENABLED_KEY, true)) {\n            audioHandler.post(new Runnable() {\n                @Override\n                public void run() {\n                    audioMemory.allocate(memorySize);\n                }\n            });\n        }\n    }\n\n    public int getSamplingRate() {\n        return SAMPLE_RATE;\n    }\n\n    public void setSampleRate(int sampleRate) {\n        switch(state) {\n            case STATE_READY:\n            case STATE_RECORDING:\n                return;\n            case STATE_LISTENING:\n                break;\n        }\n\n        final SharedPreferences preferences = this.getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE);\n        preferences.edit().putInt(SAMPLE_RATE_KEY, sampleRate).commit();\n\n        innerStopListening();\n        SAMPLE_RATE = sampleRate;\n        FILL_RATE = 2 * SAMPLE_RATE;\n        innerStartListening();\n    }\n\n    public interface WavFileReceiver {\n        public void fileReady(File file, float runtime);\n    }\n\n    public void stopRecording(final WavFileReceiver wavFileReceiver, String newFileName) {\n        switch(state) {\n            case STATE_READY:\n            case STATE_LISTENING:\n                return;\n            case STATE_RECORDING:\n                break;\n        }\n        state = STATE_LISTENING;\n\n        audioHandler.post(new Runnable() {\n            @Override\n            public void run() {\n                flushAudioRecord();\n                try {\n                    wavFileWriter.close();\n                } catch (IOException e) {\n                    Log.e(TAG, \"CLOSING ERROR\", e);\n                }\n                if(wavFileReceiver != null) {\n                    wavFileReceiver.fileReady(wavFile, wavFileWriter.getTotalSampleBytesWritten() * getBytesToSeconds());\n                }\n                wavFileWriter = null;\n            }\n        });\n\n        final SharedPreferences preferences = this.getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE);\n        if(!preferences.getBoolean(AUDIO_MEMORY_ENABLED_KEY, true)) {\n            innerStopListening();\n        }\n\n        stopForeground(true);\n    }\n\n    private void flushAudioRecord() {\n        // Only allowed on the audio thread\n        assert audioHandler.getLooper() == Looper.myLooper();\n        audioHandler.removeCallbacks(audioReader); // remove any delayed callbacks\n        audioReader.run();\n    }\n\n    final AudioMemory.Consumer filler = new AudioMemory.Consumer() {\n        @Override\n        public int consume(final byte[] array, final int offset, final int count) throws IOException {\n//            Log.d(TAG, \"READING \" + count + \" B\");\n            final int read = audioRecord.read(array, offset, count, AudioRecord.READ_NON_BLOCKING);\n            if (read == AudioRecord.ERROR_BAD_VALUE) {\n                Log.e(TAG, \"AUDIO RECORD ERROR - BAD VALUE\");\n                return 0;\n            }\n            if (read == AudioRecord.ERROR_INVALID_OPERATION) {\n                Log.e(TAG, \"AUDIO RECORD ERROR - INVALID OPERATION\");\n                return 0;\n            }\n            if (read == AudioRecord.ERROR) {\n                Log.e(TAG, \"AUDIO RECORD ERROR - UNKNOWN ERROR\");\n                return 0;\n            }\n            if (wavFileWriter != null && read > 0) {\n                wavFileWriter.write(array, offset, read);\n            }\n            if (read == count) {\n                // We've filled the buffer, so let's read again.\n                audioHandler.post(audioReader);\n            } else {\n                // It seems we've read everything!\n                //\n                // Estimate how long do we have until audioRecord fills up completely and post the callback 1 second before that\n                // (but not earlier than half the buffer and no later than 90% of the buffer).\n                float bufferSizeInSeconds = audioRecord.getBufferSizeInFrames() / (float)SAMPLE_RATE;\n                float delaySeconds = bufferSizeInSeconds - 1;\n                delaySeconds = Math.max(delaySeconds, bufferSizeInSeconds * 0.5f);\n                delaySeconds = Math.min(delaySeconds, bufferSizeInSeconds * 0.9f);\n                audioHandler.postDelayed(audioReader, (long)(delaySeconds * 1000));\n            }\n            return read;\n        }\n    };\n    final Runnable audioReader = new Runnable() {\n        @Override\n        public void run() {\n            try {\n                audioMemory.fill(filler);\n            } catch (IOException e) {\n                final String errorMessage = getString(R.string.error_during_recording_into) + wavFile.getName();\n                Toast.makeText(SaidItService.this, errorMessage, Toast.LENGTH_LONG).show();\n                Log.e(TAG, errorMessage, e);\n                stopRecording(new SaidItFragment.NotifyFileReceiver(SaidItService.this), \"\");\n            }\n        }\n    };\n\n    public interface StateCallback {\n        public void state(boolean listeningEnabled, boolean recording, float memorized, float totalMemory, float recorded);\n    }\n\n    public void getState(final StateCallback stateCallback) {\n        final SharedPreferences preferences = this.getSharedPreferences(PACKAGE_NAME, MODE_PRIVATE);\n        final boolean listeningEnabled = preferences.getBoolean(AUDIO_MEMORY_ENABLED_KEY, true);\n        final boolean recording = (state == STATE_RECORDING);\n        final Handler sourceHandler = new Handler();\n        // Note that we may not run this for quite a while, if audioReader decides to read a lot of audio!\n        audioHandler.post(new Runnable() {\n            @Override\n            public void run() {\n                flushAudioRecord();\n                final AudioMemory.Stats stats = audioMemory.getStats(FILL_RATE);\n                \n                int recorded = 0;\n                if(wavFileWriter != null) {\n                    recorded += wavFileWriter.getTotalSampleBytesWritten();\n                    recorded += stats.estimation;\n                }\n                final float bytesToSeconds = getBytesToSeconds();\n                final int finalRecorded = recorded;\n                sourceHandler.post(new Runnable() {\n                    @Override\n                    public void run() {\n                        stateCallback.state(listeningEnabled, recording,\n                                (stats.overwriting ? stats.total : stats.filled + stats.estimation) * bytesToSeconds,\n                                stats.total * bytesToSeconds,\n                                finalRecorded * bytesToSeconds);\n                    }\n                });\n            }\n        });\n    }\n\n    public float getBytesToSeconds() {\n        return 1f / FILL_RATE;\n    }\n\n    class BackgroundRecorderBinder extends Binder {\n        public SaidItService getService() {\n            return SaidItService.this;\n        }\n    }\n\n    @Override\n    public int onStartCommand(Intent intent, int flags, int startId) {\n        startForeground(FOREGROUND_NOTIFICATION_ID, buildNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE);\n        return START_STICKY;\n    }\n\n    // Workaround for bug where recent app removal caused service to stop\n    @Override\n    public void onTaskRemoved(Intent rootIntent) {\n        Intent restartServiceIntent = new Intent(getApplicationContext(), this.getClass());\n        restartServiceIntent.setPackage(getPackageName());\n\n        PendingIntent restartServicePendingIntent = PendingIntent.getService(this, 1, restartServiceIntent, PendingIntent.FLAG_ONE_SHOT| PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);\n        AlarmManager alarmService = (AlarmManager) getSystemService(ALARM_SERVICE);\n        alarmService.set(\n                AlarmManager.ELAPSED_REALTIME,\n                SystemClock.elapsedRealtime() + 1000,\n                restartServicePendingIntent);\n    }\n\n    private Notification buildNotification() {\n        Intent intent = new Intent(this, SaidItActivity.class);\n        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_IMMUTABLE);\n\n        NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, YOUR_NOTIFICATION_CHANNEL_ID)\n                .setContentTitle(getString(R.string.recording))\n                .setSmallIcon(R.drawable.ic_stat_notify_recording)\n                .setTicker(getString(R.string.recording))\n                .setContentIntent(pendingIntent)\n                .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n                .setOngoing(true); // Ensure notification is ongoing\n\n        // Create the notification channel\n        NotificationChannel channel = new NotificationChannel(\n                YOUR_NOTIFICATION_CHANNEL_ID,\n                \"Recording Channel\",\n                NotificationManager.IMPORTANCE_DEFAULT\n        );\n        NotificationManager notificationManager = getSystemService(NotificationManager.class);\n        notificationManager.createNotificationChannel(channel);\n\n        return notificationBuilder.build();\n    }\n\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/SettingsActivity.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.app.Activity;\nimport android.content.ComponentName;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.ServiceConnection;\nimport android.content.res.AssetManager;\nimport android.content.res.Resources;\nimport android.graphics.Rect;\nimport android.graphics.Typeface;\nimport android.media.AudioFormat;\nimport android.media.AudioRecord;\nimport android.media.MediaCodecInfo;\nimport android.media.MediaCodecList;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.IBinder;\nimport android.util.Log;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.FrameLayout;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\n\nimport eu.mrogalski.StringFormat;\nimport eu.mrogalski.android.TimeFormat;\nimport eu.mrogalski.android.Views;\n\npublic class SettingsActivity extends Activity {\n    static final String TAG = SettingsActivity.class.getSimpleName();\n    private final MemoryOnClickListener memoryClickListener = new MemoryOnClickListener();\n    private final QualityOnClickListener qualityClickListener = new QualityOnClickListener();\n\n\n    final WorkingDialog dialog = new WorkingDialog();\n\n    @Override\n    protected void onStart() {\n        super.onStart();\n        Intent intent = new Intent(this, SaidItService.class);\n        bindService(intent, connection, Context.BIND_AUTO_CREATE);\n    }\n\n    @Override\n    protected void onStop() {\n        super.onStop();\n        unbindService(connection);\n    }\n\n    SaidItService service;\n    ServiceConnection connection = new ServiceConnection() {\n\n        @Override\n        public void onServiceConnected(ComponentName className,\n                                       IBinder binder) {\n            SaidItService.BackgroundRecorderBinder typedBinder = (SaidItService.BackgroundRecorderBinder) binder;\n            service = typedBinder.getService();\n            syncUI();\n        }\n\n        @Override\n        public void onServiceDisconnected(ComponentName arg0) {\n            service = null;\n        }\n    };\n\n    final TimeFormat.Result timeFormatResult = new TimeFormat.Result();\n\n    private void syncUI() {\n        final long maxMemory = Runtime.getRuntime().maxMemory();\n        System.out.println(\"maxMemory = \" + maxMemory);\n        System.out.println(\"totalMemory = \" + Runtime.getRuntime().totalMemory());\n\n        ((Button) findViewById(R.id.memory_low)).setText(StringFormat.shortFileSize(maxMemory / 4));\n        ((Button) findViewById(R.id.memory_medium)).setText(StringFormat.shortFileSize(maxMemory / 2));\n//        ((Button) findViewById(R.id.memory_high)).setText(StringFormat.shortFileSize(maxMemory * 3 / 4));\n        ((Button) findViewById(R.id.memory_high)).setText(StringFormat.shortFileSize((long) (maxMemory * 0.90)));\n\n\n        TimeFormat.naturalLanguage(getResources(), service.getBytesToSeconds() * service.getMemorySize(), timeFormatResult);\n        ((TextView)findViewById(R.id.history_limit)).setText(timeFormatResult.text);\n\n        highlightButtons();\n    }\n\n    void highlightButtons() {\n        final long maxMemory = Runtime.getRuntime().maxMemory();\n\n        int button = (int)(service.getMemorySize() / (maxMemory / 4)); // 1 - memory_low; 2 - memory_medium; 3 - memory_high\n        highlightButton(R.id.memory_low, R.id.memory_medium, R.id.memory_high, button);\n\n        int samplingRate = service.getSamplingRate();\n        if(samplingRate >= 44100) button = 3;\n        else if(samplingRate >= 16000) button = 2;\n        else button = 1;\n        highlightButton(R.id.quality_8kHz, R.id.quality_16kHz, R.id.quality_48kHz, button);\n    }\n\n    private void highlightButton(int button1, int button2, int button3, int i) {\n        findViewById(button1).setBackgroundResource(1 == i ? R.drawable.green_button : R.drawable.gray_button);\n        findViewById(button2).setBackgroundResource(2 == i ? R.drawable.green_button : R.drawable.gray_button);\n        findViewById(button3).setBackgroundResource(3 == i ? R.drawable.green_button : R.drawable.gray_button);\n    }\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n\n        final AssetManager assets = getAssets();\n        final Resources resources = getResources();\n\n        final float density = resources.getDisplayMetrics().density;\n\n        final Typeface robotoCondensedBold = Typeface.createFromAsset(assets,\"RobotoCondensedBold.ttf\");\n        final Typeface robotoCondensedRegular = Typeface.createFromAsset(assets, \"RobotoCondensed-Regular.ttf\");\n\n        final ViewGroup root = (ViewGroup) getLayoutInflater().inflate(R.layout.activity_settings, null);\n        Views.search(root, new Views.SearchViewCallback() {\n            @Override\n            public void onView(View view, ViewGroup parent) {\n                if(view instanceof Button) {\n                    final Button button = (Button) view;\n                    button.setTypeface(robotoCondensedBold);\n                } else if(view instanceof TextView) {\n                    final String tag = (String) view.getTag();\n                    final TextView textView = (TextView) view;\n                    if(tag != null) {\n                        if(tag.equals(\"bold\")) {\n                            textView.setTypeface(robotoCondensedBold);\n                        } else {\n                            textView.setTypeface(robotoCondensedRegular);\n                        }\n                    } else {\n                        textView.setTypeface(robotoCondensedRegular);\n                    }\n                }\n            }\n        });\n\n        root.findViewById(R.id.settings_return).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                finish();\n            }\n        });\n\n        final LinearLayout settingsLayout = (LinearLayout) root.findViewById(R.id.settings_layout);\n\n        final FrameLayout myFrameLayout = new FrameLayout(this) {\n            @Override\n            protected boolean fitSystemWindows(Rect insets) {\n                settingsLayout.setPadding(insets.left, insets.top, insets.right, insets.bottom);\n                return true;\n            }\n        };\n\n        myFrameLayout.addView(root);\n\n        root.findViewById(R.id.memory_low).setOnClickListener(memoryClickListener);\n        root.findViewById(R.id.memory_medium).setOnClickListener(memoryClickListener);\n        root.findViewById(R.id.memory_high).setOnClickListener(memoryClickListener);\n\n        initSampleRateButton(root, R.id.quality_8kHz, 8000, 11025);\n        initSampleRateButton(root, R.id.quality_16kHz, 16000, 22050);\n        initSampleRateButton(root, R.id.quality_48kHz, 48000, 44100);\n\n        //debugPrintCodecs();\n\n        dialog.setDescriptionStringId(R.string.work_preparing_memory);\n\n        setContentView(myFrameLayout);\n    }\n\n    private void debugPrintCodecs() {\n        final int codecCount = MediaCodecList.getCodecCount();\n        for(int i = 0; i < codecCount; ++i) {\n            final MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);\n            if(!info.isEncoder()) continue;\n            boolean audioFound = false;\n            String types = \"\";\n            final String[] supportedTypes = info.getSupportedTypes();\n            for(int j = 0; j < supportedTypes.length; ++j) {\n                if(j > 0)\n                    types += \", \";\n                types += supportedTypes[j];\n                if(supportedTypes[j].startsWith(\"audio\")) audioFound = true;\n            }\n            if(!audioFound) continue;\n            Log.d(TAG, \"Codec \" + i + \": \" + info.getName() + \" (\" + types + \") encoder: \" + info.isEncoder());\n        }\n    }\n\n    private void initSampleRateButton(ViewGroup layout, int buttonId, int primarySampleRate, int secondarySampleRate) {\n        Button button = (Button) layout.findViewById(buttonId);\n        button.setOnClickListener(qualityClickListener);\n        if(testSampleRateValid(primarySampleRate)) {\n            button.setText(String.format(\"%d kHz\", primarySampleRate / 1000));\n            button.setTag(primarySampleRate);\n        } else if(testSampleRateValid(secondarySampleRate)) {\n            button.setText(String.format(\"%d kHz\", secondarySampleRate / 1000));\n            button.setTag(secondarySampleRate);\n        } else {\n            button.setVisibility(View.GONE);\n        }\n    }\n\n    private boolean testSampleRateValid(int sampleRate) {\n        final int bufferSize = AudioRecord.getMinBufferSize(sampleRate, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT);\n        return bufferSize > 0;\n    }\n\n    private class MemoryOnClickListener implements View.OnClickListener {\n        @Override\n        public void onClick(View v) {\n            final long memory = getMultiplier(v) * Runtime.getRuntime().maxMemory() / 4;\n            dialog.show(getFragmentManager(), \"Preparing memory\");\n\n            new Handler().post(new Runnable() {\n                @Override\n                public void run() {\n                    service.setMemorySize(memory);\n                    service.getState(new SaidItService.StateCallback() {\n                        @Override\n                        public void state(boolean listeningEnabled, boolean recording, float memorized, float totalMemory, float recorded) {\n                            syncUI();\n                            if (dialog.isVisible()) dialog.dismiss();\n                        }\n                    });\n                }\n            });\n        }\n\n        private int getMultiplier(View button) {\n            switch (button.getId()) {\n                case R.id.memory_high: return 3;\n                case R.id.memory_medium: return 2;\n                case R.id.memory_low: return 1;\n            }\n            return 0;\n        }\n    }\n\n    private class QualityOnClickListener implements View.OnClickListener {\n        @Override\n        public void onClick(View v) {\n            final int sampleRate = getSampleRate(v);\n            dialog.show(getFragmentManager(), \"Preparing memory\");\n\n            new Handler().post(new Runnable() {\n                @Override\n                public void run() {\n                    service.setSampleRate(sampleRate);\n                    service.getState(new SaidItService.StateCallback() {\n                        @Override\n                        public void state(boolean listeningEnabled, boolean recording, float memorized, float totalMemory, float recorded) {\n                            syncUI();\n                            if (dialog.isVisible()) dialog.dismiss();\n                        }\n                    });\n                }\n            });\n        }\n\n        private int getSampleRate(View button) {\n            Object tag = button.getTag();\n            if(tag instanceof Integer) {\n                return ((Integer) tag).intValue();\n            }\n            return 8000;\n        }\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/ThemedDialog.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.app.Activity;\nimport android.app.Dialog;\nimport android.app.DialogFragment;\nimport android.content.res.AssetManager;\nimport android.content.res.Resources;\nimport android.graphics.Typeface;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.Window;\nimport android.widget.Button;\nimport android.widget.TextView;\n\nimport eu.mrogalski.android.Views;\n\npublic class ThemedDialog extends DialogFragment {\n    static final String TAG = ThemedDialog.class.getName();\n\n    @Override\n    public Dialog onCreateDialog(Bundle savedInstanceState) {\n        final Dialog dialog = super.onCreateDialog(savedInstanceState);\n        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n        dialog.getWindow().getDecorView().setBackgroundDrawable(null);\n        //set dialog width to 90% of screen width\n        dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n        return dialog;\n    }\n\n    protected void fixFonts(View root) {\n        final Activity activity = getActivity();\n        final Resources resources = activity.getResources();\n\n        final AssetManager assets = activity.getAssets();\n\n        final Typeface robotoCondensedBold = Typeface.createFromAsset(assets,\"RobotoCondensedBold.ttf\");\n        final Typeface robotoCondensedRegular = Typeface.createFromAsset(assets, \"RobotoCondensed-Regular.ttf\");\n\n        final float density = resources.getDisplayMetrics().density;\n\n        Views.search((ViewGroup) root, new Views.SearchViewCallback() {\n            @Override\n            public void onView(View view, ViewGroup parent) {\n                if (view instanceof Button) {\n                    final Button button = (Button) view;\n                    button.setTypeface(robotoCondensedRegular);\n                } else if (view instanceof TextView) {\n                    final String tag = (String) view.getTag();\n                    final TextView textView = (TextView) view;\n                    if (tag != null) {\n                        if (tag.equals(\"titleBar\")) {\n                            textView.setTypeface(robotoCondensedBold);\n                            textView.setShadowLayer(0.01f, 0, density * 2, resources.getColor(getShadowColorId()));\n                        } else if (tag.equals(\"bold\")) {\n                            textView.setTypeface(robotoCondensedBold);\n                        }\n                    } else {\n                        textView.setTypeface(robotoCondensedRegular);\n                    }\n                }\n            }\n        });\n    }\n\n    int getShadowColorId() {\n        return R.color.dark_green;\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/UserInfo.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.accounts.Account;\nimport android.accounts.AccountManager;\nimport android.content.Context;\nimport android.provider.Settings;\nimport android.telephony.TelephonyManager;\nimport android.util.Patterns;\n\nimport java.util.regex.Pattern;\n\npublic class UserInfo {\n\n    public static String getUserPhoneNumber(Context c) {\n        final TelephonyManager tMgr = (TelephonyManager)c.getSystemService(Context.TELEPHONY_SERVICE);\n        return tMgr.getLine1Number();\n    }\n\n    /*\n    First - try phone ID\n    Second - try user email\n    Third - try system ID\n     */\n    public static String getUserID(Context c) {\n        final TelephonyManager tMgr = (TelephonyManager)c.getSystemService(Context.TELEPHONY_SERVICE);\n        String id = tMgr.getDeviceId();\n        if(id != null) {\n            return \"device-id:\" + id;\n        }\n\n        AccountManager accountManager = AccountManager.get(c);\n        Account[] accounts = accountManager.getAccountsByType(\"com.google\");\n        for (Account a: accounts) {\n            if (a.name.contains(\"@gmail.com\")) {\n                return \"email:\" + a.name;\n            }\n        }\n\n        return \"android-id:\" + Settings.Secure.getString(c.getContentResolver(), Settings.Secure.ANDROID_ID);\n    }\n\n    public static String getUserCountryCode(Context c) {\n\n        final TelephonyManager manager = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);\n        //getNetworkCountryIso\n        final String countryLetterCode = manager.getSimCountryIso().toUpperCase();\n        String[] rl = c.getResources().getStringArray(R.array.country_codes);\n        for (String aRl : rl) {\n            String[] g = aRl.split(\",\");\n            if (g[1].trim().equals(countryLetterCode.trim())) {\n                return g[0];\n            }\n        }\n        return \"\";\n    }\n\n    public static String getUserEmail(Context c) {\n        Pattern emailPattern = Patterns.EMAIL_ADDRESS; // API level 8+\n        Account[] accounts = AccountManager.get(c).getAccounts();\n        for (Account account : accounts) {\n            if (emailPattern.matcher(account.name).matches()) {\n                return account.name;\n            }\n        }\n        return \"\";\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/eu/mrogalski/saidit/WorkingDialog.java",
    "content": "package eu.mrogalski.saidit;\n\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\n\npublic class WorkingDialog extends ThemedDialog {\n    private int descriptionStringId = R.string.work_default;\n\n    @Override\n    public void onSaveInstanceState( Bundle outState) {\n        super.onSaveInstanceState(outState);\n        outState.putInt(getDescriptionKey(), getDescriptionStringId());\n    }\n\n    private String getDescriptionKey() {\n        return WorkingDialog.class.getName() + \"_description_id\";\n    }\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        if(savedInstanceState != null && savedInstanceState.containsKey(getDescriptionKey())) {\n            descriptionStringId = savedInstanceState.getInt(getDescriptionKey());\n        }\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        final View root = inflater.inflate(R.layout.progress_dialog, container);\n\n        fixFonts(root);\n\n        setDescriptionOnView(root);\n\n        return root;\n    }\n\n    private void setDescriptionOnView(View root) {\n        ((TextView) root.findViewById(R.id.progress_description)).setText(getDescriptionStringId());\n    }\n\n\n    public int getDescriptionStringId() {\n        return descriptionStringId;\n    }\n\n    public void setDescriptionStringId(int descriptionStringId) {\n        this.descriptionStringId = descriptionStringId;\n        final View root = getView();\n        if(root != null) {\n            setDescriptionOnView(root);\n        }\n    }\n}\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/Complex.java",
    "content": "package simplesound.dsp;\r\n\r\npublic final class Complex {\r\n    \r\n    public final double real;\r\n    public final double imaginary;\r\n\r\n    public Complex(double real, double imaginary) {\r\n        this.real = real;\r\n        this.imaginary = imaginary;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/DoubleVector.java",
    "content": "package simplesound.dsp;\r\n\r\nimport java.util.Arrays;\r\n\r\n/**\r\n * a vector containing a double numbers.\r\n */\r\npublic class DoubleVector {\r\n\r\n    final double[] data;\r\n\r\n    public DoubleVector(double[] data) {\r\n        if (data == null)\r\n            throw new IllegalArgumentException(\"Data cannot be null!\");\r\n        this.data = data;\r\n    }\r\n\r\n    public int size() {\r\n        return data.length;\r\n    }\r\n\r\n    public double[] getData() {\r\n        return data;\r\n    }\r\n\r\n\r\n    @Override\r\n    public String toString() {\r\n        return Arrays.toString(data);\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/DoubleVectorFrameSource.java",
    "content": "package simplesound.dsp;\r\n\r\nimport simplesound.pcm.PcmMonoInputStream;\r\n\r\nimport java.util.Iterator;\r\n\r\npublic class DoubleVectorFrameSource {\r\n\r\n    private final PcmMonoInputStream pmis;\r\n    private final int frameSize;\r\n    private final int shiftAmount;\r\n    private final boolean paddingApplied;\r\n\r\n    private DoubleVectorFrameSource(PcmMonoInputStream pmis, int frameSize, int shiftAmount, boolean paddingApplied) {\r\n        this.pmis = pmis;\r\n        this.frameSize = frameSize;\r\n        this.shiftAmount = shiftAmount;\r\n        this.paddingApplied = paddingApplied;\r\n    }\r\n\r\n    public static DoubleVectorFrameSource fromSampleAmount(\r\n            PcmMonoInputStream pmis, int frameSize, int shiftAmount) {\r\n        return new DoubleVectorFrameSource(pmis, frameSize, shiftAmount, false);\r\n    }\r\n\r\n    public static DoubleVectorFrameSource fromSampleAmountWithPadding(\r\n            PcmMonoInputStream pmis, int frameSize, int shiftAmount) {\r\n        return new DoubleVectorFrameSource(pmis, frameSize, shiftAmount, true);\r\n    }\r\n\r\n    public static DoubleVectorFrameSource fromSizeInMiliseconds(\r\n            PcmMonoInputStream pmis, double frameSizeInMilis, double shiftAmountInMilis) {\r\n        return new DoubleVectorFrameSource(pmis,\r\n                pmis.getFormat().sampleCountForMiliseconds(frameSizeInMilis),\r\n                pmis.getFormat().sampleCountForMiliseconds(shiftAmountInMilis),\r\n                false);\r\n    }\r\n\r\n    public static DoubleVectorFrameSource fromSizeInMilisecondsWithPadding(\r\n            PcmMonoInputStream pmis, double frameSizeInMilis, double shiftAmountInMilis) {\r\n        return new DoubleVectorFrameSource(pmis,\r\n                pmis.getFormat().sampleCountForMiliseconds(frameSizeInMilis),\r\n                pmis.getFormat().sampleCountForMiliseconds(shiftAmountInMilis),\r\n                true);\r\n    }\r\n\r\n    public Iterable<DoubleVector> getIterableFrameReader() {\r\n        return new Iterable<DoubleVector>() {\r\n            public Iterator<DoubleVector> iterator() {\r\n                return new NormalizedFrameIterator(pmis, frameSize, shiftAmount, paddingApplied);\r\n            }\r\n        };\r\n    }\r\n\r\n    public Iterator<DoubleVector> getNormalizedFrameIterator() {\r\n        return new NormalizedFrameIterator(pmis, frameSize, shiftAmount, paddingApplied);\r\n    }\r\n\r\n    public PcmMonoInputStream getPmis() {\r\n        return pmis;\r\n    }\r\n\r\n    public int getFrameSize() {\r\n        return frameSize;\r\n    }\r\n\r\n    public int getShiftAmount() {\r\n        return shiftAmount;\r\n    }\r\n\r\n    public boolean isPaddingApplied() {\r\n        return paddingApplied;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/DoubleVectorProcessingPipeline.java",
    "content": "package simplesound.dsp;\r\n\r\nimport java.util.Iterator;\r\nimport java.util.List;\r\n\r\npublic class DoubleVectorProcessingPipeline  {\r\n\r\n    List<DoubleVectorProcessor> processors;\r\n    Iterator<DoubleVector> vectorSource;\r\n\r\n    public DoubleVectorProcessingPipeline(Iterator<DoubleVector> vectorSource,\r\n                                          List<DoubleVectorProcessor> processors) {\r\n        this.vectorSource = vectorSource;\r\n        this.processors = processors;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/DoubleVectorProcessor.java",
    "content": "package simplesound.dsp;\r\n\r\npublic interface DoubleVectorProcessor {\r\n    \r\n    DoubleVector process(DoubleVector input);\r\n\r\n    void processInPlace(DoubleVector input);\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/MutableComplex.java",
    "content": "package simplesound.dsp;\r\n\r\npublic class MutableComplex {\r\n    public double real;\r\n    public double imaginary;\r\n\r\n    public MutableComplex(double real, double imaginary) {\r\n        this.real = real;\r\n        this.imaginary = imaginary;\r\n    }\r\n\r\n    public MutableComplex(Complex complex) {\r\n        this.real = complex.real;\r\n        this.imaginary = complex.imaginary;\r\n    }\r\n\r\n    public Complex getImmutableComplex() {\r\n        return new Complex(real, imaginary);\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/NormalizedFrameIterator.java",
    "content": "package simplesound.dsp;\r\n\r\nimport simplesound.dsp.DoubleVector;\r\nimport simplesound.pcm.PcmMonoInputStream;\r\n\r\nimport java.io.IOException;\r\nimport java.util.Iterator;\r\n\r\npublic class NormalizedFrameIterator implements Iterator<DoubleVector> {\r\n\r\n    private final PcmMonoInputStream pmis;\r\n    private final int frameSize;\r\n    private final int shiftAmount;\r\n    //TODO: not applied yet\r\n    private final boolean applyPadding;\r\n\r\n    public NormalizedFrameIterator(PcmMonoInputStream pmis, int frameSize, int shiftAmount, boolean applyPadding) {\r\n        if (frameSize < 1)\r\n            throw new IllegalArgumentException(\"Frame size must be larger than zero.\");\r\n        if (shiftAmount < 1)\r\n            throw new IllegalArgumentException(\"Shift size must be larger than zero.\");\r\n        this.pmis = pmis;\r\n        this.frameSize = frameSize;\r\n        this.shiftAmount = shiftAmount;\r\n        this.applyPadding = applyPadding;\r\n    }\r\n\r\n    public NormalizedFrameIterator(PcmMonoInputStream pmis, int frameSize, boolean applyPadding) {\r\n        this(pmis, frameSize, frameSize, applyPadding);\r\n    }\r\n\r\n    public NormalizedFrameIterator(PcmMonoInputStream pmis, int frameSize) {\r\n        this(pmis, frameSize, frameSize, false);\r\n    }\r\n\r\n    private DoubleVector currentFrame;\r\n    private int frameCounter;\r\n\r\n    public boolean hasNext() {\r\n        double[] data;\r\n        try {\r\n            if (frameCounter == 0) {\r\n                data = pmis.readSamplesNormalized(frameSize);\r\n                if (data.length < frameSize)\r\n                    return false;\r\n                currentFrame = new DoubleVector(data);\r\n            } else {\r\n                data = pmis.readSamplesNormalized(shiftAmount);\r\n                if (data.length < shiftAmount)\r\n                    return false;\r\n                double[] frameData = currentFrame.data.clone();\r\n                System.arraycopy(data, 0, frameData, frameData.length - shiftAmount, shiftAmount);\r\n                currentFrame = new DoubleVector(frameData);\r\n            }\r\n        } catch (IOException e) {\r\n            return false;\r\n        }\r\n        frameCounter++;\r\n        return true;\r\n    }\r\n\r\n    public DoubleVector next() {\r\n        return currentFrame;\r\n    }\r\n\r\n    public void remove() {\r\n        throw new UnsupportedOperationException(\"Remove is not supported.\");\r\n    }\r\n\r\n    public int getFrameSize() {\r\n        return frameSize;\r\n    }\r\n\r\n    public int getShiftAmount() {\r\n        return shiftAmount;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/dsp/WindowerFactory.java",
    "content": "package simplesound.dsp;\r\n\r\nimport org.jcaki.Doubles;\r\n\r\nimport static java.lang.Math.PI;\r\nimport static java.lang.Math.cos;\r\n\r\npublic class WindowerFactory {\r\n\r\n    private static class RaisedCosineWindower implements DoubleVectorProcessor {\r\n        double alpha;\r\n        double cosineWindow[];\r\n\r\n        RaisedCosineWindower(double alpha, int length) {\r\n            if (length <= 0)\r\n                throw new IllegalArgumentException(\"Window length cannot be smaller than 1\");\r\n            this.alpha = alpha;\r\n            cosineWindow = new double[length];\r\n            for (int i = 0; i < length; i++) {\r\n                cosineWindow[i] = (1 - alpha) - alpha * cos(2 * PI * i / ((double) length - 1.0));\r\n            }\r\n        }\r\n\r\n        public DoubleVector process(DoubleVector input) {\r\n            return new DoubleVector(Doubles.multiply(input.data, cosineWindow));\r\n        }\r\n\r\n        public void processInPlace(DoubleVector input) {\r\n            Doubles.multiplyInPlace(input.data, cosineWindow);\r\n        }\r\n    }\r\n\r\n    public static DoubleVectorProcessor newHammingWindower(int length) {\r\n        return new RaisedCosineWindower(0.46d, length);\r\n    }\r\n\r\n    public static DoubleVectorProcessor newHanningWindower(int length) {\r\n        return new RaisedCosineWindower(0.5d, length);\r\n    }\r\n\r\n    public static DoubleVectorProcessor newTriangularWindower(int length) {\r\n        return new RaisedCosineWindower(0.0d, length);\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/MonoWavFileReader.java",
    "content": "package simplesound.pcm;\r\n\r\nimport java.io.File;\r\nimport java.io.FileInputStream;\r\nimport java.io.IOException;\r\n\r\npublic class MonoWavFileReader {\r\n\r\n    private final File file;\r\n    private final RiffHeaderData riffHeaderData;\r\n\r\n    public MonoWavFileReader(String fileName) throws IOException {\r\n        this(new File(fileName));\r\n    }\r\n\r\n    public MonoWavFileReader(File file) throws IOException {\r\n        this.file = file;\r\n        riffHeaderData = new RiffHeaderData(file);\r\n        if (riffHeaderData.getFormat().getChannels() != 1)\r\n            throw new IllegalArgumentException(\"Wav file is not Mono.\");\r\n    }\r\n\r\n    public PcmMonoInputStream getNewStream() throws IOException {\r\n        PcmMonoInputStream asis = new PcmMonoInputStream(\r\n                riffHeaderData.getFormat(),\r\n                new FileInputStream(file));\r\n        long amount = asis.skip(RiffHeaderData.PCM_RIFF_HEADER_SIZE);\r\n        if (amount < RiffHeaderData.PCM_RIFF_HEADER_SIZE)\r\n            throw new IllegalArgumentException(\"cannot skip necessary amount of bytes from underlying stream.\");\r\n        return asis;\r\n    }\r\n\r\n    private void validateFrameBoundaries(int frameStart, int frameEnd) {\r\n        if (frameStart < 0)\r\n            throw new IllegalArgumentException(\"Start Frame cannot be negative:\" + frameStart);\r\n        if (frameEnd < frameStart)\r\n            throw new IllegalArgumentException(\"Start Frame cannot be after end frame. Start:\"\r\n                    + frameStart + \", end:\" + frameEnd);\r\n        if (frameEnd > riffHeaderData.getSampleCount())\r\n            throw new IllegalArgumentException(\"Frame count out of bounds. Max sample count:\"\r\n                    + riffHeaderData.getSampleCount() + \" but frame is:\" + frameEnd);\r\n    }\r\n\r\n    public int[] getAllSamples() throws IOException {\r\n        PcmMonoInputStream stream = getNewStream();\r\n        try {\r\n            return stream.readAll();\r\n        } finally {\r\n            stream.close();\r\n        }\r\n    }\r\n\r\n    public int[] getSamplesAsInts(int frameStart, int frameEnd) throws IOException {\r\n        validateFrameBoundaries(frameStart, frameEnd);\r\n        PcmMonoInputStream stream = getNewStream();\r\n        try {\r\n            stream.skipSamples(frameStart);\r\n            return stream.readSamplesAsIntArray(frameEnd - frameStart);\r\n        } finally {\r\n            stream.close();\r\n        }\r\n    }\r\n\r\n\r\n    public PcmAudioFormat getFormat() {\r\n        return riffHeaderData.getFormat();\r\n    }\r\n\r\n    public int getSampleCount() {\r\n        return riffHeaderData.getSampleCount();\r\n    }\r\n\r\n    public File getFile() {\r\n        return file;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/PcmAudioFormat.java",
    "content": "package simplesound.pcm;\r\n\r\n/**\r\n * Represents paramters for raw pcm audio sample data.\r\n * Channels represents mono or stereo data. mono=1, stereo=2\r\n */\r\npublic class PcmAudioFormat {\r\n\r\n    /**\r\n     * Sample frequency in sample/sec.\r\n     */\r\n    private final int sampleRate;\r\n    /**\r\n     * the amount of bits representing samples.\r\n     */\r\n    private final int sampleSizeInBits;\r\n    /**\r\n     * How many bytes are required for representing samples\r\n     */\r\n    private final int bytesRequiredPerSample;\r\n    /**\r\n     * channels. For now only 1 or two channels are allowed.\r\n     */\r\n    private final int channels;\r\n    /**\r\n     * if data is represented as big endian or little endian.\r\n     */\r\n    protected final boolean bigEndian;\r\n    /**\r\n     * if data is signed or unsigned.\r\n     */\r\n    private final boolean signed;\r\n\r\n    protected PcmAudioFormat(int sampleRate, int sampleSizeInBits, int channels, boolean bigEndian, boolean signed) {\r\n\r\n        if (sampleRate < 1)\r\n            throw new IllegalArgumentException(\"sampleRate cannot be less than one. But it is:\" + sampleRate);\r\n        this.sampleRate = sampleRate;\r\n\r\n        if (sampleSizeInBits < 2 || sampleSizeInBits > 31) {\r\n            throw new IllegalArgumentException(\"sampleSizeInBits must be between (including) 2-31. But it is:\" + sampleSizeInBits);\r\n        }\r\n        this.sampleSizeInBits = sampleSizeInBits;\r\n\r\n        if (channels < 1 || channels > 2) {\r\n            throw new IllegalArgumentException(\"channels must be 1 or 2. But it is:\" + channels);\r\n        }\r\n        this.channels = channels;\r\n\r\n        this.bigEndian = bigEndian;\r\n        this.signed = signed;\r\n        if (sampleSizeInBits % 8 == 0)\r\n            bytesRequiredPerSample = sampleSizeInBits / 8;\r\n        else\r\n            bytesRequiredPerSample = sampleSizeInBits / 8 + 1;\r\n    }\r\n\r\n    /**\r\n     * This is a builder class. By default it generates little endian, mono, signed, 16 bits per sample.\r\n     */\r\n    public static class Builder {\r\n        private int _sampleRate;\r\n        private int _sampleSizeInBits = 16;\r\n        private int _channels = 1;\r\n        private boolean _bigEndian = false;\r\n        private boolean _signed = true;\r\n\r\n        public Builder(int sampleRate) {\r\n            this._sampleRate = sampleRate;\r\n        }\r\n\r\n        public Builder channels(int channels) {\r\n            this._channels = channels;\r\n            return this;\r\n        }\r\n\r\n        public Builder bigEndian() {\r\n            this._bigEndian = true;\r\n            return this;\r\n        }\r\n\r\n        public Builder unsigned() {\r\n            this._signed = false;\r\n            return this;\r\n        }\r\n\r\n        public Builder sampleSizeInBits(int sampleSizeInBits) {\r\n            this._sampleSizeInBits = sampleSizeInBits;\r\n            return this;\r\n        }\r\n\r\n        public PcmAudioFormat build() {\r\n            return new PcmAudioFormat(_sampleRate, _sampleSizeInBits, _channels, _bigEndian, _signed);\r\n        }\r\n    }\r\n\r\n    PcmAudioFormat mono16BitSignedLittleEndian(int sampleRate) {\r\n        return new PcmAudioFormat(sampleRate, 16, 1, false, true);\r\n    }\r\n\r\n    public int getSampleRate() {\r\n        return sampleRate;\r\n    }\r\n\r\n    public int getChannels() {\r\n        return channels;\r\n    }\r\n\r\n    public int getSampleSizeInBits() {\r\n        return sampleSizeInBits;\r\n    }\r\n\r\n    /**\r\n     * returns the required bytes for the sample bit size. Such that, if 4 or 8 bit samples are used.\r\n     * it returns 1, if 12 bit used 2 returns.\r\n     *\r\n     * @return required byte amount for the sample size in bits.\r\n     */\r\n    public int getBytePerSample() {\r\n        return bytesRequiredPerSample;\r\n    }\r\n\r\n    public boolean isBigEndian() {\r\n        return bigEndian;\r\n    }\r\n\r\n    public boolean isSigned() {\r\n        return signed;\r\n    }\r\n\r\n    public int sampleCountForMiliseconds(double miliseconds) {\r\n        return (int) ((double) sampleRate * miliseconds / 1000d);\r\n    }\r\n\r\n    public String toString() {\r\n        return \"[ Sample Rate:\" + sampleRate + \" , SampleSizeInBits:\" + sampleSizeInBits +\r\n                \", channels:\" + channels + \", signed:\" + signed + \", bigEndian:\" + bigEndian + \" ]\";\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/PcmAudioHelper.java",
    "content": "package simplesound.pcm;\r\n\r\nimport static org.jcaki.Bytes.toByteArray;\r\nimport org.jcaki.IOs;\r\n\r\nimport java.io.*;\r\n\r\npublic class PcmAudioHelper {\r\n\r\n    /**\r\n     * Converts a pcm encoded raw audio stream to a wav file.\r\n     *\r\n     * @param af format\r\n     * @param rawSource raw source file\r\n     * @param wavTarget raw file target\r\n     * @throws IOException thrown if an error occurs during file operations.\r\n     */\r\n    public static void convertRawToWav(WavAudioFormat af, File rawSource, File wavTarget) throws IOException {\r\n        DataOutputStream dos = new DataOutputStream(new FileOutputStream(wavTarget));\r\n        dos.write(new RiffHeaderData(af, 0).asByteArray());\r\n        DataInputStream dis = new DataInputStream(new FileInputStream(rawSource));\r\n        byte[] buffer = new byte[4096];\r\n        int i;\r\n        int total = 0;\r\n        while ((i = dis.read(buffer)) != -1) {\r\n            total += i;\r\n            dos.write(buffer, 0, i);\r\n        }\r\n        dos.close();\r\n        modifyRiffSizeData(wavTarget, total);\r\n    }\r\n\r\n    public static void convertWavToRaw(File wavSource, File rawTarget) throws IOException {\r\n        IOs.copy(new MonoWavFileReader(wavSource).getNewStream(), new FileOutputStream(rawTarget));\r\n    }\r\n\r\n    public static double[] readAllFromWavNormalized(String fileName) throws IOException {\r\n        return new MonoWavFileReader(new File(fileName)).getNewStream().readSamplesNormalized();\r\n    }\r\n\r\n    /**\r\n     * Modifies the size information in a wav file header.\r\n     *\r\n     * @param wavFile a wav file\r\n     * @param size    size to replace the header.\r\n     * @throws IOException if an error occurs whule accesing the data.\r\n     */\r\n    static void modifyRiffSizeData(File wavFile, int size) throws IOException {\r\n        RandomAccessFile raf = new RandomAccessFile(wavFile, \"rw\");\r\n        raf.seek(RiffHeaderData.RIFF_CHUNK_SIZE_INDEX);\r\n        raf.write(toByteArray(size + 36, false));\r\n        raf.seek(RiffHeaderData.RIFF_SUBCHUNK2_SIZE_INDEX);\r\n        raf.write(toByteArray(size, false));\r\n        raf.close();\r\n    }\r\n\r\n    public static void generateSilenceWavFile(WavAudioFormat wavAudioFormat, File file, double sec) throws IOException {\r\n        WavFileWriter wfr = new WavFileWriter(wavAudioFormat, file);\r\n        int[] empty = new int[(int) (sec * wavAudioFormat.getSampleRate())];\r\n        try {\r\n            wfr.write(empty);\r\n        } finally {\r\n            wfr.close();\r\n        }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/PcmMonoInputStream.java",
    "content": "package simplesound.pcm;\r\n\r\nimport org.jcaki.Bytes;\r\nimport org.jcaki.IOs;\r\n\r\nimport java.io.Closeable;\r\nimport java.io.DataInputStream;\r\nimport java.io.IOException;\r\nimport java.io.InputStream;\r\n\r\npublic class PcmMonoInputStream extends InputStream implements Closeable {\r\n\r\n    private final PcmAudioFormat format;\r\n    private final DataInputStream dis;\r\n    /**\r\n     * this is used for normalization.\r\n     */\r\n    private final int maxPositiveIntegerForSampleSize;\r\n\r\n\r\n    public PcmMonoInputStream(PcmAudioFormat format, InputStream is) {\r\n        if (format.getChannels() != 1)\r\n            throw new IllegalArgumentException(\"Only mono streams are supported.\");\r\n        this.format = format;\r\n        this.dis = new DataInputStream(is);\r\n        this.maxPositiveIntegerForSampleSize = 0x7fffffff >>> (32 - format.getSampleSizeInBits());\r\n    }\r\n\r\n    public int read() throws IOException {\r\n        return dis.read();\r\n    }\r\n\r\n    public int[] readSamplesAsIntArray(int amount) throws IOException {\r\n        byte[] bytez = new byte[amount * format.getBytePerSample()];\r\n        int readAmount = dis.read(bytez);\r\n        if (readAmount == -1)\r\n            return new int[0];\r\n        return Bytes.toReducedBitIntArray(\r\n                bytez,\r\n                readAmount,\r\n                format.getBytePerSample(),\r\n                format.getSampleSizeInBits(),\r\n                format.isBigEndian());\r\n    }\r\n\r\n    public int[] readAll() throws IOException {\r\n        byte[] all = IOs.readAsByteArray(dis);\r\n        return Bytes.toReducedBitIntArray(\r\n                all,\r\n                all.length,\r\n                format.getBytePerSample(),\r\n                format.getSampleSizeInBits(),\r\n                format.isBigEndian());\r\n    }\r\n\r\n    private static final int BYTE_BUFFER_SIZE = 4096;\r\n\r\n    /**\r\n     * reads samples as byte array. if there is not enough data for the amount of samples, remaining data is returned\r\n     * anyway. if the byte amount is not an order of bytes required for sample (such as 51 bytes left but 16 bit samples)\r\n     * an IllegalStateException is thrown.\r\n     *\r\n     * @param amount amount of samples to read.\r\n     * @return byte array.\r\n     * @throws IOException           if there is an IO error.\r\n     * @throws IllegalStateException if the amount of bytes read is not an order of correct.\r\n     */\r\n    public byte[] readSamplesAsByteArray(int amount) throws IOException {\r\n\r\n        byte[] bytez = new byte[amount * format.getBytePerSample()];\r\n        int readCount = dis.read(bytez);\r\n        if (readCount != bytez.length) {\r\n            validateReadCount(readCount);\r\n            byte[] result = new byte[readCount];\r\n            System.arraycopy(bytez, 0, result, 0, readCount);\r\n            return result;\r\n        } else\r\n            return bytez;\r\n    }\r\n\r\n    private void validateReadCount(int readCount) {\r\n        if (readCount % format.getBytePerSample() != 0)\r\n            throw new IllegalStateException(\"unexpected amounts of bytes read from the input stream. \" +\r\n                    \"Byte count must be an order of:\" + format.getBytePerSample());\r\n    }\r\n\r\n    public int[] readSamplesAsIntArray(int frameStart, int frameEnd) throws IOException {\r\n        skipSamples(frameStart * format.getBytePerSample());\r\n        return readSamplesAsIntArray(frameEnd - frameStart);\r\n    }\r\n\r\n    /**\r\n     * skips samples from the stream. if end of file is reached, it returns the amount that is actually skipped.\r\n     *\r\n     * @param skipAmount amount of samples to skip\r\n     * @return actual skipped sample count.\r\n     * @throws IOException if there is a problem while skipping.\r\n     */\r\n    public int skipSamples(int skipAmount) throws IOException {\r\n        long actualSkipped = dis.skip(skipAmount * format.getBytePerSample());\r\n        return (int) actualSkipped / format.getBytePerSample();\r\n    }\r\n\r\n    public double[] readSamplesNormalized(int amount) throws IOException {\r\n        return normalize(readSamplesAsIntArray(amount));\r\n    }\r\n\r\n    public double[] readSamplesNormalized() throws IOException {\r\n        return normalize(readAll());\r\n    }\r\n\r\n    private double[] normalize(int[] original) {\r\n        if (original.length == 0)\r\n            return new double[0];\r\n        double[] normalized = new double[original.length];\r\n        for (int i = 0; i < normalized.length; i++) {\r\n            normalized[i] = (double) original[i] / maxPositiveIntegerForSampleSize;\r\n        }\r\n        return normalized;\r\n    }\r\n\r\n    public void close() throws IOException {\r\n        dis.close();\r\n    }\r\n\r\n    /**\r\n     * finds the byte location of a given time. if time is negative, exception is thrown.\r\n     *\r\n     * @param second second information\r\n     * @return the byte location in the samples.\r\n     */\r\n    public int calculateSampleByteIndex(double second) {\r\n\r\n        if (second < 0)\r\n            throw new IllegalArgumentException(\"Time information cannot be negative.\");\r\n\r\n        int loc = (int) (second * format.getSampleRate() * format.getBytePerSample());\r\n\r\n        //byte alignment. \r\n        if (loc % format.getBytePerSample() != 0) {\r\n            loc += (format.getBytePerSample() - loc % format.getBytePerSample());\r\n        }\r\n        return loc;\r\n    }\r\n\r\n    /**\r\n     * calcualates the time informationn for a given sample.\r\n     *\r\n     * @param sampleIndex sample index.\r\n     * @return approximate seconds information for the given sample.\r\n     */\r\n    public double calculateSampleTime(int sampleIndex) {\r\n        if (sampleIndex < 0)\r\n            throw new IllegalArgumentException(\"sampleIndex information cannot be negative:\" + sampleIndex);\r\n\r\n        return (double) sampleIndex / format.getSampleRate();\r\n    }\r\n\r\n    public PcmAudioFormat getFormat() {\r\n        return format;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/PcmMonoOutputStream.java",
    "content": "package simplesound.pcm;\r\n\r\nimport org.jcaki.Bytes;\r\nimport org.jcaki.IOs;\r\n\r\nimport java.io.*;\r\n\r\npublic class PcmMonoOutputStream extends OutputStream implements Closeable {\r\n\r\n    final PcmAudioFormat format;\r\n    final DataOutputStream dos;\r\n\r\n    public PcmMonoOutputStream(PcmAudioFormat format, DataOutputStream dos) {\r\n        this.format = format;\r\n        this.dos = dos;\r\n    }\r\n\r\n    public PcmMonoOutputStream(PcmAudioFormat format, File file) throws IOException {\r\n        this.format = format;\r\n        this.dos = new DataOutputStream(new FileOutputStream(file));\r\n    }\r\n\r\n    public void write(int b) throws IOException {\r\n        dos.write(b);\r\n    }\r\n\r\n    @Override\r\n    public void write(byte[] buffer, int offset, int count) throws IOException {\r\n        dos.write(buffer, offset, count);\r\n    }\r\n\r\n    public void write(short[] shorts) throws IOException {\r\n        dos.write(Bytes.toByteArray(shorts, shorts.length, format.isBigEndian()));\r\n    }\r\n\r\n    public void write(int[] ints) throws IOException {\r\n        dos.write(Bytes.toByteArray(ints, ints.length, format.getBytePerSample(), format.isBigEndian()));\r\n    }\r\n\r\n    public void close() {\r\n        IOs.closeSilently(dos);\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/RiffHeaderData.java",
    "content": "package simplesound.pcm;\r\n\r\nimport static org.jcaki.Bytes.toByteArray;\r\nimport static org.jcaki.Bytes.toInt;\r\nimport org.jcaki.IOs;\r\n\r\nimport java.io.*;\r\n\r\nclass RiffHeaderData {\r\n\r\n    public static final int PCM_RIFF_HEADER_SIZE = 44;\r\n    public static final int RIFF_CHUNK_SIZE_INDEX = 4;\r\n    public static final int RIFF_SUBCHUNK2_SIZE_INDEX = 40;\r\n\r\n    private final PcmAudioFormat format;\r\n    private final int totalSamplesInByte;\r\n\r\n    public RiffHeaderData(PcmAudioFormat format, int totalSamplesInByte) {\r\n        this.format = format;\r\n        this.totalSamplesInByte = totalSamplesInByte;\r\n    }\r\n\r\n    public double timeSeconds() {\r\n        return (double) totalSamplesInByte / format.getBytePerSample() / format.getSampleRate();\r\n    }\r\n\r\n    public RiffHeaderData(DataInputStream dis) throws IOException {\r\n\r\n        try {\r\n            byte[] buf4 = new byte[4];\r\n            byte[] buf2 = new byte[2];\r\n\r\n            dis.skipBytes(4 + 4 + 4 + 4 + 4 + 2);\r\n\r\n            dis.readFully(buf2);\r\n            final int channels = toInt(buf2, false);\r\n\r\n            dis.readFully(buf4);\r\n            final int sampleRate = toInt(buf4, false);\r\n\r\n            dis.skipBytes(4 + 2);\r\n\r\n            dis.readFully(buf2);\r\n            final int sampleSizeInBits = toInt(buf2, false);\r\n\r\n            dis.skipBytes(4);\r\n\r\n            dis.readFully(buf4);\r\n            totalSamplesInByte = toInt(buf4, false);\r\n\r\n            format = new WavAudioFormat.Builder().\r\n                    channels(channels).\r\n                    sampleRate(sampleRate).\r\n                    sampleSizeInBits(sampleSizeInBits).\r\n                    build();\r\n        } finally {\r\n            IOs.closeSilently(dis);\r\n        }\r\n    }\r\n\r\n    public RiffHeaderData(File file) throws IOException {\r\n        this(new DataInputStream(new FileInputStream(file)));\r\n    }\r\n\r\n    public byte[] asByteArray() {\r\n        ByteArrayOutputStream baos = null;\r\n        try {\r\n            baos = new ByteArrayOutputStream();\r\n            // ChunkID (the String \"RIFF\") 4 Bytes\r\n            baos.write(toByteArray(0x52494646, true));\r\n            // ChunkSize (Whole file size in byte minus 8 bytes ) , or (4 + (8 + SubChunk1Size) + (8 + SubChunk2Size))\r\n            // little endian 4 Bytes.\r\n            baos.write(toByteArray(36 + totalSamplesInByte, false));\r\n            // Format (the String \"WAVE\") 4 Bytes big endian\r\n            baos.write(toByteArray(0x57415645, true));\r\n\r\n            // Subchunk1\r\n            // Subchunk1ID (the String \"fmt \") 4 bytes big endian.\r\n            baos.write(toByteArray(0x666d7420, true));\r\n            // Subchunk1Size. 16 for the PCM. little endian 4 bytes.\r\n            baos.write(toByteArray(16, false));\r\n            // AudioFormat , for PCM = 1, Little endian 2 Bytes.\r\n            baos.write(toByteArray((short) 1, false));\r\n            // Number of channels Mono = 1, Stereo = 2  Little Endian , 2 bytes.\r\n            int channels = format.getChannels();\r\n            baos.write(toByteArray((short) channels, false));\r\n            // SampleRate (8000, 44100 etc.) little endian, 4 bytes\r\n            int sampleRate = format.getSampleRate();\r\n            baos.write(toByteArray(sampleRate, false));\r\n            // byte rate (SampleRate * NumChannels * BitsPerSample/8) little endian, 4 bytes.\r\n            baos.write(toByteArray(channels * sampleRate * format.getBytePerSample(), false));\r\n            // Block Allign == NumChannels * BitsPerSample/8  The number of bytes for one sample including all channels. LE, 2 bytes\r\n            baos.write(toByteArray((short) (channels * format.getBytePerSample()), false));\r\n            // BitsPerSample (8, 16 etc.) LE, 2 bytes\r\n            baos.write(toByteArray((short) format.getSampleSizeInBits(), false));\r\n\r\n            // Subchunk2\r\n            // SubChunk2ID (String \"data\") 4 bytes.\r\n            baos.write(toByteArray(0x64617461, true));\r\n            // Subchunk2Size    == NumSamples * NumChannels * BitsPerSample/8. This is the number of bytes in the data.\r\n            // You can also think of this as the size of the read of the subchunk following this number. LE, 4 bytes.\r\n            baos.write(toByteArray(totalSamplesInByte, false));\r\n\r\n            return baos.toByteArray();\r\n        } catch (IOException e) {\r\n            e.printStackTrace();\r\n            return new byte[0];\r\n        } finally {\r\n            IOs.closeSilently(baos);\r\n        }\r\n    }\r\n\r\n    public PcmAudioFormat getFormat() {\r\n        return format;\r\n    }\r\n\r\n    public int getTotalSamplesInByte() {\r\n        return totalSamplesInByte;\r\n    }\r\n\r\n    public int getSampleCount() {\r\n        return totalSamplesInByte / format.getBytePerSample();\r\n    }\r\n\r\n    public String toString() {\r\n        return \"[ Format: \" + format.toString() + \" , totalSamplesInByte:\" + totalSamplesInByte + \"]\";\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/WavAudioFormat.java",
    "content": "package simplesound.pcm;\r\n\r\npublic class WavAudioFormat extends PcmAudioFormat {\r\n\r\n    /**\r\n     * if data is represented as big endian or little endian.\r\n     */\r\n    protected final boolean bigEndian = false;\r\n\r\n    private WavAudioFormat(int sampleRate, int sampleSizeInBits, int channels, boolean signed) {\r\n        super(sampleRate, sampleSizeInBits, channels, false, signed);\r\n    }\r\n\r\n    /**\r\n     * a builder class for generating PCM Audio format for wav files.\r\n     */\r\n    public static class Builder {\r\n        private int _sampleRate;\r\n        private int _sampleSizeInBits = 16;\r\n        private int _channels = 1;\r\n\r\n        public Builder sampleRate(int sampleRate) {\r\n            this._sampleRate = sampleRate;\r\n            return this;\r\n        }\r\n\r\n        public Builder channels(int channels) {\r\n            this._channels = channels;\r\n            return this;\r\n        }\r\n\r\n        public Builder sampleSizeInBits(int sampleSizeInBits) {\r\n            this._sampleSizeInBits = sampleSizeInBits;\r\n            return this;\r\n        }\r\n\r\n        public WavAudioFormat build() {\r\n            if (_sampleSizeInBits == 8)\r\n                return new WavAudioFormat(_sampleRate, _sampleSizeInBits, _channels, false);\r\n            else\r\n                return new WavAudioFormat(_sampleRate, _sampleSizeInBits, _channels, true);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * generates a PcmAudioFormat for wav files for 16 bits signed mono data.\r\n     *\r\n     * @param sampleRate sampling rate.\r\n     * @return new PcmAudioFormat object for given wav header values. .\r\n     */\r\n    public static WavAudioFormat mono16Bit(int sampleRate) {\r\n        return new WavAudioFormat(sampleRate, 16, 1, true);\r\n    }\r\n\r\n    /**\r\n     * Generates audio format data for Wav audio format. returning PCM format is little endian.\r\n     *\r\n     * @param sampleRate       sample rate\r\n     * @param sampleSizeInBits bit amount per sample\r\n     * @param channels         channel count. can be 1 or 2\r\n     * @return a RawAudioFormat suitable for wav format.\r\n     */\r\n    public static WavAudioFormat wavFormat(int sampleRate, int sampleSizeInBits, int channels) {\r\n        if (sampleSizeInBits == 8)\r\n            return new WavAudioFormat(sampleRate, sampleSizeInBits, channels, false);\r\n        else\r\n            return new WavAudioFormat(sampleRate, sampleSizeInBits, channels, true);\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/java/simplesound/pcm/WavFileWriter.java",
    "content": "package simplesound.pcm;\r\n\r\nimport android.util.Log;\r\n\r\nimport java.io.Closeable;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\n\r\n/**\r\n * Writes a wav file. Careful that it writes the total amount of the bytes information once the close method\r\n * is called. It has a counter in it to calculate the samle size.\r\n */\r\npublic class WavFileWriter implements Closeable {\r\n\r\n    private final WavAudioFormat pcmAudioFormat;\r\n    private final PcmMonoOutputStream pos;\r\n    private int totalSampleBytesWritten = 0;\r\n    private final File file;\r\n\r\n    public WavFileWriter(WavAudioFormat wavAudioFormat, File file) throws IOException {\r\n        if (wavAudioFormat.isBigEndian())\r\n            throw new IllegalArgumentException(\"Wav file cannot contain bigEndian sample data.\");\r\n        if (wavAudioFormat.getSampleSizeInBits() > 8 && !wavAudioFormat.isSigned())\r\n            throw new IllegalArgumentException(\"Wav file cannot contain unsigned data for this sampleSize:\"\r\n                    + wavAudioFormat.getSampleSizeInBits());\r\n        this.pcmAudioFormat = wavAudioFormat;\r\n        this.file = file;\r\n        this.pos = new PcmMonoOutputStream(wavAudioFormat, file);\r\n        pos.write(new RiffHeaderData(wavAudioFormat, 0).asByteArray());\r\n    }\r\n\r\n    public WavFileWriter write(byte[] bytes) throws IOException {\r\n        checkLimit(totalSampleBytesWritten, bytes.length);\r\n        pos.write(bytes);\r\n        totalSampleBytesWritten += bytes.length;\r\n        return this;\r\n    }\r\n\r\n    public WavFileWriter write(byte[] bytes, int offset, int count) throws IOException {\r\n        checkLimit(totalSampleBytesWritten, count);\r\n        pos.write(bytes, offset, count);\r\n        totalSampleBytesWritten += count;\r\n        return this;\r\n    }\r\n\r\n    private void checkLimit(int total, int toAdd) {\r\n        final long result = total + toAdd;\r\n        if (result >= Integer.MAX_VALUE) {\r\n            throw new IllegalStateException(\"Size of bytes is too big:\" + result);\r\n        }\r\n    }\r\n\r\n    public WavFileWriter write(int[] samples) throws IOException {\r\n        final int bytePerSample = pcmAudioFormat.getBytePerSample();\r\n        checkLimit(totalSampleBytesWritten, samples.length * bytePerSample);\r\n        pos.write(samples);\r\n        totalSampleBytesWritten += samples.length * bytePerSample;\r\n        return this;\r\n    }\r\n\r\n    public WavFileWriter write(short[] samples) throws IOException {\r\n        checkLimit(totalSampleBytesWritten, samples.length * 2);\r\n        pos.write(samples);\r\n        totalSampleBytesWritten += samples.length * 2;\r\n        return this;\r\n    }\r\n\r\n    WavFileWriter writeNormalized(double[] samples) throws IOException {\r\n        return this;\r\n    }\r\n\r\n    public void close() throws IOException {\r\n        pos.close();\r\n        PcmAudioHelper.modifyRiffSizeData(file, totalSampleBytesWritten);\r\n    }\r\n\r\n    public PcmAudioFormat getWavFormat() {\r\n        return pcmAudioFormat;\r\n    }\r\n\r\n\r\n    public int getTotalSampleBytesWritten() {\r\n        return totalSampleBytesWritten;\r\n    }\r\n}\r\n"
  },
  {
    "path": "SaidIt/src/main/res/anim/pulse.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<scale xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"1000\"\n    android:fromXScale=\"1\"\n    android:fromYScale=\"1\"\n    android:pivotX=\"50%\"\n    android:pivotY=\"50%\"\n    android:repeatCount=\"infinite\"\n    android:repeatMode=\"reverse\"\n    android:interpolator=\"@android:interpolator/accelerate_decelerate\"\n    android:toXScale=\"0.9\"\n    android:toYScale=\"0.9\" />"
  },
  {
    "path": "SaidIt/src/main/res/color/button_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:color=\"@color/gray_d\" android:state_enabled=\"false\" />\n    <item android:color=\"@color/gray_f\" android:state_enabled=\"true\" />\n    <item android:color=\"@color/red\" android:state_pressed=\"true\" />\n    <item android:color=\"@color/red\" android:state_focused=\"true\" />\n\n</selector>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/bg_et.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_focused=\"true\">\n        <shape>\n            <solid android:color=\"#ffffff\" />\n            <stroke android:width=\"1dp\" android:color=\"@color/gray_8\" />\n            <corners android:radius=\"5dp\" />\n        </shape>\n    </item>\n    <item>\n        <shape>\n            <solid android:color=\"#ffffff\" />\n            <stroke android:width=\"1dp\" android:color=\"@color/gray_a\" />\n            <corners android:radius=\"5dp\" />\n        </shape>\n    </item>\n</selector>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/circle_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/circle_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/circle_button_pressed\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/circle_button_normal\" />\n\n</selector>\n"
  },
  {
    "path": "SaidIt/src/main/res/drawable/circle_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_6\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/gray_8\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/circle_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_8\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/gray_a\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/cling_button_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2011 The Android Open Source Project\n\n     Licensed under the Apache License, Version 2.0 (the \"License\");\n     you may not use this file except in compliance with the License.\n     You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n     Unless required by applicable law or agreed to in writing, software\n     distributed under the License is distributed on an \"AS IS\" BASIS,\n     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     See the License for the specific language governing permissions and\n     limitations under the License.\n-->\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/btn_cling_pressed\"/>\n    <item android:drawable=\"@drawable/btn_cling_normal\"/>\n</selector>\n"
  },
  {
    "path": "SaidIt/src/main/res/drawable/dashed_line.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"line\" >\n\n    <stroke\n        android:width=\"3dp\"\n        android:dashGap=\"6dp\"\n        android:dashWidth=\"12dp\"\n        android:color=\"@color/gray_c\" />\n\n</shape>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/dialog_content.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:width=\"@dimen/shadow_offset\" android:color=\"@color/gray_c\"/>\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/small_round\" android:top=\"0dp\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/gray_e\" />\n        </shape>\n\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/dialog_title.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/large_round\" android:topRightRadius=\"@dimen/large_round\" android:bottomLeftRadius=\"0dp\" android:bottomRightRadius=\"0dp\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:width=\"@dimen/shadow_offset\" android:color=\"@color/dark_green\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/negative_shadow_offset\">\n        <shape>\n            <padding android:bottom=\"10dp\" android:top=\"10dp\" android:left=\"@dimen/large_round\" android:right=\"@dimen/large_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"0dp\" android:bottomRightRadius=\"0dp\" />\n            <solid android:color=\"@color/green\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/error_dialog_title.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/large_round\" android:topRightRadius=\"@dimen/large_round\" android:bottomLeftRadius=\"0dp\" android:bottomRightRadius=\"0dp\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:width=\"@dimen/shadow_offset\" android:color=\"@color/dark_red\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/negative_shadow_offset\">\n        <shape>\n            <padding android:bottom=\"10dp\" android:top=\"10dp\" android:left=\"@dimen/large_round\" android:right=\"@dimen/large_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"0dp\" android:bottomRightRadius=\"0dp\" />\n            <solid android:color=\"@color/red\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gold_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/gold_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/gold_button_pressed\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/gold_button_normal\" />\n\n</selector>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gold_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/dark_gold\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/gold\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gold_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gold\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/light_gold\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gray_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/gray_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/gray_button_focused\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/gray_button_normal\" />\n\n</selector>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gray_button_focused.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n    <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n    <solid android:color=\"@color/gray_8\" />\n</shape>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gray_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_6\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/gray_8\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/gray_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_8\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/gray_a\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/green_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/green_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/green_button_pressed\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/green_button_normal\" />\n\n</selector>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/green_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/dark_green\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/green\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/green_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/green\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/button_padding\" android:top=\"@dimen/button_padding\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/slight_green\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/red_circle_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/red_circle_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/red_circle_button_pressed\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/red_circle_button_normal\" />\n\n</selector>\n"
  },
  {
    "path": "SaidIt/src/main/res/drawable/red_circle_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/dark_red\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/red\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/red_circle_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/red\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/light_red\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/top_gray_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/top_gray_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/top_gray_button_pressed\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/top_gray_button_normal\" />\n\n</selector>\n"
  },
  {
    "path": "SaidIt/src/main/res/drawable/top_gray_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_6\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/gray_8\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/top_gray_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_8\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/gray_a\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/top_green_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/top_green_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/top_green_button_pressed\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/top_green_button_normal\" />\n\n</selector>\n"
  },
  {
    "path": "SaidIt/src/main/res/drawable/top_green_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/dark_green\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/green\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/top_green_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/green\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <corners android:topLeftRadius=\"0dp\" android:topRightRadius=\"0dp\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n            <solid android:color=\"@color/slight_green\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/white_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/white_button_pressed\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@drawable/white_button_focused\" android:state_focused=\"true\" />\n    <item android:drawable=\"@drawable/white_button_normal\" />\n\n</selector>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/white_button_focused.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <padding android:bottom=\"@dimen/small_round\" android:top=\"@dimen/small_round\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n    <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n    <solid android:color=\"@color/gray_c\" />\n    <stroke android:color=\"@color/gray_f\" android:width=\"@dimen/shadow_offset\" />\n</shape>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/white_button_normal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/gray_c\" android:width=\"@dimen/shadow_offset\" />\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"17dp\" android:top=\"@dimen/small_round\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/gray_f\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/white_button_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <shape>\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/transparent\" />\n            <stroke android:color=\"@color/green\" android:width=\"@dimen/shadow_offset\" />\n\n\n        </shape>\n    </item>\n    <item android:bottom=\"@dimen/shadow_offset\">\n        <shape>\n            <padding android:bottom=\"@dimen/small_round\" android:top=\"@dimen/small_round\" android:left=\"@dimen/small_round\" android:right=\"@dimen/small_round\" />\n            <corners android:topLeftRadius=\"@dimen/small_round\" android:topRightRadius=\"@dimen/small_round\" android:bottomLeftRadius=\"@dimen/small_round\" android:bottomRightRadius=\"@dimen/small_round\" />\n            <solid android:color=\"@color/light_green\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "SaidIt/src/main/res/drawable/window_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <corners android:topLeftRadius=\"@dimen/large_round\" android:topRightRadius=\"@dimen/large_round\" android:bottomLeftRadius=\"@dimen/large_round\" android:bottomRightRadius=\"@dimen/large_round\" />\n    <solid android:color=\"@color/gray_e\" />\n</shape>"
  },
  {
    "path": "SaidIt/src/main/res/layout/activity_background_recorder.xml",
    "content": "<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/container\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\"eu.mrogalski.saidit.SaidItActivity\"\n    tools:ignore=\"MergeRootFrame\" />\n"
  },
  {
    "path": "SaidIt/src/main/res/layout/activity_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout\n        android:id=\"@+id/settings_layout\"\n        android:orientation=\"vertical\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n\n        <TextView\n            android:layout_marginTop=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/audio_memory_holds\"/>\n\n        <TextView\n            android:id=\"@+id/history_limit\"\n            android:layout_marginBottom=\"5dp\"\n            android:tag=\"bold\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            style=\"@style/EmphasizedText\"\n            android:text=\"@string/sample_time\"/>\n\n        <TextView\n            android:layout_marginTop=\"5dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/audio_memory_change\"/>\n\n        <TextView\n            android:layout_marginTop=\"20dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/option_a_used_ram\"/>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_marginTop=\"10dp\"\n            android:gravity=\"center\"\n            android:measureWithLargestChild=\"true\"\n            android:layout_marginBottom=\"10dp\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/memory_low\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\" />\n\n            <Button\n                android:id=\"@+id/memory_medium\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:layout_marginRight=\"10dp\" />\n            <Button\n                android:id=\"@+id/memory_high\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"@drawable/green_button\" />\n        </LinearLayout>\n\n        <TextView\n            style=\"@style/SmallText\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/used_ram_description\"/>\n\n\n        <TextView\n            android:layout_marginTop=\"20dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/option_b_audio_quality\"/>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_marginTop=\"10dp\"\n            android:gravity=\"center\"\n            android:measureWithLargestChild=\"true\"\n            android:layout_marginBottom=\"10dp\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/quality_8kHz\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\" />\n\n            <Button\n                android:id=\"@+id/quality_16kHz\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:layout_marginRight=\"10dp\" />\n            <Button\n                android:id=\"@+id/quality_48kHz\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"@drawable/green_button\" />\n        </LinearLayout>\n\n        <TextView\n            style=\"@style/SmallText\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/audio_quality_description\"/>\n\n        <!--\n        <TextView\n            android:layout_marginTop=\"20dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"C) Rodzaj kompresji\"/>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_marginTop=\"10dp\"\n            android:gravity=\"center\"\n            android:measureWithLargestChild=\"true\"\n            android:layout_marginBottom=\"10dp\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/compress_3gp\"\n                android:text=\"3GP\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\" />\n\n            <Button\n                android:id=\"@+id/compress_mp4\"\n                android:text=\"MP4\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:layout_marginRight=\"10dp\" />\n            <Button\n                android:id=\"@+id/compress_wav\"\n                android:text=\"WAV\"\n                android:textSize=\"23sp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"@drawable/green_button\" />\n        </LinearLayout>\n\n        <TextView\n            style=\"@style/SmallText\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/compress_help\"/>\n\n        -->\n\n        <Button\n            android:id=\"@+id/settings_return\"\n            android:layout_marginTop=\"20dp\"\n            android:layout_marginBottom=\"40dp\"\n            android:layout_gravity=\"center\"\n            android:text=\"@string/settings_return\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            style=\"@style/Button\"/>\n\n    </LinearLayout>\n\n</ScrollView>"
  },
  {
    "path": "SaidIt/src/main/res/layout/dialog_save_recording.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\">\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/save_recording\"\n        android:layout_marginTop=\"12dp\"/>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/gray_d\"\n        android:layout_marginTop=\"12dp\"/>\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/recording_name\"\n        android:textSize=\"12sp\"\n        android:layout_marginTop=\"12dp\"/>\n\n    <EditText\n        android:id=\"@+id/recording_name\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:inputType=\"text\"\n        android:background=\"@color/gray_d\"\n        android:padding=\"12dp\"\n        android:layout_margin=\"12dp\"\n        android:textAppearance=\"?android:textAppearance\"/>\n\n</LinearLayout>"
  },
  {
    "path": "SaidIt/src/main/res/layout/fragment_background_recorder.xml",
    "content": "<ScrollView  xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/main_fragment\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:animateLayoutChanges=\"true\"\n        tools:context=\"eu.mrogalski.saidit.SaidItFragment\">\n\n        <Button\n            android:id=\"@+id/listen_button\"\n            style=\"@style/GreenButton\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"60dp\"\n            android:gravity=\"center\"\n            android:text=\"@string/listening_enabled_disable\" />\n\n        <TextView\n            android:layout_marginTop=\"20dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/listening_description\"/>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:animateLayoutChanges=\"true\"\n            android:clipChildren=\"false\"\n            android:id=\"@+id/ready_section\">\n\n            <TextView\n                android:id=\"@+id/history_size_title\"\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/history_size_title_static\"/>\n\n            <TextView\n                android:id=\"@+id/history_size\"\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                style=\"@style/EmphasizedText\"\n                android:text=\"\"/>\n\n            <TextView\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_marginLeft=\"40dp\"\n                android:layout_marginRight=\"40dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/save_description\"/>\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:clipChildren=\"false\"\n                android:layout_marginLeft=\"30dp\"\n                android:layout_marginRight=\"30dp\"\n                android:layout_marginTop=\"10dp\"\n                android:layout_marginBottom=\"10dp\"\n                android:orientation=\"horizontal\">\n\n                <Button\n                    android:id=\"@+id/record_last_minute\"\n                    android:text=\"@string/record_one_minute\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    style=\"@style/Button\"/>\n                <Button\n                    android:id=\"@+id/record_last_5_minutes\"\n                    android:text=\"@string/record_five_minutes\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginLeft=\"10dp\"\n                    android:layout_marginRight=\"10dp\"\n                    android:layout_weight=\"1\"\n                    style=\"@style/Button\"/>\n                <Button\n                    android:id=\"@+id/record_last_max\"\n                    android:text=\"@string/record_all_memory\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    style=\"@style/Button\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:clipChildren=\"false\"\n                android:layout_marginLeft=\"30dp\"\n                android:layout_marginRight=\"30dp\"\n                android:layout_marginBottom=\"10dp\"\n                android:orientation=\"horizontal\">\n\n                <Button\n                    android:id=\"@+id/record_last_30_minutes\"\n                    android:text=\"@string/record_30_minutes\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    style=\"@style/Button\"/>\n\n                <Button\n                    android:id=\"@+id/record_last_2_hrs\"\n                    style=\"@style/Button\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginLeft=\"10dp\"\n                    android:layout_marginRight=\"10dp\"\n                    android:layout_weight=\"1\"\n                    android:text=\"@string/record_2_hrs\" />\n                <Button\n                    android:id=\"@+id/record_last_6_hrs\"\n                    android:text=\"@string/record_6_hrs\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    style=\"@style/Button\" />\n            </LinearLayout>\n\n            <TextView\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_marginLeft=\"30dp\"\n                android:layout_marginRight=\"30dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/record_description\"/>\n\n\n            <View\n                android:layout_marginLeft=\"50dp\"\n                android:layout_marginRight=\"50dp\"\n                android:layout_marginTop=\"20dp\"\n                android:layout_marginBottom=\"20dp\"\n                android:layout_width=\"match_parent\"\n                android:layerType=\"software\"\n                android:layout_height=\"7dp\"\n                android:background=\"@drawable/dashed_line\" />\n\n            <TextView\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/upper_memory_limit_start\"/>\n\n            <TextView\n                android:id=\"@+id/history_limit\"\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                style=\"@style/EmphasizedText\"\n                android:text=\"@string/sample_time\"/>\n\n            <TextView\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/upper_memory_limit_settings_start\"/>\n\n            <Button\n                android:id=\"@+id/settings_button\"\n                android:layout_marginTop=\"10dp\"\n                android:layout_marginBottom=\"10dp\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center\"\n                style=\"@style/Button\"\n                android:text=\"@string/upper_memory_limit_settings_end\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/rec_section\"\n            android:orientation=\"vertical\"\n            android:visibility=\"gone\"\n            tools:visibility=\"visible\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\">\n\n            <View\n                android:layout_marginLeft=\"50dp\"\n                android:layout_marginRight=\"50dp\"\n                android:layout_marginTop=\"20dp\"\n                android:layout_marginBottom=\"20dp\"\n                android:layout_width=\"match_parent\"\n                android:layerType=\"software\"\n                android:layout_height=\"7dp\"\n                android:background=\"@drawable/dashed_line\" />\n\n            <TextView\n                android:id=\"@+id/rec_indicator\"\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_marginLeft=\"20dp\"\n                android:layout_marginRight=\"20dp\"\n                android:text=\"@string/recorded_static\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\" />\n\n            <TextView\n                android:id=\"@+id/rec_time\"\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                style=\"@style/EmphasizedText\"\n                android:text=\"@string/sample_time\"/>\n\n            <TextView\n                android:layout_marginTop=\"5dp\"\n                android:layout_marginBottom=\"5dp\"\n                android:layout_marginLeft=\"20dp\"\n                android:layout_marginRight=\"20dp\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/recording_stop_description\"/>\n\n            <Button\n                android:layout_width=\"60dp\"\n                android:layout_height=\"60dp\"\n                android:layout_gravity=\"center\"\n                android:layout_marginTop=\"20dp\"\n                android:layout_marginBottom=\"20dp\"\n                android:id=\"@+id/rec_stop_button\"\n                android:background=\"@color/light_red\" />\n\n        </LinearLayout>\n\n        <View\n            android:layout_marginLeft=\"50dp\"\n            android:layout_marginRight=\"50dp\"\n            android:layout_marginTop=\"20dp\"\n            android:layout_marginBottom=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layerType=\"software\"\n            android:layout_height=\"7dp\"\n            android:background=\"@drawable/dashed_line\" />\n\n        <TextView\n            android:layout_marginTop=\"5dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/read_more_at\"/>\n\n        <ImageButton\n            android:id=\"@+id/rate_on_google_play\"\n            android:background=\"@drawable/gray_button\"\n            android:layout_marginTop=\"15dp\"\n            android:layout_marginBottom=\"15dp\"\n            android:layout_gravity=\"center\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:src=\"@drawable/github_logo\"\n            android:paddingTop=\"10dp\"\n            android:paddingBottom=\"10dp\" />\n\n        <TextView\n            android:layout_marginTop=\"5dp\"\n            android:layout_marginBottom=\"5dp\"\n            android:layout_marginLeft=\"20dp\"\n            android:layout_marginRight=\"20dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/rate_invite\"/>\n\n        <ImageView\n            android:id=\"@+id/heart\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"25dp\"\n            android:layout_marginBottom=\"80dp\"\n            android:layout_gravity=\"center\"\n            android:src=\"@drawable/ic_love\"\n            />\n\n    </LinearLayout>\n</ScrollView>"
  },
  {
    "path": "SaidIt/src/main/res/layout/progress_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\" android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\">\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/work_default\"\n        android:id=\"@+id/progress_description\"\n        android:layout_gravity=\"center_horizontal\"\n        android:textSize=\"25sp\"\n        android:gravity=\"center\"\n        android:background=\"@drawable/dialog_title\"\n        android:textColor=\"@color/gray_f\" />\n\n    <LinearLayout\n        android:orientation=\"vertical\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingTop=\"@dimen/small_round\"\n        android:background=\"@drawable/dialog_content\"\n        android:layout_gravity=\"center_horizontal\">\n        <ProgressBar\n            android:indeterminate=\"true\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_width=\"40dp\"\n            android:layout_height=\"40dp\" />\n        </LinearLayout>\n</LinearLayout>"
  },
  {
    "path": "SaidIt/src/main/res/layout/recording_done_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\" android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\">\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/recording_done_title\"\n        android:id=\"@+id/payment_method_dialog_title\"\n        android:layout_gravity=\"center_horizontal\"\n        android:tag=\"titleBar\"\n        android:textSize=\"25sp\"\n        android:gravity=\"center\"\n        android:background=\"@drawable/dialog_title\"\n        android:textColor=\"@color/gray_f\" />\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <LinearLayout\n            android:id=\"@+id/payment_method_dialog_content\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal\"\n            android:background=\"@drawable/dialog_content\"\n            android:orientation=\"vertical\">\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"@dimen/small_round\"\n                android:tag=\"bold\"\n                android:text=\"@string/recording_done_filename\" />\n\n            <TextView\n                android:id=\"@+id/recording_done_filename\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"\" />\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"@dimen/small_round\"\n                android:orientation=\"horizontal\">\n\n                <LinearLayout\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:orientation=\"vertical\">\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:tag=\"bold\"\n                        android:text=\"@string/recording_done_directory\" />\n\n                    <TextView\n                        android:id=\"@+id/recording_done_dirname\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"\" />\n\n                </LinearLayout>\n\n                <ImageButton\n                    android:id=\"@+id/recording_done_open_dir\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"center\"\n                    android:layout_weight=\"0\"\n                    android:background=\"@drawable/white_button\"\n                    android:shadowColor=\"@color/transparent\"\n                    android:src=\"@drawable/ic_action_collection\"\n                    android:textSize=\"@dimen/info_text_size\" />\n\n            </LinearLayout>\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"@dimen/small_round\"\n                android:tag=\"bold\"\n                android:text=\"@string/recording_done_runtime\" />\n\n            <TextView\n                android:id=\"@+id/recording_done_runtime\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"@dimen/small_round\"\n                android:tag=\"bold\"\n                android:text=\"@string/recording_done_size\" />\n\n            <TextView\n                android:id=\"@+id/recording_done_size\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"\" />\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"@dimen/small_round\"\n                android:orientation=\"horizontal\">\n\n                <Button\n                    android:id=\"@+id/recording_done_send\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginRight=\"@dimen/small_round\"\n                    android:layout_weight=\"1\"\n                    android:background=\"@drawable/white_button\"\n                    android:drawableStart=\"@drawable/ic_action_send_now\"\n                    android:shadowColor=\"@color/transparent\"\n                    android:text=\"@string/send\"\n                    android:textColor=\"@color/gray_8\"\n                    android:textSize=\"@dimen/info_text_size\" />\n\n                <Button\n                    android:id=\"@+id/recording_done_play\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"@drawable/white_button\"\n                    android:drawableStart=\"@drawable/ic_action_play\"\n                    android:shadowColor=\"@color/transparent\"\n                    android:text=\"@string/open\"\n                    android:textColor=\"@color/gray_8\"\n                    android:textSize=\"@dimen/info_text_size\" />\n\n            </LinearLayout>\n        </LinearLayout>\n\n    </ScrollView>\n\n</LinearLayout>"
  },
  {
    "path": "SaidIt/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"gray_0\">#ff000000</color>\n    <color name=\"gray_6\">#ff666666</color>\n    <color name=\"gray_8\">#ff888888</color>\n    <color name=\"gray_a\">#ffaaaaaa</color>\n    <color name=\"gray_c\">#ffcccccc</color>\n    <color name=\"gray_d\">#ffdddddd</color>\n    <color name=\"gray_e\">#ffeeeeee</color>\n    <color name=\"gray_f\">#ffffffff</color>\n\n    <color name=\"transparent\">#00000000</color>\n\n\n    <color name=\"red\">#ffff0000</color>\n    <color name=\"light_red\">#ffff5555</color>\n    <color name=\"dark_red\">#ffcc0000</color>\n\n    <color name=\"dark_gold\">#ff806600</color>\n    <color name=\"gold\">#ffaa8800</color>\n    <color name=\"light_gold\">#ffffcc00</color>\n\n    <color name=\"dark_green\">#ff00aa44</color>\n    <color name=\"green\">#ff46d869</color>\n    <color name=\"slight_green\">#ff2aff80</color>\n    <color name=\"light_green\">#ffd5ffe6</color>\n\n    <color name=\"half_green\">#8046d869</color>\n    <color name=\"quarter_green\">#4046d869</color>\n</resources>"
  },
  {
    "path": "SaidIt/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">8dp</dimen>\n    <dimen name=\"activity_vertical_margin\">8dp</dimen>\n    <dimen name=\"info_text_size\">20sp</dimen>\n    <dimen name=\"ticket_text_size\">18sp</dimen>\n    <dimen name=\"emph_text_size\">26sp</dimen>\n    <dimen name=\"small_text_size\">15dp</dimen>\n\n    <dimen name=\"button_text_size\">25sp</dimen>\n    <dimen name=\"button_padding\">8dp</dimen>\n    <dimen name=\"status_text_size\">60sp</dimen>\n    <dimen name=\"large_round\">30dp</dimen>\n    <dimen name=\"small_round\">15dp</dimen>\n    <dimen name=\"shadow_offset\">2dp</dimen>\n    <dimen name=\"negative_shadow_offset\">2dp</dimen>\n\n</resources>\n"
  },
  {
    "path": "SaidIt/src/main/res/values/paypal.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <string-array name=\"country_codes\" translatable=\"false\">\n        <item>93,AF</item>\n        <item>355,AL</item>\n        <item>213,DZ</item>\n        <item>376,AD</item>\n        <item>244,AO</item>\n        <item>672,AQ</item>\n        <item>54,AR</item>\n        <item>374,AM</item>\n        <item>297,AW</item>\n        <item>61,AU</item>\n        <item>43,AT</item>\n        <item>994,AZ</item>\n        <item>973,BH</item>\n        <item>880,BD</item>\n        <item>375,BY</item>\n        <item>32,BE</item>\n        <item>501,BZ</item>\n        <item>229,BJ</item>\n        <item>975,BT</item>\n        <item>591,BO</item>\n        <item>387,BA</item>\n        <item>267,BW</item>\n        <item>55,BR</item>\n        <item>673,BN</item>\n        <item>359,BG</item>\n        <item>226,BF</item>\n        <item>95,MM</item>\n        <item>257,BI</item>\n        <item>855,KH</item>\n        <item>237,CM</item>\n        <item>1,CA</item>\n        <item>238,CV</item>\n        <item>236,CF</item>\n        <item>235,TD</item>\n        <item>56,CL</item>\n        <item>86,CN</item>\n        <item>61,CX</item>\n        <item>61,CC</item>\n        <item>57,CO</item>\n        <item>269,KM</item>\n        <item>242,CG</item>\n        <item>243,CD</item>\n        <item>682,CK</item>\n        <item>506,CR</item>\n        <item>385,HR</item>\n        <item>53,CU</item>\n        <item>357,CY</item>\n        <item>420,CZ</item>\n        <item>45,DK</item>\n        <item>253,DJ</item>\n        <item>670,TL</item>\n        <item>593,EC</item>\n        <item>20,EG</item>\n        <item>503,SV</item>\n        <item>240,GQ</item>\n        <item>291,ER</item>\n        <item>372,EE</item>\n        <item>251,ET</item>\n        <item>500,FK</item>\n        <item>298,FO</item>\n        <item>679,FJ</item>\n        <item>358,FI</item>\n        <item>33,FR</item>\n        <item>689,PF</item>\n        <item>241,GA</item>\n        <item>220,GM</item>\n        <item>995,GE</item>\n        <item>49,DE</item>\n        <item>233,GH</item>\n        <item>350,GI</item>\n        <item>30,GR</item>\n        <item>299,GL</item>\n        <item>502,GT</item>\n        <item>224,GN</item>\n        <item>245,GW</item>\n        <item>592,GY</item>\n        <item>509,HT</item>\n        <item>504,HN</item>\n        <item>852,HK</item>\n        <item>36,HU</item>\n        <item>91,IN</item>\n        <item>62,ID</item>\n        <item>98,IR</item>\n        <item>964,IQ</item>\n        <item>353,IE</item>\n        <item>44,IM</item>\n        <item>972,IL</item>\n        <item>39,IT</item>\n        <item>225,CI</item>\n        <item>81,JP</item>\n        <item>962,JO</item>\n        <item>7,KZ</item>\n        <item>254,KE</item>\n        <item>686,KI</item>\n        <item>965,KW</item>\n        <item>996,KG</item>\n        <item>856,LA</item>\n        <item>371,LV</item>\n        <item>961,LB</item>\n        <item>266,LS</item>\n        <item>231,LR</item>\n        <item>218,LY</item>\n        <item>423,LI</item>\n        <item>370,LT</item>\n        <item>352,LU</item>\n        <item>853,MO</item>\n        <item>389,MK</item>\n        <item>261,MG</item>\n        <item>265,MW</item>\n        <item>60,MY</item>\n        <item>960,MV</item>\n        <item>223,ML</item>\n        <item>356,MT</item>\n        <item>692,MH</item>\n        <item>222,MR</item>\n        <item>230,MU</item>\n        <item>262,YT</item>\n        <item>52,MX</item>\n        <item>691,FM</item>\n        <item>373,MD</item>\n        <item>377,MC</item>\n        <item>976,MN</item>\n        <item>382,ME</item>\n        <item>212,MA</item>\n        <item>258,MZ</item>\n        <item>264,NA</item>\n        <item>674,NR</item>\n        <item>977,NP</item>\n        <item>31,NL</item>\n        <item>599,AN</item>\n        <item>687,NC</item>\n        <item>64,NZ</item>\n        <item>505,NI</item>\n        <item>227,NE</item>\n        <item>234,NG</item>\n        <item>683,NU</item>\n        <item>850,KP</item>\n        <item>47,NO</item>\n        <item>968,OM</item>\n        <item>92,PK</item>\n        <item>680,PW</item>\n        <item>507,PA</item>\n        <item>675,PG</item>\n        <item>595,PY</item>\n        <item>51,PE</item>\n        <item>63,PH</item>\n        <item>870,PN</item>\n        <item>48,PL</item>\n        <item>351,PT</item>\n        <item>1,PR</item>\n        <item>974,QA</item>\n        <item>40,RO</item>\n        <item>7,RU</item>\n        <item>250,RW</item>\n        <item>590,BL</item>\n        <item>685,WS</item>\n        <item>378,SM</item>\n        <item>239,ST</item>\n        <item>966,SA</item>\n        <item>221,SN</item>\n        <item>381,RS</item>\n        <item>248,SC</item>\n        <item>232,SL</item>\n        <item>65,SG</item>\n        <item>421,SK</item>\n        <item>386,SI</item>\n        <item>677,SB</item>\n        <item>252,SO</item>\n        <item>27,ZA</item>\n        <item>82,KR</item>\n        <item>34,ES</item>\n        <item>94,LK</item>\n        <item>290,SH</item>\n        <item>508,PM</item>\n        <item>249,SD</item>\n        <item>597,SR</item>\n        <item>268,SZ</item>\n        <item>46,SE</item>\n        <item>41,CH</item>\n        <item>963,SY</item>\n        <item>886,TW</item>\n        <item>992,TJ</item>\n        <item>255,TZ</item>\n        <item>66,TH</item>\n        <item>228,TG</item>\n        <item>690,TK</item>\n        <item>676,TO</item>\n        <item>216,TN</item>\n        <item>90,TR</item>\n        <item>993,TM</item>\n        <item>688,TV</item>\n        <item>971,AE</item>\n        <item>256,UG</item>\n        <item>44,GB</item>\n        <item>380,UA</item>\n        <item>598,UY</item>\n        <item>1,US</item>\n        <item>998,UZ</item>\n        <item>678,VU</item>\n        <item>39,VA</item>\n        <item>58,VE</item>\n        <item>84,VN</item>\n        <item>681,WF</item>\n        <item>967,YE</item>\n        <item>260,ZM</item>\n        <item>263,ZW</item>\n    </string-array>\n\n</resources>"
  },
  {
    "path": "SaidIt/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <string name=\"app_name\" translatable=\"false\">Echo</string>\n\n    <!-- Notifications -->\n\n    <string name=\"recording\">Recording…</string>\n    <string name=\"recording_saved\">Recording saved</string>\n    <string name=\"cant_create_file\">Couldn\\'t create output file: </string>\n    <string name=\"error_during_writing_history_into\">Error during writing audio history into: </string>\n    <string name=\"error_during_recording_into\">Error during recording into: </string>\n\n    <!-- Main screen -->\n\n    <string name=\"listening_enabled_disable\">Echo enabled</string>\n    <string name=\"listening_disabled_enable\">Echo disabled</string>\n\n    <string name=\"listening_description\">Echo lets you go back in time and record events from the past.</string>\n\n    <string name=\"recorded_static\">Recording is in progress. Already saved the most recent</string>\n    <plurals name=\"recorded\">\n        <item quantity=\"other\">Recording is in progress. Already saved the most recent</item>\n    </plurals>\n    <string name=\"recording_stop_description\">Red button below will stop the recording.</string>\n\n    <string name=\"history_size_title_static\">Memory holds the most recent</string>\n    <plurals name=\"history_size_title\">\n        <item quantity=\"other\">Memory holds the most recent</item>\n    </plurals>\n\n    <plurals name=\"minute\">\n        <item quantity=\"one\">%d minute</item>\n        <item quantity=\"other\">%d minutes</item>\n    </plurals>\n\n    <string name=\"minute_second_join\">\" and \"</string>\n\n    <plurals name=\"second\">\n        <item quantity=\"one\">%d second</item>\n        <item quantity=\"other\">%d seconds</item>\n    </plurals>\n\n    <string name=\"save_description\">To save contents of memory to a file, choose how much time would you like to save:</string>\n\n    <string name=\"record_one_minute\">1:00</string>\n    <string name=\"record_five_minutes\">5:00</string>\n    <string name=\"record_30_minutes\">30:00</string>\n    <string name=\"record_2_hrs\">2 Hrs</string>\n    <string name=\"record_6_hrs\">6 Hrs</string>\n    <string name=\"record_all_memory\">0:00</string>\n    <string name=\"default_price\">$ 3.90</string>\n\n    <string name=\"record_description\">To keep recording after saving memory with one of the buttons above, hold it longer.</string>\n\n    <string name=\"upper_memory_limit_start\">Memory is limited at</string>\n    <string name=\"upper_memory_limit_settings_start\">You can change it by altering</string>\n    <string name=\"upper_memory_limit_settings_end\">settings.</string>\n\n    <string name=\"read_more_at\">If you want to know more read Frequently Asked Questions at</string>\n    <string name=\"rate_invite\">Did you liked Echo? You can show your support by sponsoring it on GitHub.</string>\n\n    <!-- Dialogs -->\n\n    <string name=\"work_default\">Working</string>\n    <string name=\"work_verifying_purchase\">Verifying purchase</string>\n    <string name=\"work_preparing_memory\">Preparing memory</string>\n    <string name=\"work_contacting_server\">Contacting server</string>\n    <string name=\"work_claiming_coupon\">Claiming coupon</string>\n\n    <string name=\"install_qr_dialog_title\">Install QR reader</string>\n\n    <string name=\"payment_method_dialog_title\">How can you pay?</string>\n\n    <string name=\"payment_failed_dialog_title\">Payment Not Confirmed</string>\n    <string name=\"payment_failed_description\">You have purchased Echo but I can\\'t verify payment online. How should I proceed?</string>\n    <string name=\"payment_failed_description2\">To give up payment verification, open Settings > Applications > Echo and clear its data.</string>\n    <string name=\"payment_failed_dialog_confirm_manually\">Confirm by email</string>\n\n    <string name=\"payment_verification_failed_email_sent_title\">Issue report sent</string>\n    <string name=\"payment_verification_failed_email_sent_description\">Email with your error was sent to the developer. Soon you should receive an answer with a QR-coded license.</string>\n\n    <string name=\"invalid_license_title\">Invalid License</string>\n    <string name=\"invalid_license_description\">Scanned license doesn\\'t match to your device.</string>\n\n    <string name=\"invalid_qr_code_title\">Invalid QR code</string>\n    <string name=\"invalid_qr_code_description\">This QR code wasn\\'t made for Echo.</string>\n\n    <string name=\"cant_connect_title\">Couldn\\'t Contact Server</string>\n    <string name=\"cant_connect_description\">There was an error while contacting application\\'s server. Ensure that internet connection is working and try again. If it still doesn\\'t work, try different payment method.</string>\n\n    <string name=\"coupon_claimed\">Coupon Already Claimed</string>\n    <string name=\"try_another_qr_code\">Try another</string>\n\n    <string name=\"recording_done_title\">Recording ready</string>\n    <string name=\"recording_done_filename\">File name:</string>\n    <string name=\"recording_done_directory\">Directory:</string>\n    <string name=\"recording_done_runtime\">Length:</string>\n    <string name=\"recording_done_size\">Size:</string>\n\n    <string name=\"press_back_to_cancel\">Press \"back\" to cancel</string>\n    <string name=\"send\">Send</string>\n    <string name=\"open\">Open</string>\n    <string name=\"allow\">Allow</string>\n    <string name=\"exit\">Exit</string>\n    <string name=\"retry\">Retry</string>\n\n    <!-- Settings  -->\n\n    <string name=\"audio_memory_holds\">Audio memory is limited at</string>\n    <string name=\"audio_memory_change\">You can change it by tweaking:</string>\n    <string name=\"option_a_used_ram\">A) System memory in use</string>\n    <string name=\"option_b_audio_quality\">B) Sound quality</string>\n    <string name=\"used_ram_description\">Echo and other apps use system memory to keep their data. Large system memory consumption may slow other apps.</string>\n    <string name=\"audio_quality_description\">Quality of 8kHz is enough to recognize human speech. Higher options offer different tradeoffs between quality and memory consumption.</string>\n    <string name=\"settings_return\">Return</string>\n\n    <!-- Others -->\n\n    <string name=\"sample_time\">22 minutes and 30 seconds.</string>\n    <string name=\"recording_name\">Enter the name of the recording</string> <!-- must end sentence -->\n    <string name=\"save_recording\">Save Recording</string> <!-- must end sentence -->\n    <string name=\"permission_required\">Permission required</string>\n    <string name=\"permission_required_message\">Echo app requires permission to record and save audio. Please enable it in the settings.</string>\n    <!--\n    <string name=\"compress_help\"><b>WAV</b> - oznacza brak jakiejkolwiek kompresji - jest to format najlepiej oszczędzający baterię i cechujący się najlepszą jakością. Jego wadą jest duże zużycie pamięci.\\n\n<b>3GP</b> - oferuje najmocniejszą kompresję ale jest bardzo energożerny i może usunąć z nagrania drobne detale\\n\n<b>MP4</b> - oferuje wysoką jakość i dobrą kompresję ale podobnie jak 3GP, szybko zużywa energię.</string>\n    -->\n\n</resources>\n"
  },
  {
    "path": "SaidIt/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"SaidIt\" parent=\"Theme.AppCompat.Light\">\n        <item name=\"android:windowNoTitle\">true</item>\n<!--\n        <item name=\"android:buttonStyle\">@style/Button</item>\n-->\n        <item name=\"android:textViewStyle\">@style/TextView</item>\n        <item name=\"android:windowBackground\">@color/gray_e</item>\n        <item name=\"android:windowActionBar\">false</item>\n\n       <!-- <item name=\"android:alertDialogTheme\">@style/SaidIt.AlertDialogTheme</item>\n        <item name=\"android:dialogTheme\">@style/SaidIt.AlertDialogTheme</item>-->\n    </style>\n\n    <style name=\"SaidIt.AlertDialogTheme\">\n\n        <item name=\"android:windowFrame\">@null</item>\n        <item name=\"android:windowIsFloating\">true</item>\n        <item name=\"android:windowContentOverlay\">@null</item>\n        <item name=\"android:windowAnimationStyle\">@android:style/Animation.Dialog</item>\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\n        <item name=\"android:windowSoftInputMode\">stateUnspecified|adjustPan</item>\n        <item name=\"android:colorBackgroundCacheHint\">@null</item>\n        <item name=\"android:textViewStyle\">@style/TextView</item>\n\n        <item name=\"android:windowTitleStyle\">@style/SaidIt.DialogWindowTitle</item>\n        <!--<item name=\"android:windowTitleStyle\">@android:style/DialogWindowTitle.Holo.Light</item>-->\n        <!--\n        <item name=\"android:windowContentOverlay\">@null</item>\n        <item name=\"android:windowMinWidthMajor\">@android:dimen/dialog_min_width_major</item>\n        <item name=\"android:windowMinWidthMinor\">@android:dimen/dialog_min_width_minor</item>\n        -->\n    </style>\n\n    <style name=\"SaidIt.DialogWindowTitle\">\n        <item name=\"android:maxLines\">1</item>\n        <item name=\"android:scrollHorizontally\">true</item>\n        <item name=\"android:textAppearance\">@style/SaidIt.TextAppearance.DialogWindowTitle</item>\n    </style>\n\n    <style name=\"SaidIt.TextAppearance\"></style>\n\n    <style name=\"SaidIt.TextAppearance.DialogWindowTitle\">\n\n        <item name=\"android:textSize\">22sp</item>\n        <item name=\"android:textColor\">@color/green</item>\n    </style>\n\n    <style name=\"Theme\" parent=\"SaidIt\">\n    </style>\n\n    <style name=\"ButtonBase\" parent=\"android:Widget.Holo.Button\">\n        <item name=\"android:minWidth\">48dp</item>\n        <item name=\"android:minHeight\">48dp</item>\n        <item name=\"android:gravity\">center</item>\n        <item name=\"android:textSize\">@dimen/emph_text_size</item>\n        <item name=\"android:background\">@drawable/gray_button</item>\n        <item name=\"android:textColor\">@color/gray_f</item>\n        <item name=\"android:paddingTop\">@dimen/button_padding</item>\n        <item name=\"android:paddingBottom\">@dimen/button_padding</item>\n        <item name=\"android:layout_margin\">1dp</item>\n    </style>\n\n    <style name=\"Button\" parent=\"ButtonBase\">\n        <item name=\"android:shadowRadius\">0.01</item>\n        <item name=\"android:shadowDx\">0</item>\n        <item name=\"android:shadowDy\">2</item>\n        <item name=\"android:shadowColor\">@color/gray_6</item>\n    </style>\n\n    <style name=\"Ticket\">\n        <item name=\"android:background\">@drawable/ticket</item>\n        <item name=\"android:textColor\">@color/gray_f</item>\n        <item name=\"android:textSize\">@dimen/ticket_text_size</item>\n        <item name=\"android:minHeight\">0dp</item>\n        <item name=\"android:minWidth\">0dp</item>\n        <item name=\"android:paddingTop\">0dp</item>\n        <item name=\"android:paddingBottom\">0dp</item>\n        <item name=\"android:shadowRadius\">0</item>\n        <item name=\"android:shadowDx\">0</item>\n        <item name=\"android:shadowDy\">0</item>\n        <item name=\"android:shadowColor\">@color/transparent</item>\n    </style>\n\n    <style name=\"CircleButton\" parent=\"ButtonBase\">\n        <item name=\"android:background\">@drawable/circle_button</item>\n        <item name=\"android:layout_margin\">20dp</item>\n    </style>\n\n    <style name=\"GreenButton\" parent=\"ButtonBase\">\n        <item name=\"android:background\">@drawable/top_green_button</item>\n        <item name=\"android:layout_margin\">0dp</item>\n        <item name=\"android:shadowRadius\">0.01</item>\n        <item name=\"android:shadowDx\">0</item>\n        <item name=\"android:shadowDy\">2</item>\n        <item name=\"android:shadowColor\">@color/dark_green</item>\n        <item name=\"android:textColor\">@color/gray_f</item>\n    </style>\n\n    <style name=\"TextBase\" parent=\"android:Widget.TextView\">\n        <item name=\"android:textColor\">@color/gray_0</item>\n        <item name=\"android:textSize\">@dimen/info_text_size</item>\n        <item name=\"android:gravity\">center</item>\n    </style>\n\n    <style name=\"TextView\" parent=\"TextBase\">\n    </style>\n\n    <style name=\"EmphasizedText\" parent=\"TextView\">\n        <item name=\"android:textSize\">@dimen/emph_text_size</item>\n    </style>\n\n    <style name=\"SmallText\">\n        <item name=\"android:textColor\">@color/gray_8</item>\n        <item name=\"android:textSize\">@dimen/small_text_size</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "SaidIt/src/main/res/values-land-v19/bools.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <bool name=\"translucentNavBar\">false</bool>\n</resources>"
  },
  {
    "path": "SaidIt/src/main/res/values-pl/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Notifications -->\n\n    <string name=\"recording\">Nagrywanie…</string>\n    <string name=\"recording_saved\">Nagranie zapisane</string>\n    <string name=\"cant_create_file\">Nie mogłem otworzyć pliku: </string>\n    <string name=\"error_during_writing_history_into\">Błąd podczas zapisywania historii do: </string>\n    <string name=\"error_during_recording_into\">Błąd podczas nagrywania do: </string>\n\n    <!-- Main screen -->\n\n    <string name=\"listening_enabled_disable\">Echo włączone</string>\n    <string name=\"listening_disabled_enable\">Echo wyłączone</string>\n\n    <string name=\"listening_description\">Echo pozwala cofać się w czasie i nagrywać wydarzenia z przeszłości.</string>\n\n    <string name=\"recorded_static\">Trwa nagrywanie. Zapisana została ostatnia</string>\n    <plurals name=\"recorded\">\n        <item quantity=\"one\">Trwa nagrywanie. Zapisana została ostatnia</item>\n        <item quantity=\"few\">Trwa nagrywanie. Zapisane zostały ostatnie</item>\n        <item quantity=\"many\">Trwa nagrywanie. Zapisane zostało ostatnie</item>\n    </plurals>\n    <string name=\"recording_stop_description\">Czerwony przycisk poniżej pozwala zakończyć nagrywanie.</string>\n\n    <string name=\"history_size_title_static\">Aktualnie pamiętane są ostatnie</string>\n    <plurals name=\"history_size_title\">\n        <item quantity=\"one\">Aktualnie pamiętana jest ostatnia</item>\n        <item quantity=\"few\">Aktualnie pamiętane są ostatnie</item>\n        <item quantity=\"many\">Aktualnie pamiętane jest ostatnie</item>\n    </plurals>\n\n    <plurals name=\"minute\">\n        <item quantity=\"one\">%d minuta</item>\n        <item quantity=\"few\">%d minuty</item>\n        <item quantity=\"many\">%d minut</item>\n    </plurals>\n\n    <string name=\"minute_second_join\">\" i \"</string>\n\n    <plurals name=\"second\">\n        <item quantity=\"one\">%d sekunda</item>\n        <item quantity=\"few\">%d sekundy</item>\n        <item quantity=\"many\">%d sekund</item>\n    </plurals>\n\n    <string name=\"save_description\">Aby zapisać zawartość pamięci do pliku, wybierz ile czasu chcesz zapisać:</string>\n\n    <string name=\"record_one_minute\">1:00</string>\n    <string name=\"record_five_minutes\">5:00</string>\n    <string name=\"record_all_memory\">0:00</string>\n    <string name=\"record_30_minutes\">30:00</string>\n    <string name=\"record_2_hrs\">2 godz</string>\n    <string name=\"record_6_hrs\">6 godz</string>\n    <string name=\"default_price\">9.90 zł</string>\n\n    <string name=\"record_description\">Aby po zapisaniu pamięci dowolnym z powyższych przycisków, kontynuować nagrywanie, przytrzymaj go dłużej.</string>\n\n    <string name=\"upper_memory_limit_start\">Górny limit pamięci to</string>\n    <string name=\"upper_memory_limit_settings_start\">Możesz go zmienić modyfikując</string>\n    <string name=\"upper_memory_limit_settings_end\">ustawienia.</string>\n\n    <string name=\"read_more_at\">Jeśli chcesz dowiedzieć się więcej, przeczytaj pytania i odpowiedzi na</string>\n    <string name=\"rate_invite\">Spodobało ci się Echo? Możesz pomóc sponsorując je na GitHubie.</string>\n\n    <!-- Dialogs -->\n\n    <string name=\"work_default\">Pracuję</string>\n    <string name=\"work_verifying_purchase\">Weryfikuję zakup</string>\n    <string name=\"work_preparing_memory\">Przygotowuję pamięć</string>\n    <string name=\"work_contacting_server\">Odpytuję serwer</string>\n    <string name=\"work_claiming_coupon\">Wykorzystuję kupon</string>\n\n    <string name=\"install_qr_dialog_title\">Zainstaluj czytnik QR</string>\n\n    <string name=\"payment_method_dialog_title\">Jak chcesz zapłacić?</string>\n\n    <string name=\"payment_failed_dialog_title\">Płatność Nie Potwierdzona</string>\n    <string name=\"payment_failed_description\">Nie mogę zweryfikować zakupu Echo na serwerze aplikacji. Co mam zrobić?</string>\n    <string name=\"payment_failed_description2\">Aby zupełnie zrezygnować z płatności otwórz Ustawienia > Aplikacje > Echo i wyczyść dane aplikacji.</string>\n    <string name=\"payment_failed_dialog_confirm_manually\">Potwierdź przez email</string>\n\n    <string name=\"payment_verification_failed_email_sent_title\">Raport Wysłany</string>\n    <string name=\"payment_verification_failed_email_sent_description\">Email z opisem twojego problemu został wysłany do autora. Wkrótce otrzymasz odpowiedź z licencją w postaci kodu QR.</string>\n\n    <string name=\"invalid_license_title\">Nieprawidłowa Licencja</string>\n    <string name=\"invalid_license_description\">Zeskanowana licencja nie pasuje do twojego urządzenia.</string>\n\n    <string name=\"invalid_qr_code_title\">Nieprawidłowy kod QR</string>\n    <string name=\"invalid_qr_code_description\">Ten kod nie jest ani licencją, ani kuponem na Echo.</string>\n\n    <string name=\"cant_connect_title\">Serwer Nieosiągalny</string>\n    <string name=\"cant_connect_description\">Nie udało mi się skontaktować z serwerem aplikacji. Upewnij się, że połączenie z internetem działa prawidłowo i spróbuj jeszcze raz. Jeśli wciąż występują problemy, spróbuj innej metody płatności.</string>\n\n    <string name=\"coupon_claimed\">Kupon Zużyty</string>\n    <string name=\"try_another_qr_code\">Spróbuj innego</string>\n\n    <string name=\"recording_done_title\">Nagranie Gotowe</string>\n    <string name=\"recording_done_filename\">Nazwa pliku:</string>\n    <string name=\"recording_done_directory\">Katalog:</string>\n    <string name=\"recording_done_runtime\">Czas trwania:</string>\n    <string name=\"recording_done_size\">Rozmiar:</string>\n\n    <string name=\"press_back_to_cancel\">Aby anulować, wciśnij \"wstecz\"</string>\n    <string name=\"send\">Wyślij</string>\n    <string name=\"open\">Otwórz</string>\n    <string name=\"retry\">Spróbuj ponownie</string>\n    <string name=\"allow\">Umożliwić</string>\n    <string name=\"exit\">Wyjście</string>\n    <!-- Settings  -->\n\n    <string name=\"audio_memory_holds\">Pojemność pamięci dźwięku to</string>\n    <string name=\"audio_memory_change\">Możesz ją zmienić modyfikując:</string>\n    <string name=\"option_a_used_ram\">A) Wykorzystywaną pamięć RAM</string>\n    <string name=\"option_b_audio_quality\">B) Jakość dźwięku</string>\n    <string name=\"used_ram_description\">Echo oraz inne aplikacje wykorzystują pomięć telefonu do zapisywania swoich danych. Duże wykorzystanie pamięci może spowolnić pozostałe aplikacje.</string>\n    <string name=\"audio_quality_description\">Jakość 8kHz wystarcza do zapisu ludzkiej mowy. Wyższe opcje pozwalają na znalezienie kompromisu między jakością nagrania, a zużyciem pamięci.</string>\n    <string name=\"settings_return\">Powrót</string>\n\n    <!-- Others -->\n\n    <string name=\"sample_time\">22 minuty i 30 sekund.</string> <!-- must end sentence -->\n    <string name=\"recording_name\">Wprowadź nazwę nagrania</string> <!-- must end sentence -->\n    <string name=\"save_recording\">Zapisz nagranie</string> <!-- must end sentence -->\n    <string name=\"permission_required\">Wymagane pozwolenie</string>\n    <string name=\"permission_required_message\">Echo aplikacja wymaga pozwolenia na nagrywanie i zapisywanie dźwięku. Proszę włączyć to w ustawieniach.</string>\n</resources>"
  },
  {
    "path": "SaidIt/src/main/res/values-sw600dp-land-v19/bools.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <bool name=\"translucentNavBar\">true</bool>\n</resources>"
  },
  {
    "path": "SaidIt/src/main/res/values-v19/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"Theme\" parent=\"SaidIt\">\n        <item name=\"android:windowTranslucentStatus\">true</item>\n        <item name=\"android:windowTranslucentNavigation\">@bool/translucentNavBar</item>\n    </style>\n\n    <bool name=\"translucentNavBar\">true</bool>\n</resources>"
  },
  {
    "path": "SaidIt/src/main/res/xml/path_provider.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<paths xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <external-path\n        name=\"external_files\"\n        path=\".\" />\n</paths>\n"
  },
  {
    "path": "SaidIt.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module external.linked.project.path=\"$MODULE_DIR$\" external.root.project.path=\"$MODULE_DIR$\" external.system.id=\"GRADLE\" external.system.module.group=\"\" external.system.module.version=\"unspecified\" type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <excludeFolder url=\"file://$MODULE_DIR$/.gradle\" />\n    </content>\n    <orderEntry type=\"inheritedJdk\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n  </component>\n</module>\n\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules."
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/15.txt",
    "content": "<ul>\r\n<li>Bumped the minimum Android SDK level to 30 (Android 11)</li>\r\n<li>Fixed a crash when disabling & re-enabling listening on recent devices</li>\r\n<li>Fixed the lag issue that prevented the app from showing current recording time after opening the app</li>\r\n<li>Removed obsolete links & references to Google Play</li>\r\n</ul>"
  },
  {
    "path": "fastlane/metadata/android/en-US/full_description.txt",
    "content": "Continuously record audio for retrieval at a later time.\r\n\r\nUnless saved, recordings are deleted on a rolling basis.\r\n\r\n<ul>\r\n<li>record harassment and bullying (even when you didn't anticipated them)</li>\r\n<li>save important pieces of information (phone numbers / passwords / instructions)</li>\r\n<li>record cute/funny moments</li>\r\n<li>prove that someone said (or didn't say) something</li>\r\n</ul>\r\n\r\n<b>Limitations</b>\r\n\r\nThe app employs a range of tricks to reduce battery usage but it's still draining quite a bit.\r\nYou'll have to check your device to see how it affects your battery.\r\n\r\nBattery drain is comparable to having constant audio playback.\r\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/short_description.txt",
    "content": "Time travelling audio recorder for Android."
  },
  {
    "path": "fastlane/metadata/android/en-US/title.txt",
    "content": "Echo"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.11.1-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Settings specified in this file will override any Gradle settings\n# configured through the IDE.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\nandroid.enableJetifier=true\nandroid.nonFinalResIds=false\nandroid.nonTransitiveRClass=false\nandroid.useAndroidX=true"
  },
  {
    "path": "gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\nAPP_HOME=$( cd \"${APP_HOME:-./}\" && pwd -P ) || exit\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=${0##*/}\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n# Collect all arguments for the java command;\n#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of\n#     shell script including quotes and variable substitutions, so put them in\n#     double quotes to make sure that they get re-expanded; and\n#   * put everything else in single quotes, so that it's not re-expanded.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n\n@if \"%DEBUG%\"==\"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif %ERRORLEVEL% equ 0 goto execute\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif %ERRORLEVEL% equ 0 goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nset EXIT_CODE=%ERRORLEVEL%\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\nexit /b %EXIT_CODE%\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':SaidIt'\n"
  }
]