[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# CHANGELOG\n\n## v1.2.7\n- Add Italian translation\n- Fix text selection color\n\n## v1.2.6\n- Add Quick Settings Tile that opens p!n\n- Add Swedish translation\n- Automatically open keyboard when p!n launches\n\n## v1.2.5\n- Fix bug that causes snoozing a note to unlock all pins\n- Autocapitalize sentences in note input field\n\n## v1.2.4\n- Add 3 and 12 hours as snooze durations\n\n## v1.2.3\n- Fix snooze duration not updating\n\n## v1.2.2\n- Fix app crashing in background on startup\n\n## v1.2.1\n- Add small pin snooze duration when slider is set to zero - thanks to _ewired_\n- Add button to pin notes in background and immediately snooze them\n\n## v1.2\n- Implement RotaryControlView and integrate it into NoteActivity: Allow user to change pin sleep duration via slider\n- Encapsulate Notification handling in Service\n- Move classes to subpackages\n- Add screenshots to app description in F-Droid\n\n## v1.1\n- Add debug build configuration and make it install-able along release\n- Show all hidden notes when user long presses 'timer'-button\n- Add option to mark notifications as 'ongoing' and fix them to the notification drawer; toggled by user long pressing 'pin'-button\n\n## v1.0.1\n- Remove dialog that warns the user when the app did not receive 'boot completed' broadcast\n\n## v1.0\n- Initial release\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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    <program>  Copyright (C) <year>  <name of author>\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<https://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<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "# ![App Icon](app/src/main/res/mipmap-mdpi/ic_launcher.png) p!n\n\nA minimalistic note-taking app utilizing your phone's notification area:\n\n* Take notes and save them as notifications\n* Edit pinned notices\n* Delete pins\n* Hide notes for a specific period of time\n\nThe app was built with __Material Design__ in mind.\n\nAll notes are stored in the app's database and survive reboots.\n\n<a href=\"https://f-droid.org/packages/de.nproth.pin/\"><img src=\"https://fdroid.gitlab.io/artwork/badge/get-it-on.png\" height=\"75\"></a>\n\n## How to create a new pin\n\nStart the app to create a new pin.\n\n- Enter the text you want to display in the notification.\n\n- There's a number in a semicircle  - that's the number of hours:minutes that\n  the pin will wait for if snoozed. Tap it to change the time.\n  \n- The semicircle acts as a slider and adjusts the snooze time.\n\n- Click the circular pin button to create your pin.\n\n- Nb. the small clock icon on the right will create the pin and immediately\n  snooze it.\n\n## Pin notifications\n\nWhen a pin is shown as a notification you can:\n\n- tap **Done** - this will delete the pin.\n\n- tap **Snooze** - this will make it go away for the configured time period.\n\n- tap **Edit** - use this to change the snooze time or title of the pin.\n\n## Show all pins\n\nYou can cause all pins - including the snoozed ones - to show as notifications\nby *pressing and holding* the semicircular snooze time button on the main\ninterface.\n\n## Locking pins\n\nPins are unlocked by default, that means that you can swipe the group\nnotification away which snoozes all pins at once.\n\nThis also happens if all notifications are cleared. To prevent this you can\n*lock* your pins so that the group notification and the individual notes it\ncontains can't be swiped away.\n\n## Troubleshooting\n\nIf your pins do not reappear directly after start-up, open the app because on some devices __p!n__ may not be able to start in background.\nIn this case try to enable 'Autostart' or disable some battery optimizations for this application.\n\nA good resource for more information on this topic and solutions for various devices I have found [here](https://dontkillmyapp.com/).\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 30\n    defaultConfig {\n        applicationId \"de.nproth.pin\"\n        minSdkVersion 16\n        targetSdkVersion 30\n        versionCode 17\n        versionName \"1.2.13\"\n        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'\n        resValue \"string\", \"authority_provider_notes\", applicationId + '.notes'\n    }\n    buildTypes {\n        debug {\n            applicationIdSuffix '.debug'\n            resValue \"string\", \"authority_provider_notes\", defaultConfig.applicationId + '.debug.notes'\n        }\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation 'androidx.appcompat:appcompat:1.3.1'\n    implementation 'com.google.android.material:material:1.4.0'\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "app/src/debug/res/drawable/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n        android:width=\"108dp\"\r\n        android:height=\"108dp\"\r\n        android:viewportWidth=\"14.816666\"\r\n        android:viewportHeight=\"14.816667\">\r\n  <path\r\n      android:pathData=\"m5.0271,6.6146a0.5613,0.5613 0,0 0,0.7937 0l1.1906,1.1906 -0.3969,0.3969a0.5613,0.5613 0,0 0,0 0.7937l0.3969,-0.3969 0.3969,-0.3969 0.1984,-0.1984 1.7859,1.7859 0.3969,-0 0,-0.3969 -1.7859,-1.7859 0.1984,-0.1984 0.3969,-0.3969 0.3969,-0.3969a0.5613,0.5613 0,0 0,-0.7938 0l-0.3969,0.3969 -1.1906,-1.1906a0.5613,0.5613 0,0 0,0 -0.7937l-0.3969,0.3969 -0.7938,0.7937z\"\r\n      android:strokeAlpha=\"1\"\r\n      android:strokeWidth=\"16.87502289\"\r\n      android:fillColor=\"#ffffff\"\r\n      android:strokeColor=\"#00000000\"\r\n      android:fillAlpha=\"1\"\r\n      android:strokeLineCap=\"square\"/>\r\n</vector>\r\n"
  },
  {
    "path": "app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/debug/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#A60000</color>\n</resources>"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"de.nproth.pin\">\n\n    <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\n    <uses-permission android:name=\"android.permission.WAKE_LOCK\" />\n\n    <queries>\n        <intent>\n            <!-- Allow custom text actions (like \"search selected text\") -->\n            <action android:name=\"android.intent.action.PROCESS_TEXT\" />\n            <data android:mimeType=\"text/plain\" />\n        </intent>\n    </queries>\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:installLocation=\"internalOnly\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <service\n            android:name=\".pinboard.PinboardService\"\n            android:enabled=\"true\"\n            android:exported=\"false\"/>\n\n        <activity\n            android:name=\".NoteActivity\"\n            android:excludeFromRecents=\"true\"\n            android:launchMode=\"singleInstance\"\n            android:noHistory=\"true\"\n            android:windowSoftInputMode=\"adjustResize\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n        <provider\n            android:name=\".NotesProvider\"\n            android:authorities=\"@string/authority_provider_notes\"\n            android:enabled=\"true\"\n            android:exported=\"false\" />\n\n        <receiver\n            android:name=\".receiver.DeleteNoteReceiver\"\n            android:enabled=\"true\" />\n        <receiver\n            android:name=\".receiver.SnoozeNoteReceiver\"\n            android:enabled=\"true\" />\n        <receiver\n            android:name=\".receiver.BootReceiver\"\n            android:enabled=\"true\"\n            android:exported=\"true\">\n            <intent-filter>\n                <category android:name=\"android.intent.category.DEFAULT\" />\n\n                <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n            </intent-filter>\n        </receiver>\n        <receiver\n            android:name=\".receiver.AlarmReceiver\"\n            android:enabled=\"true\" />\n\n        <service\n            android:name=\".receiver.NotificationJobService\"\n            android:enabled=\"true\"\n            android:permission=\"android.permission.BIND_JOB_SERVICE\" />\n\n        <service\n            android:name=\".PinTileService\"\n            android:label=\"@string/qstile_label\"\n            android:icon=\"@drawable/ic_pin_icon_white\"\n            android:permission=\"android.permission.BIND_QUICK_SETTINGS_TILE\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.service.quicksettings.action.QS_TILE\" />\n            </intent-filter>\n        </service>\n\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/NoteActivity.java",
    "content": "package de.nproth.pin;\n\nimport android.content.ComponentName;\nimport android.content.ContentValues;\nimport android.content.Intent;\nimport android.content.ServiceConnection;\nimport android.database.Cursor;\nimport android.net.Uri;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.IBinder;\nimport android.os.Looper;\nimport androidx.appcompat.app.AppCompatActivity;\nimport android.text.TextUtils;\nimport android.util.Log;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.animation.Animation;\nimport android.view.animation.AnimationUtils;\nimport android.view.inputmethod.EditorInfo;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.ImageButton;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport de.nproth.pin.pinboard.PinboardService;\nimport de.nproth.pin.util.Timespan;\n\n/**\n * Only activity of this app. Allows the user to add or edit pins and set the snooze duration\n */\npublic class NoteActivity extends AppCompatActivity implements ServiceConnection {\n\n    private EditText NoteInputField;\n    private ImageButton SaveNoteButton;\n    private Button SnoozeDurationButton;\n    private RotaryControlView SnoozeDurationSlider;\n    private ImageButton PinBackgroundButton;\n\n    private Handler mAnimHandler;\n\n    private Animation mEmptyPinAnimation;\n    private Animation mPinAnimation;\n    private Animation mRotaryAnimation;\n    private Animation mRotarySetAnimation;\n    private Animation mPopInAnimation;\n\n    private int[] mDurations;\n    private int[] mSteps;\n    private int[] mZeroSnoozeDurations;\n    private int mZeroSnoozeDur;\n\n    private PinboardService.PinboardBinder mPinboard;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n\n        overridePendingTransition(R.anim.activity_enter, R.anim.activity_exit);\n\n        setContentView(R.layout.activity_note);\n\n        NoteInputField = findViewById(R.id.note_input_field);\n        SaveNoteButton = findViewById(R.id.note_save_button);\n        SnoozeDurationButton = findViewById(R.id.snooze_duration_button);\n        SnoozeDurationSlider = findViewById(R.id.snooze_duration_slider);\n\n        PinBackgroundButton = findViewById(R.id.note_pin_background);\n\n        mAnimHandler = new Handler(Looper.getMainLooper());\n        mPinAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_input_field_pin);\n\n        mEmptyPinAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_input_field_empty);\n\n        mRotaryAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_rotary_control);\n        mRotarySetAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_rotary_set);\n\n        mPopInAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_pop_in);\n\n\n        mDurations = getResources().getIntArray(R.array.snooze_durations);\n        mSteps = getResources().getIntArray(R.array.snooze_duration_steps);\n        mZeroSnoozeDurations = getResources().getIntArray(R.array.zero_snooze_durations);\n\n        prepareEditPin();\n\n    }\n\n    @Override\n    public void onNewIntent(Intent i) {\n        super.onNewIntent(i);\n        setIntent(i);\n        prepareEditPin();\n    }\n\n    @Override\n    protected void onStart() {\n        super.onStart();\n        bindService(new Intent(this, PinboardService.class), this, BIND_AUTO_CREATE);\n    }\n\n    @Override\n    protected void onStop() {\n        super.onStop();\n        unbindService(this);\n    }\n\n    @Override\n    public void onServiceConnected(ComponentName name, IBinder service) {\n        mPinboard = (PinboardService.PinboardBinder) service;\n\n        /*****************************\n         Initialize UI components here\n         *****************************/\n\n        //pin note to notification drawer on enter action in textfield\n        NoteInputField.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n            @Override\n            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n                if(actionId == EditorInfo.IME_ACTION_DONE || (event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {\n                    pinNote(0);\n                    return true;\n                }\n                else\n                    return false;\n            }\n        });\n\n        //Wake up hidden pins on long click on SnoozeDurationutton\n        SnoozeDurationButton.setOnLongClickListener(new View.OnLongClickListener() {\n            @Override\n            public boolean onLongClick(View v) {\n                ContentValues cv = new ContentValues();\n                cv.put(NotesProvider.Notes.WAKE_UP, 0);\n                int updated = getContentResolver().update(Uri.parse(NotesProvider.CONTENT_URI + \"/notes\"), cv, NotesProvider.Notes.WAKE_UP + \" <> 0 AND \" + NotesProvider.Notes.TEXT + \" IS NOT NULL\", null);\n                //Show toast when notes woke up\n                if(updated > 0)\n                    Toast.makeText(NoteActivity.this, R.string.toast_show_all, Toast.LENGTH_SHORT).show();\n                //update silently (without notification ping)\n                mPinboard.update();\n                return true;\n            }\n        });\n\n        //Prepare Rotary Control\n        SnoozeDurationSlider.setOnValueChangedListener(new RotaryControlView.OnValueChangedListener() {\n            @Override\n            public void onValueChanged(int val, int min, int max, int stepVal) {}\n\n            @Override\n            public void onUserChangeBegin(int val) {}\n\n            @Override\n            public void onUserChange(int val) {\n                // if zero, assume zero_snooze_duration\n                int cur = val == 0 ? mZeroSnoozeDur : val * 1000;\n                Timespan span = new Timespan(NoteActivity.this, cur);\n                String txt = getResources().getString(R.string.ftext_button_snooze_duration, (int) span.inHours(), span.restMins());\n                if (span.millis < 60000) txt = getResources().getString(R.string.ftext_button_zero_snooze, (int) span.inSecs());\n                SnoozeDurationButton.setText(txt);\n            }\n\n            @Override\n            public void onUserChangeEnd(int val) {\n                // if zero, assume zero_snooze_duration\n                mPinboard.setSnoozeDuration(val == 0 ? mZeroSnoozeDur : val * 1000);\n            }\n        });\n\n        //And fix pins on long click on PinButton\n        SaveNoteButton.setOnLongClickListener(new View.OnLongClickListener() {\n            @Override\n            public boolean onLongClick(View v) {\n                boolean fixPins = !mPinboard.getIsFixed();\n                mPinboard.setIsFixed(fixPins);\n                String toast;\n                if(fixPins)\n                    toast = NoteActivity.this.getString(R.string.toast_fix_pins);\n                else\n                    toast = NoteActivity.this.getString(R.string.toast_unfix_pins);\n                Toast.makeText(NoteActivity.this, toast, Toast.LENGTH_SHORT).show();\n                mPinboard.update();\n                return true;\n            }\n        });\n\n        loadSnoozeDuration();\n        SnoozeDurationSlider.startAnimation(mRotaryAnimation);\n\n        PinBackgroundButton.startAnimation(mPopInAnimation);\n    }\n\n    @Override\n    public void onServiceDisconnected(ComponentName name) {\n        Log.w(\"NoteActivity\", \"PinboardService disconnected, shutting down activity...\");\n        NoteInputField.setOnEditorActionListener(null);\n        SnoozeDurationButton.setOnLongClickListener(null);\n        SnoozeDurationSlider.setOnValueChangedListener(null);\n        SaveNoteButton.setOnLongClickListener(null);\n        mPinboard = null;\n    }\n\n\n    private void loadSnoozeDuration() {\n        long dur = mPinboard.getSnoozeDuration();\n\n        int index = 0;\n\n        while(index < mDurations.length - 1 && mDurations[index] < dur)\n            index++;\n\n        //if there is a zero snooze duration exactly matching the current duration, set up this instead\n        for(int i = 0; i < mZeroSnoozeDurations.length; i++)\n            if(mZeroSnoozeDurations[i] == dur) {\n                dur = 0;\n                index = i;//Assuming that mDurations and mZeroDurations have equal length\n            }\n\n        SnoozeDurationSlider.setMaxValue(mDurations[index] / 1000);\n        SnoozeDurationSlider.setStepValue(mSteps[index] / 1000);\n        SnoozeDurationSlider.setValue((int) (dur / 1000));//in seconds\n        //setValue / getValue takes care of normalizing, aligning to steps, ...\n\n        mZeroSnoozeDur = mZeroSnoozeDurations[index];\n\n        Log.d(\"NoteActivity\", \"Loaded slider value \" + SnoozeDurationSlider.getValue());\n        // If zero, assume zero_snooze_duration\n        long spanMillis = SnoozeDurationSlider.getValue() == 0 ? mZeroSnoozeDur : SnoozeDurationSlider.getValue() * 1000;\n        Timespan span = new Timespan(this, spanMillis);\n\n        Log.d(\"NoteActivity\", \"Loaded milliseconds \" + span.millis);\n        String txt = getResources().getString(R.string.ftext_button_snooze_duration, (int) span.inHours(), span.restMins());\n        if (span.millis < 60000)\n            txt =  getResources().getString(R.string.ftext_button_zero_snooze, (int) span.inSecs());\n        SnoozeDurationButton.setText(txt);\n        mPinboard.update();\n    }\n\n    public void onNoteSaveButtonClicked(View v) {\n        if(mPinboard == null) {\n            Log.e(\"NoteActivity\", \"PinButton clicked but PinboardService disconnected\");\n            return;\n        }\n        pinNote(0);\n    }\n\n    public void onNotePinBackgroundButtonClicked(View v) {\n        if(mPinboard == null) {\n            Log.e(\"NoteActivity\", \"PinButton clicked but PinboardService disconnected\");\n            return;\n        }\n        if(pinNote(mPinboard.getSnoozeDuration()))\n            Toast.makeText(this, getResources().getString(R.string.toast_pin_background, new Timespan(this, mPinboard.getSnoozeDuration()).toString()), Toast.LENGTH_SHORT).show();\n    }\n\n    public void onParentLayoutClicked(View v) {\n        finish();//exit activity when user clicks on empty space in activity\n    }\n\n    public void onSetSnoozeDurationButtonClicked(View v) {\n        if(mPinboard == null) {\n            Log.e(\"NoteActivity\", \"PinButton clicked but PinboardService disconnected\");\n            return;\n        }\n\n        int index = 0;\n        long dur = SnoozeDurationSlider.getValue() * 1000;\n        while(index < mDurations.length && mDurations[index] <= dur)\n            index++;\n        if(index == mDurations.length)\n            index = 0;\n\n        final int i = index;\n        SnoozeDurationSlider.startAnimation(mRotarySetAnimation);\n        mAnimHandler.postDelayed(new Runnable() {\n            @Override\n            public void run() {\n                mPinboard.setSnoozeDuration(mDurations[i]);\n                loadSnoozeDuration();\n            }\n        }, 250);\n    }\n\n    private boolean pinNote(long snooze) {\n        String txt = NoteInputField.getText().toString();\n        long time = System.currentTimeMillis();\n\n        //Save note in Database via ContentProvider\n        if(!TextUtils.isEmpty(txt)) {\n\n            ContentValues cv = new ContentValues();\n            cv.put(NotesProvider.Notes.TEXT, txt);\n            cv.put(NotesProvider.Notes.MODIFIED, time);\n            cv.put(NotesProvider.Notes.WAKE_UP, time + snooze);\n\n            Uri uri = getIntent().getData();\n\n            //We're about to pin a new note\n            if(uri == null) {\n                //Created is used to show a timestamp in the notification area\n                cv.put(NotesProvider.Notes.CREATED, time);\n                uri = getContentResolver().insert(Uri.parse(NotesProvider.CONTENT_URI + \"/notes\"), cv);\n                Log.d(\"NoteActivity\", String.format(\"Inserted note item with uri '%s'\", uri));\n            } else {\n                //We're about to update a existing note\n                getContentResolver().update(uri, cv, null, null);\n                Log.d(\"NoteActivity\", String.format(\"Updated note item with uri '%s'\", uri));\n            }\n\n            if(uri != null)\n                mPinboard.update();\n\n            NoteInputField.startAnimation(mPinAnimation);\n            SnoozeDurationSlider.startAnimation(mRotarySetAnimation);\n            mAnimHandler.postDelayed(new Runnable() {\n                @Override\n                public void run() {\n                    NoteInputField.setText(\"\");\n                    NoteInputField.requestFocus();\n                }\n            }, 125);\n\n            //Do not close but give user the opportunity to enter additional notes\n\n            //But clear any data we previously operated upon\n            getIntent().setData(null);\n            return true;\n        } else {\n            NoteInputField.startAnimation(mEmptyPinAnimation);\n            return false;\n        }\n    }\n\n    /**\n     * Checks whether any Uri data is contained in the activity's intent and prepares the textfield accordingly. To be called from onCreate and onNewIntent\n     */\n    private void prepareEditPin() {\n\n        Uri uri = getIntent().getData();\n        Log.d(\"NoteActivity\", String.format(\"Activity called with uri: %s\", uri == null? \"null\" : uri));\n        if(uri != null) {\n            if (TextUtils.isEmpty(uri.getLastPathSegment()) || !TextUtils.isDigitsOnly(uri.getLastPathSegment())) {\n                Log.e(\"NoteActivity\", String.format(\"Invalid data uri '%s' supplied\", uri));\n                finish();\n            }\n            //And populate UI with supplied data\n            Cursor c = getContentResolver().query(uri, new String[] { NotesProvider.Notes.TEXT }, null, null, null);\n            if(c == null || c.getCount() != 1) {\n                Log.e(\"NoteActivity\", String.format(\"Could not query text for uri '%s'\", uri));\n            } else {\n                c.moveToFirst();\n                NoteInputField.setText(c.getString(0));\n            }\n\n            if(c != null)\n                c.close();\n        }\n    }\n\n    @Override\n    public void finish() {\n        super.finish();\n        overridePendingTransition(R.anim.activity_enter, R.anim.activity_exit);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/NotesProvider.java",
    "content": "package de.nproth.pin;\n\nimport android.content.ContentProvider;\nimport android.content.ContentValues;\nimport android.content.UriMatcher;\nimport android.database.Cursor;\nimport android.database.SQLException;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteOpenHelper;\nimport android.net.Uri;\nimport android.provider.BaseColumns;\nimport android.text.TextUtils;\nimport android.util.Log;\n\n/**\n * Content Provider of this app, stores pins in database\n */\npublic class NotesProvider extends ContentProvider {\n\n    public static final String AUTHORITIES = BuildConfig.APPLICATION_ID + \".notes\";\n    public static final String CONTENT_URI = \"content://\" + AUTHORITIES;\n\n    public static final class Notes implements BaseColumns {\n        public static final Uri NOTES_URI = Uri.parse(CONTENT_URI + \"/notes\");\n\n        //public static final String _ID = \"_id\"; in BaseColumns\n        public static final String TEXT = \"text\";//TEXT note's content. If a notes text is set to NULL the note is marked as deleted and will be removed from the database on next boot\n        public static final String CREATED = \"created\";//INT time of note's creation as UTC timestamp\n        /**\n         * CAUTION: DO NOT USE! Not present in database (since DB_VERSION 3) after a fresh install\n         */\n        @Deprecated\n        public static final String SNOOZED = \"snoozed\";//INT last time the note was 'snoozed' as UTC timestamp\n\n        public static final String WAKE_UP = \"wake_up\";//INT time a snoozed note should wake up as UTC timestamp\n        public static final String MODIFIED = \"modified\";//INT last time the note was modified as UTC timestamp, e.g. it's text changed, it was snoozed or deleted\n    }\n\n    private final int NOTES_LIST = 1;\n    private final int NOTES_ITEM = 2;\n\n    /** CHANGELOG:\n     * 1 - initial db\n     * 2 - add column 'wake_up'\n     * 3 - remove column 'snoozed'\n     */\n    private final int DB_VERSION = 3;\n\n    private UriMatcher mUris = new UriMatcher(UriMatcher.NO_MATCH);\n    {\n        mUris.addURI(AUTHORITIES, \"notes\", NOTES_LIST);\n        mUris.addURI(AUTHORITIES, \"notes/#\", NOTES_ITEM);\n    }\n\n    private SQLiteOpenHelper mDbHelper;\n\n    public NotesProvider() {\n    }\n\n    @Override\n    public boolean onCreate() {\n        mDbHelper = new SQLiteOpenHelper(getContext(), \"notes.db\", null, DB_VERSION) {\n            @Override\n            public void onCreate(SQLiteDatabase db) {\n                db.beginTransaction();\n                try {\n                    db.execSQL(\"CREATE TABLE notes (_id INTEGER PRIMARY KEY AUTOINCREMENT, text TEXT, created INT NOT NULL, wake_up INT NOT NULL DEFAULT 0, modified INT NOT NULL DEFAULT 0);\");//NULL text means that the note was deleted\n                    db.setTransactionSuccessful();\n                } catch(SQLException sql) {\n                    Log.e(\"Notesprovider\", \"Could not create database\", sql);\n                }\n                finally {\n                    db.endTransaction();\n                }\n\n                Log.d(\"NotesProvider\", \"Database 'notes.db' created\");\n            }\n\n            @Override\n            public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n                db.beginTransaction();\n                try {\n                    switch(oldVersion) {\n                        case 1:\n                            db.execSQL(\"ALTER TABLE notes ADD COLUMN wake_up INT NOT NULL DEFAULT 0\");\n                        case 2:\n                            //ALTER TABLE notes DELETE COLUMN snoozed; - not supported on android so just reset this column and stop using it. Not present after a fresh install\n                            ContentValues cv = new ContentValues();\n                            cv.put(\"snoozed\", 0);\n                            db.update(\"notes\", cv, null, null);//set 'snoozed' to default value in all rows\n                        default:\n                    }\n                    //do upgrade here\n                    db.setTransactionSuccessful();\n                } catch(SQLException sql) {\n                    Log.e(\"NotesProvider\", \"Could not upgrade database\", sql);\n                }\n                finally {\n                    db.endTransaction();\n                }\n\n                Log.d(\"NotesProvider\", \"Database 'notes.db' upgraded\");\n            }\n        };\n        return true;\n    }\n\n    @Override\n    public int delete(Uri uri, String selection, String[] selectionArgs) {\n\n        switch(mUris.match(uri)) {\n            default:\n                Log.e(\"NotesProvider\", String.format(\"Could not delete rows from table 'notes': invalid uri '%s'\", uri.toString()));\n                return 0;\n\n            case NOTES_ITEM:\n                String id = uri.getLastPathSegment();\n                // check if id is really just a number else SQL injection attacks might be possible\n                if(!TextUtils.isDigitsOnly(id)) {\n                    Log.e(\"NoteProvider\", String.format(\"Invalid id in uri for delete op: '%s' in '%s' is not a numeric id\", id, uri.toString()));\n                    return 0;\n                }\n                if(!TextUtils.isEmpty(selection))\n                    selection = \"(\" + selection + \") AND _id = \" + id;\n                else\n                    selection = \"_id = \" + id;\n                //continue to next case\n            case NOTES_LIST:\n                try {\n                    int cols = mDbHelper.getReadableDatabase().delete(\"notes\", selection, selectionArgs);\n\n                    getContext().getContentResolver().notifyChange(Uri.parse(CONTENT_URI + \"/notes\"), null);\n                    return cols;\n                } catch(SQLException sql) {\n                    Log.e(\"NoteProvider\", \"Could not delete rows from table 'notes'\", sql);\n                    return 0;\n                }\n        }\n    }\n\n    @Override\n    public String getType(Uri uri) {\n        switch(mUris.match(uri)) {\n            case NOTES_ITEM: return \"vnd.android.cursor.item/vnd.nproth.notes\";\n            case NOTES_LIST: return \"vnd.android.cursor.dir/vnd.nproth.notes\";\n            default:\n                Log.e(\"NotesProvider\", String.format(\"Unknown type for Uri '%s'\",uri.toString()));\n                return null;\n        }\n    }\n\n    @Override\n    public synchronized Uri insert(Uri uri, ContentValues values) {\n        switch(mUris.match(uri)) {\n\n            case NOTES_LIST:\n                try {\n                    long id = mDbHelper.getWritableDatabase().insertOrThrow(\"notes\", null, values);\n                    Uri item = Uri.parse(CONTENT_URI + \"/notes/\" + Long.toString(id));\n                    getContext().getContentResolver().notifyChange(Uri.parse(CONTENT_URI + \"/notes\"), null);\n                    return item;\n\n                } catch(SQLException sql) {\n                    Log.e(\"NotesProvider\", \"Could not insert new entry into table 'notes'\", sql);\n                    return null;\n                }\n\n            case NOTES_ITEM://invalid\n            default:\n                Log.e(\"NotesProvider\", String.format(\"Invalid uri '%s': Could not insert new entry into table 'notes'\", uri.toString()));\n                return null;\n        }\n    }\n\n    @Override\n    public Cursor query(Uri uri, String[] projection, String selection,\n                        String[] selectionArgs, String sortOrder) {\n        if(TextUtils.isEmpty(sortOrder))\n            sortOrder = \"_id ASC\";\n\n        switch(mUris.match(uri)) {\n            default:\n                Log.e(\"NotesProvider\", String.format(\"Could not query table 'notes': invalid uri '%s'\", uri.toString()));\n                return null;\n\n            case NOTES_ITEM:\n                String id = uri.getLastPathSegment();\n                // check if id is really just a number else SQL injection attacks might be possible\n                if(!TextUtils.isDigitsOnly(id)) {\n                    Log.e(\"Noteprovider\", String.format(\"Invalid id in uri for query: '%s' in '%s' is not a numeric id\", id, uri.toString()));\n                    return null;\n                }\n                if(!TextUtils.isEmpty(selection))\n                    selection = \"(\" + selection + \") AND _id = \" + id;\n                else\n                    selection = \"_id = \" + id;\n                //continue to next case\n            case NOTES_LIST:\n                try {\n                    Cursor c = mDbHelper.getReadableDatabase().query(\"notes\", projection, selection, selectionArgs, null, null, sortOrder);\n                    if(c == null)\n                        Log.e(\"NoteProvider\", String.format(\"Cursor for query '%s' on table 'notes' is null\", selection));\n                    return c;\n                } catch(SQLException sql) {\n                    Log.e(\"NoteProvider\", \"Could not query table 'notes'\", sql);\n                    return null;\n                }\n        }\n    }\n\n    @Override\n    public int update(Uri uri, ContentValues values, String selection,\n                      String[] selectionArgs) {\n        String id = null;\n\n        switch(mUris.match(uri)) {\n            default:\n                Log.e(\"NotesProvider\", String.format(\"Could not update table 'notes': invalid uri '%s'\", uri.toString()));\n                return 0;\n\n            case NOTES_ITEM:\n                id = uri.getLastPathSegment();\n                // check if id is really just a number else SQL injection attacks might be possible\n                if(!TextUtils.isDigitsOnly(id)) {\n                    Log.e(\"NotesProvider\", String.format(\"Invalid id in uri for update: '%s' in '%s' is not a numeric id\", id, uri.toString()));\n                    return 0;\n                }\n                if(!TextUtils.isEmpty(selection))\n                    selection = \"(\" + selection + \") AND _id = \" + id;\n                else\n                    selection = \"_id = \" + id;\n                //continue to next case\n            case NOTES_LIST:\n                try {\n                    int cols = mDbHelper.getReadableDatabase().update(\"notes\", values, selection, selectionArgs);\n\n                    if(cols > 0)\n                        if(id == null)\n                            getContext().getContentResolver().notifyChange(Uri.parse(CONTENT_URI + \"/notes\"), null);\n                        else\n                            getContext().getContentResolver().notifyChange(Uri.parse(CONTENT_URI + \"/notes/\" + id), null);//We know that only this column was updated\n\n                    return cols;\n                } catch(SQLException sql) {\n                    Log.e(\"NotesProvider\", \"Could not update table 'notes'\", sql);\n                    return 0;\n                }\n        }\n    }\n\n\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/PinTileService.java",
    "content": "/**\n * Changelog\n *\n * 2019-10-28 nproth\n *\n * * Implement PinTileService which provides a Quick Settings Tile to the user which opens the app.\n */\n\npackage de.nproth.pin;\n\nimport android.annotation.TargetApi;\nimport android.content.Intent;\nimport android.service.quicksettings.Tile;\nimport android.service.quicksettings.TileService;\n\n\n/**\n * Provides a Settings Tile to the user which opens p!n.\n * Tiles are not supported before Api 24.\n */\n@TargetApi(24)\npublic class PinTileService extends TileService {\n\n    /**\n     * Launches {@link NoteActivity} when the Quick Settings Tile is clicked\n     */\n    @Override\n    public void onClick() {\n        super.onClick();\n\n        Intent i = new Intent(this, NoteActivity.class);\n        // Required to start Activity from outside of an Activity context\n        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n        startActivityAndCollapse(i);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/RotaryControlView.java",
    "content": "package de.nproth.pin;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.Path;\nimport android.graphics.PointF;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\nimport android.graphics.drawable.Drawable;\nimport android.os.Build;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.MotionEvent;\nimport android.view.View;\n\n/**\n * TODO: document your custom view class.\n */\npublic class RotaryControlView extends View {\n\n    private Drawable mScaleDrawable;\n    private Drawable mBarDrawable;\n\n    private float mStartAngle = 90;\n    private float mEndAngle = 90;\n\n    private int mMinValue = 0;\n    private int mMaxValue = 100;\n    private int mStepValue = 1;\n    private int mValue = 0;\n\n    private Path mClip = new Path();\n    private Rect mBounds = new Rect();\n    private RectF mBoundsF = new RectF();\n\n    private PointF mTouch = new PointF();\n    private double mAngleLastTouch;\n    private double mLastValue;\n\n    private OnValueChangedListener mValListener;\n\n    public interface OnValueChangedListener {\n\n        public void onValueChanged(int val, int min, int max, int stepVal);\n\n        public void onUserChangeBegin(int val);\n\n        public void onUserChange(int val);\n\n        public void onUserChangeEnd(int val);\n    }\n\n    public RotaryControlView(Context context) {\n        super(context);\n        init(null, 0);\n    }\n\n    public RotaryControlView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        init(attrs, 0);\n    }\n\n    public RotaryControlView(Context context, AttributeSet attrs, int defStyle) {\n        super(context, attrs, defStyle);\n        init(attrs, defStyle);\n    }\n\n    private void init(AttributeSet attrs, int defStyle) {\n        // Load attributes\n        final TypedArray a = getContext().obtainStyledAttributes(\n                attrs, R.styleable.RotaryControlView, defStyle, 0);\n\n        setScaleDrawable(a.getDrawable(R.styleable.RotaryControlView_scaleDrawable));\n        setBarDrawable(a.getDrawable(R.styleable.RotaryControlView_barDrawable));\n        setStartAngle(a.getFloat(R.styleable.RotaryControlView_startAngle, 90));\n        setEndAngle(a.getFloat(R.styleable.RotaryControlView_endAngle, 90));\n        setMinValue(a.getInt(R.styleable.RotaryControlView_min, 0));\n        setMaxValue(a.getInt(R.styleable.RotaryControlView_max, 100));\n        setStepValue(a.getInt(R.styleable.RotaryControlView_step, 1));\n        setValue(a.getInt(R.styleable.RotaryControlView_value, 0));\n\n        a.recycle();\n\n\n        //Hw support for Canvas#clipPath not present before\n        if(Build.VERSION.SDK_INT < 18)\n            this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);\n    }\n\n\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        super.onDraw(canvas);\n\n        int paddingLeft = getPaddingLeft();\n        int paddingTop = getPaddingTop();\n        int paddingRight = getPaddingRight();\n        int paddingBottom = getPaddingBottom();\n\n        int right = getWidth() - paddingRight;\n        int bottom = getHeight() - paddingBottom;\n\n        int contentWidth = right - paddingLeft;\n        int contentHeight = bottom - paddingTop;\n\n        mBounds.set(paddingLeft, paddingTop, right, bottom);\n        mBoundsF.set(paddingLeft, paddingTop, right, bottom);\n\n        float centerX = paddingLeft + (0.5f * contentWidth);\n        float centerY = paddingTop + (0.5f * contentHeight);\n\n        float angle = (mEndAngle - mStartAngle);\n        while(angle <= 0)\n            angle += 360;\n        angle %= 360;\n        float sweep = angle * (mValue - mMinValue) / (mMaxValue - mMinValue);\n\n        if(mScaleDrawable != null) {\n            mScaleDrawable.setBounds(mBounds);\n            mScaleDrawable.draw(canvas);\n        }\n\n        if(mBarDrawable != null) {\n            mBarDrawable.setBounds(mBounds);\n            canvas.save();\n\n            mClip.reset();\n            mClip.moveTo(centerX, centerY);\n            mClip.arcTo(mBoundsF, mStartAngle, sweep, false);\n            mClip.close();\n\n            canvas.clipPath(mClip);\n            mBarDrawable.draw(canvas);\n\n            canvas.restore();\n        }\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n        super.onTouchEvent(event);\n\n        Log.d(\"RotaryControlView\", \"Touch Event with pointer index: \" + event.getActionIndex());\n\n        if(event.getActionIndex() != 0)\n            return true;//We only care about pointer 1\n\n        int paddingLeft = getPaddingLeft();\n        int paddingTop = getPaddingTop();\n        int paddingRight = getPaddingRight();\n        int paddingBottom = getPaddingBottom();\n\n        int right = getWidth() - paddingRight;\n        int bottom = getHeight() - paddingBottom;\n\n        int contentWidth = right - paddingLeft;\n        int contentHeight = bottom - paddingTop;\n        float cx = paddingLeft + (0.5f * contentWidth);\n        float cy = paddingTop + (0.5f * contentHeight);\n\n        float x = event.getX();\n        float y = event.getY();\n\n        double unit = ((double) mMaxValue - mMinValue) / Math.abs(mEndAngle - mStartAngle);\n\n        float a, c;\n        double angle;\n\n        a = Math.abs(y - cy);\n        c = Math.abs(x - cx);\n\n        if(c != 0)\n            angle = Math.toDegrees(Math.atan(a / c));\n        else\n            angle = 0;\n\n        if(x < cx)\n            angle = 180 - angle;\n        if(y < cy)\n            angle = 360 - angle;\n\n\n        Log.d(\"RotaryControlView\", \"onTouchMove, alpha: \" + angle);\n\n\n        switch(event.getActionMasked()) {\n            case MotionEvent.ACTION_DOWN:\n                Log.d(\"RotaryControlView\", \"onTouchDown\");\n                mTouch.set(x, y);\n                mLastValue = mValue;\n\n                if(mValListener != null)\n                    mValListener.onUserChangeBegin(mValue);\n                break;\n            case MotionEvent.ACTION_MOVE:\n\n                double diffangle;\n                if(Math.abs(angle - mAngleLastTouch) > 180)\n                    diffangle = (360 - angle) - mAngleLastTouch;\n                else\n                    diffangle = angle - mAngleLastTouch;\n\n                double range = mEndAngle - mStartAngle;\n                while(range <= 0)\n                    range += 360;\n\n                mLastValue += (int) Math.round(diffangle * (mMaxValue - mMinValue) / range);\n                mLastValue = Math.min(mLastValue, mMaxValue);\n                mLastValue = Math.max(mLastValue, mMinValue);\n\n                Log.d(\"RotaryControlView\", \"onTouchMove, diffangle: \" + diffangle);\n\n                int val = (int) mLastValue;\n                this.mValue = val - (val % mStepValue);\n\n                if(mValListener != null)\n                    mValListener.onUserChange(mValue);\n                invalidate();\n                break;\n            case MotionEvent.ACTION_CANCEL:\n                break;\n            case MotionEvent.ACTION_UP:\n                if(mValListener != null)\n                    mValListener.onUserChangeEnd(mValue);\n                Log.d(\"RotaryControlView\", \"onTouchUp\");\n        }\n\n        mAngleLastTouch = angle;\n        return true;\n    }\n\n    public Drawable getScaleDrawable() {\n        return mScaleDrawable;\n    }\n\n    public void setScaleDrawable(Drawable mScaleDrawable) {\n        this.mScaleDrawable = mScaleDrawable;\n        if(mScaleDrawable != null)\n            mScaleDrawable.setCallback(this);\n        invalidate();\n    }\n\n    public Drawable getBarDrawable() {\n        return mBarDrawable;\n    }\n\n    public void setBarDrawable(Drawable mBarDrawable) {\n        this.mBarDrawable = mBarDrawable;\n        if(mBarDrawable != null)\n            mBarDrawable.setCallback(this);\n        invalidate();\n    }\n\n    public float getStartAngle() {\n        return mStartAngle;\n    }\n\n    public void setStartAngle(float mStartAngle) {\n        while(mStartAngle < 0)\n            mStartAngle += 360;\n        this.mStartAngle = mStartAngle % 360;\n        invalidate();\n    }\n\n    public float getEndAngle() {\n        return mEndAngle;\n    }\n\n    public void setEndAngle(float mEndAngle) {\n        while(mEndAngle < 0)\n            mEndAngle += 360;\n        this.mEndAngle = mEndAngle % 360;\n        invalidate();\n    }\n\n    public int getMinValue() {\n        return mMinValue;\n    }\n\n    public void setMinValue(int mMinValue) throws IllegalArgumentException {\n        if(mMinValue > mMaxValue)\n            throw new IllegalArgumentException(\"min > max\");\n        this.mMinValue = mMinValue;\n        setValue(mValue);\n    }\n\n    public int getMaxValue() {\n        return mMaxValue;\n    }\n\n    public void setMaxValue(int mMaxValue) throws IllegalArgumentException {\n        if(mMinValue > mMaxValue)\n            throw new IllegalArgumentException(\"max < min\");\n        this.mMaxValue = mMaxValue;\n        setValue(mValue);\n    }\n\n    public int getStepValue() {\n        return mStepValue;\n    }\n\n    public void setStepValue(int mStepValue) {\n        this.mStepValue = mStepValue;\n        //Align Value to steps\n        setValue(mValue);\n    }\n\n    public int getValue() {\n        return mValue;\n    }\n\n    public void setValue(int val) {\n        val = Math.max(val, mMinValue);\n        val = Math.min(val, mMaxValue);\n        this.mValue = val - (val % mStepValue);\n        Log.d(\"RotaryControlView\", \"Value set to \" + mValue + \" with steps: \" + mStepValue + \", min: \" + mMinValue + \" and max: \" + mMaxValue);\n        if(mValListener != null)\n            mValListener.onValueChanged(mValue, mMinValue, mMaxValue, mStepValue);\n        invalidate();\n    }\n\n    public void setOnValueChangedListener(OnValueChangedListener l) {\n        mValListener = l;\n    }\n\n    public OnValueChangedListener getOnValueChangedListener() {\n        return mValListener;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/pinboard/Pinboard.java",
    "content": "package de.nproth.pin.pinboard;\n\nimport android.app.AlarmManager;\nimport android.app.Notification;\nimport android.app.NotificationChannel;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.app.job.JobInfo;\nimport android.app.job.JobScheduler;\nimport android.content.ComponentName;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.database.Cursor;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.preference.PreferenceManager;\nimport androidx.annotation.NonNull;\nimport androidx.core.app.NotificationCompat;\nimport androidx.core.app.NotificationManagerCompat;\nimport android.util.Log;\n\nimport de.nproth.pin.receiver.AlarmReceiver;\nimport de.nproth.pin.receiver.DeleteNoteReceiver;\nimport de.nproth.pin.NoteActivity;\nimport de.nproth.pin.NotesProvider;\nimport de.nproth.pin.receiver.NotificationJobService;\nimport de.nproth.pin.R;\nimport de.nproth.pin.receiver.SnoozeNoteReceiver;\nimport de.nproth.pin.util.Timespan;\n\nimport static de.nproth.pin.pinboard.PinboardService.DEFAULT_SNOOZE_DURATION;\nimport static de.nproth.pin.pinboard.PinboardService.PREFERENCE_SNOOZE_DURATION;\nimport static de.nproth.pin.pinboard.PinboardService.PREFERENCE_PERSISTENT_NOTIFICATIONS;\nimport static de.nproth.pin.pinboard.PinboardService.DEFAULT_PERSISTENT_NOTIFICATIONS;\n\n/**\n * Updates notifications when pins are added / snoozed / deleted\n */\npublic final class Pinboard {\n\n    /**\n     * Only used prior to version 1.1\n    */\n    @Deprecated\n    private static final String CHANNEL_ID = \"de.nproth.pin.notes\";\n\n    private static final String PIN_CHANNEL_ID = \"de.nproth.pin.pin\";\n    private static final String WAKE_CHANNEL_ID = \"de.nproth.pin.wake_up\";\n\n    private static final int SUMMARY_ID = 0;\n\n    private static final String NOTES_GROUP = \"de.nproth.pin.NOTES_GROUP\";\n\n    private static final int JOB_ID = 23156731;//really just a random number\n\n\n    private final Context mContext;\n    private final SharedPreferences mPrefs;\n    private final NotificationManagerCompat mNotify;\n    private final NotificationManager mNManager;\n    private final AlarmManager mAlarm;\n    private final JobScheduler mScheduler;\n\n\n    private long mSnoozeDuration = 30 * 60 * 1000;//30min in millis\n    private boolean mFixed = false;\n\n\n    private long mLastChecked = 0;\n\n    private Pinboard(@NonNull Context ctx) {\n        mContext = ctx;\n\n        mPrefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n        mNManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);\n        mNotify = NotificationManagerCompat.from(mContext);\n\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            mScheduler = (JobScheduler) mContext.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n            mAlarm = null;\n        }\n        else {\n            mAlarm = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);\n            mScheduler = null;\n        }\n\n        //Create notification Channels, only needed when running on android 8.0+\n\n        //We need two different priorities: we want newly created pins to be pushed silently (anything else is unbearably annoying) but we DO want the user to be notified when a snoozed notification wakes up\n        //On pre android 8.0 this is possible by using different priorities but on >=Oreo only one importance per channel is supported => use 2 channels\n        //Also I really hope that notifications from two different channels can be grouped and summarized.\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n            //Delete old channel used in version <= 1.0.1\n            mNManager.deleteNotificationChannel(CHANNEL_ID);\n            //create two new channels\n            NotificationChannel cpin = new NotificationChannel(PIN_CHANNEL_ID, mContext.getString(R.string.channel_name_pin), NotificationManager.IMPORTANCE_LOW);\n            cpin.setShowBadge(false);\n            cpin.setDescription(mContext.getString(R.string.channel_description_pin));\n            mNManager.createNotificationChannel(cpin);\n\n            NotificationChannel cwake = new NotificationChannel(WAKE_CHANNEL_ID, mContext.getString(R.string.channel_name_wake), NotificationManager.IMPORTANCE_DEFAULT);\n            cwake.setShowBadge(false);\n            cwake.setDescription(mContext.getString(R.string.channel_description_wake));\n            mNManager.createNotificationChannel(cwake);\n        }\n    }\n\n    private void update(long timeNow, boolean silent, String where, String... wargs) {\n\n        mSnoozeDuration = getSnoozeDuration();\n        mFixed = getIsFixed();\n\n        long currentCheck = timeNow;\n        long alarmTime = 0;//0 means that no alarm should be set\n\n        Intent idelete = null, isnooze = null, iedit = null, iactivity = new Intent(mContext, NoteActivity.class);\n        Cursor db = null;\n\n        try {\n\n            //query all rows that were modified or created since we last checked the db, sorted by time of creation\n            db = mContext.getContentResolver().query(NotesProvider.Notes.NOTES_URI, new String[]{NotesProvider.Notes._ID, NotesProvider.Notes.TEXT, NotesProvider.Notes.CREATED, NotesProvider.Notes.MODIFIED, NotesProvider.Notes.WAKE_UP},\n                    where, wargs, NotesProvider.Notes.CREATED + \" DESC\");\n\n            Log.d(\"NotificationService\", String.format(\"%d notes changed, updating notifications...\", db.getCount()));\n\n            db.moveToFirst();\n\n            while (!db.isAfterLast()) {\n\n                if (db.isNull(1)) { //check if notification is marked as deleted (text is NULL) and remove the corresponding notification\n                    mNotify.cancel(db.getInt(0));//notifications are indexed by their note's _id values\n                } else {\n\n                    //check if note is snoozed\n                    long wake_up = db.getLong(4);\n                    //TODO if a wake_up event is scheduled here, set wake_up time to 0.\n                    if (wake_up > currentCheck) {//keep snoozing\n                        mNotify.cancel(db.getInt(0));//notifications are indexed by their note's _id values\n                        if(alarmTime == 0 || alarmTime > wake_up)\n                            alarmTime = wake_up;//schedule alarm to wake this service the next time a note 'wakes up'\n\n                    } else {//else update and show notification\n\n                        boolean wokeUp = wake_up > mLastChecked;\n\n                        //Prepare Pending Intents to snooze or delete notification or edit the note\n                        idelete = new Intent(mContext, DeleteNoteReceiver.class);\n                        idelete.setData(Uri.withAppendedPath(NotesProvider.Notes.NOTES_URI, Long.toString(db.getLong(0))));\n\n                        isnooze = new Intent(mContext, SnoozeNoteReceiver.class);\n                        isnooze.setData(Uri.withAppendedPath(NotesProvider.Notes.NOTES_URI, Long.toString(db.getLong(0))));\n\n                        iedit = new Intent(mContext, NoteActivity.class);\n                        iedit.setData(Uri.withAppendedPath(NotesProvider.Notes.NOTES_URI, Long.toString(db.getLong(0))));\n\n                        if(wokeUp)\n                            Log.d(\"Pinboard\", \"Pushing notification on wake_up channel...\");\n\n                        //create a notification here (previously created notifications that are still visible are just updated)\n                        //Newly created notifications are pushed silently. Pins that woke up are published on the second channel and make a noise.\n                        NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, (wokeUp && !silent)? WAKE_CHANNEL_ID : PIN_CHANNEL_ID)\n                                .setSmallIcon(R.drawable.ic_pin_statusbar)\n                                .setContentTitle(db.getString(1))//use note's text as notification's headline\n                                .setWhen(db.getLong(2))//XXX hope this method accepts UTC timestamps; it seemingly does; show time of creation here utilising the db's 'created' column\n                                .setPriority((wokeUp && !silent)? NotificationCompat.PRIORITY_HIGH : NotificationCompat.PRIORITY_DEFAULT)\n                                .setOnlyAlertOnce(true)\n                                .setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)\n                                //Add actions to delete or snooze note, don't use icons here\n                                .addAction(0, mContext.getString(R.string.action_delete), PendingIntent.getBroadcast(mContext, 0, idelete, 0))\n                                .addAction(0, mContext.getString(R.string.action_snooze, new Timespan(mContext, mSnoozeDuration).toString()), PendingIntent.getBroadcast(mContext, 0, isnooze, 0))\n                                .addAction(0, mContext.getString(R.string.action_edit), PendingIntent.getActivity(mContext, 0, iedit, 0))\n                                .setContentIntent(PendingIntent.getActivity(mContext, 0, iactivity, 0))//show NoteActivity when user clicks on note.\n                                .setCategory(NotificationCompat.CATEGORY_REMINDER);\n                        //Make notes persistent\n                        if(mFixed)\n                            builder.setOngoing(true);\n\n                        isnooze.setAction(SnoozeNoteReceiver.ACTION_NOTIFICATION_DISMISSED);\n                        builder.setDeleteIntent(PendingIntent.getBroadcast(mContext, 0, isnooze, 0));//snooze notification when the user dismisses it\n\n                        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)\n                            builder.setGroup(NOTES_GROUP);\n\n                        Notification note = builder.build();\n\n                        //And fire new / updated notification\n                        mNotify.notify(db.getInt(0), note);//use cursor's _id column as id for our notification\n                    }\n                }\n\n                db.moveToNext();\n            }\n        } catch (Exception e) {\n            Log.e(\"NotificationService\", \"Unable to create Notifications\", e);\n        } finally {\n            if (db != null)\n                db.close();\n        }\n\n        //schedule an alarm\n        if (alarmTime > 0) {\n            long latency = alarmTime - System.currentTimeMillis();\n            if(latency <= 0)\n                latency = 1;//make sure latency is positive\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {//use jobScheduler if possible\n\n                JobInfo job = new JobInfo.Builder(JOB_ID, new ComponentName(mContext, NotificationJobService.class))\n                        .setMinimumLatency(latency).build();\n                mScheduler.schedule(job);\n                Log.d(\"NotificationService\", String.format(\"Set up job running in ~ %dmin or ~ %ds\", latency / 1000 / 60, latency / 1000));\n\n            } else {//Or fallback to Alarm Manager\n                long now = System.currentTimeMillis();\n                if(alarmTime <= now + 500)//Make sure alarm is scheduled\n                    alarmTime = now + 500;\n                mAlarm.set(AlarmManager.RTC_WAKEUP, alarmTime, PendingIntent.getBroadcast(mContext, 0, new Intent(mContext, AlarmReceiver.class), 0));\n\n                long mins = (alarmTime - currentCheck) / 1000 / 60;\n                long secs = (alarmTime - currentCheck) / 1000;\n                Log.d(\"NotificationService\", String.format(\"Set up alarm triggering on %d UTC in ~ %dmin or ~ %ds\", alarmTime, mins, secs));\n            }\n        }\n\n        mLastChecked = currentCheck;\n\n\n        //on pre N devices our notification actions are no longer accessible when they are summarized. Just keep distinct notifications on older devices.\n        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            //Now build a summary notification for the group\n            //query all visible texts from other notifications\n            db = null;\n            try {\n                db = mContext.getContentResolver().query(NotesProvider.Notes.NOTES_URI, new String[]{NotesProvider.Notes.TEXT, NotesProvider.Notes.CREATED, NotesProvider.Notes.WAKE_UP},\n                        \"text IS NOT NULL AND wake_up <= ?\", new String[]{Long.toString(currentCheck)}, NotesProvider.Notes.CREATED + \" DESC\");\n\n                int count = db.getCount();\n\n                if (count > 0) {\n                    //Create group summary\n                    NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle();\n                    style.setBigContentTitle(mContext.getResources().getQuantityString(R.plurals.notification_summary_title, count, count));\n\n\n                    long when = currentCheck;\n                    String str;\n\n                    db.moveToFirst();\n                    while (!db.isAfterLast()) {//XXX Inbox style only supports up to 5 lines it says in the documentation, but I think more lines do also work\n                        str = db.getString(0);\n                        style.addLine(str);\n                        when = Math.min(when, db.getLong(1));//find oldest reminder\n                        db.moveToNext();\n                    }\n\n                    NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, PIN_CHANNEL_ID)\n                            .setSmallIcon(R.drawable.ic_pin_statusbar)\n                            .setStyle(style)\n                            .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n                            .setWhen(when)\n                            .setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)\n                            .setContentIntent(PendingIntent.getActivity(mContext, 0, new Intent(mContext, NoteActivity.class), 0))//show NoteActivity when user clicks on note.\n                            .setGroup(NOTES_GROUP)\n                            .setGroupSummary(true)\n                            .setCategory(NotificationCompat.CATEGORY_REMINDER);\n\n                    if(mFixed)\n                        builder.setOngoing(true);\n\n                    mNotify.notify(SUMMARY_ID, builder.build());\n                } else\n                    mNotify.cancel(SUMMARY_ID);\n\n            } catch (Exception e) {\n\n            } finally {\n                if (db != null)\n                    db.close();\n            }\n        }\n    }\n\n    public void updateAll() {\n        updateAll(false);\n    }\n\n    public void updateAll(boolean silent) {\n        //query all rows\n        update(System.currentTimeMillis(), silent, null);\n    }\n\n    public void updateVisible(boolean silent) {\n        long now = System.currentTimeMillis();\n        String sNow = Long.toString(now);\n        //query all rows that are neither snoozed nor deleted and thus visible\n        update(now, silent, \"text IS NOT NULL AND wake_up <= ?\", sNow);\n    }\n\n    public void updateVisible() {\n        updateVisible(false);\n    }\n\n    public void updateChanged() {\n        long now = System.currentTimeMillis();\n        String sLastCheck = Long.toString(mLastChecked);\n        //query all rows that were modified or created since we last checked the db, sorted by time of creation\n        update(now, false, \"modified >= ? OR wake_up >= ?\", sLastCheck, sLastCheck);\n        //mLastChecked = now;\n    }\n\n    public long getSnoozeDuration() {\n        return mPrefs.getLong(PREFERENCE_SNOOZE_DURATION, DEFAULT_SNOOZE_DURATION);\n    }\n\n    public Pinboard setSnoozeDuration(long dur) {\n        mPrefs.edit().putLong(PREFERENCE_SNOOZE_DURATION, dur).commit();\n        mSnoozeDuration = dur;\n        updateVisible(true);\n        return this;\n    }\n\n    public boolean getIsFixed() {\n        return mPrefs.getBoolean(PREFERENCE_PERSISTENT_NOTIFICATIONS, DEFAULT_PERSISTENT_NOTIFICATIONS);\n    }\n\n    public void setIsFixed(boolean fix) {\n        mPrefs.edit().putBoolean(PREFERENCE_PERSISTENT_NOTIFICATIONS, fix).commit();\n        mFixed = fix;\n        updateVisible();\n    }\n\n    /**\n     * Saves the snooze duration in shared preferences\n     */\n    public void destroy() {\n        //PreferenceManager.getDefaultSharedPreferences(mContext).edit().putLong(PREFERENCE_SNOOZE_DURATION, getSnoozeDuration()).commit();\n        //Nothing here\n    }\n\n    public static Pinboard get(Context ctx) {\n        Pinboard me;\n        if(ctx == null)\n            throw new NullPointerException(\"Cannot acquire instance of singleton 'Pinboard': Context is NULL \");\n\n\n        SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n        me = new Pinboard(ctx.getApplicationContext());\n        //me.setSnoozeDuration(mPrefs.getLong(PREFERENCE_SNOOZE_DURATION, DEFAULT_SNOOZE_DURATION));\n        //me.setIsFixed(mPrefs.getBoolean(PREFERENCE_PERSISTENT_NOTIFICATIONS, DEFAULT_PERSISTENT_NOTIFICATIONS));\n        return me;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/pinboard/PinboardService.java",
    "content": "package de.nproth.pin.pinboard;\n\nimport android.app.Service;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.os.Binder;\nimport android.os.IBinder;\nimport android.preference.PreferenceManager;\n\nimport de.nproth.pin.BuildConfig;\nimport de.nproth.pin.receiver.SnoozeNoteReceiver;\n\n\n/**\n * Bound by {@link de.nproth.pin.NoteActivity}, used to update notifications via {@link Pinboard}\n */\npublic class PinboardService extends Service {\n\n    public static final String INTENT_ACTION_SNOOZE_PIN = BuildConfig.APPLICATION_ID + \".intent.action.snooze\";\n    public static final String INTENT_ACTION_WAKE_UP = BuildConfig.APPLICATION_ID + \".intent.action.wake_up\";\n\n    public static final String PREFERENCE_PERSISTENT_NOTIFICATIONS = \"pref_persistent_notifications\";\n    public static final String PREFERENCE_SNOOZE_DURATION = \"snooze_duration\";\n\n    public static final long DEFAULT_SNOOZE_DURATION = 30 * 60 * 1000; //30min in millis\n    public static final boolean DEFAULT_PERSISTENT_NOTIFICATIONS = false;\n\n    private Pinboard mPinboard;\n    private SharedPreferences mPrefs;\n\n    public class PinboardBinder extends Binder {\n\n        public void update() {\n            mPinboard.updateAll(true);\n        }\n\n        public long getSnoozeDuration() {\n            return mPinboard.getSnoozeDuration();\n        }\n\n        public void setSnoozeDuration(long dur) {\n            mPinboard.setSnoozeDuration(dur);\n            //mPrefs.edit().putLong(PREFERENCE_SNOOZE_DURATION, dur).apply();\n        }\n\n        public boolean getIsFixed() {\n            return mPinboard.getIsFixed();\n        }\n\n        public void setIsFixed(boolean fix) {\n            mPinboard.setIsFixed(fix);\n        }\n    }\n\n    public PinboardService() {\n    }\n\n    @Override\n    public int onStartCommand(Intent intent, int flags, int startId) {\n        super.onStartCommand(intent, flags, startId);\n        init();\n\n        if(intent != null && INTENT_ACTION_SNOOZE_PIN.equals(intent.getAction())) {\n            int rows = SnoozeNoteReceiver.onSnoozePins(this, mPinboard.getSnoozeDuration(), intent.getData());\n        }\n\n        //mPinboard.updateAll(! INTENT_ACTION_WAKE_UP.equals(intent.getAction()));\n        mPinboard.updateAll(true);\n        return START_STICKY;\n    }\n\n    private void init() {\n        if(mPinboard == null) {\n            mPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\n            mPinboard = Pinboard.get(this);\n\n            //mPinboard.setSnoozeDuration(mPrefs.getLong(PREFERENCE_SNOOZE_DURATION, DEFAULT_SNOOZE_DURATION));\n            //mPinboard.setIsFixed(mPrefs.getBoolean(PREFERENCE_PERSISTENT_NOTIFICATIONS, DEFAULT_PERSISTENT_NOTIFICATIONS));\n\n            mPinboard.updateAll(true);\n        }\n    }\n\n    @Override\n    public void onDestroy() {\n        super.onDestroy();\n\n        //Committing the changed preference values is deliberately done synchronously (blocking), so that the Service is not destroyed before the transaction is completed.\n        //mPrefs.edit().putLong(PREFERENCE_SNOOZE_DURATION, mPinboard.getSnoozeDuration())\n          //      .putBoolean(PREFERENCE_PERSISTENT_NOTIFICATIONS, mPinboard.getIsFixed()).commit();\n    }\n\n    @Override\n    public IBinder onBind(Intent intent) {\n        init();\n        return new PinboardBinder();\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/receiver/AlarmReceiver.java",
    "content": "package de.nproth.pin.receiver;\n\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.preference.PreferenceManager;\nimport android.util.Log;\n\nimport de.nproth.pin.pinboard.Pinboard;\nimport de.nproth.pin.pinboard.PinboardService;\n\n/**\n *  Only used on older devices where JobScheduler is not available\n */\npublic class AlarmReceiver extends BroadcastReceiver {\n\n    @Override\n    public void onReceive(Context context, Intent intent) {\n        Log.d(\"AlarmReceiver\", \"Alarm triggered, starting NotificationService...\");\n        //update notifications\n        Intent i = new Intent(context, PinboardService.class);\n        i.setAction(PinboardService.INTENT_ACTION_WAKE_UP);\n        //context.startService(i);\n        Pinboard.get(context).updateVisible(false);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/receiver/BootReceiver.java",
    "content": "package de.nproth.pin.receiver;\n\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.preference.PreferenceManager;\nimport android.util.Log;\n\nimport de.nproth.pin.NoteActivity;\nimport de.nproth.pin.NotesProvider;\nimport de.nproth.pin.pinboard.Pinboard;\nimport de.nproth.pin.pinboard.PinboardService;\nimport de.nproth.pin.util.LifecycleWatcher;\n\n/**\n * Should receive boot completed intent (does not work on all devices out of the box on some you have to disable battery optimizations for this app, e.g. on Oneplus 6)\n * The user is prompted for this in NoteActivity\n * Cleans the database and displays all notifications\n */\npublic class BootReceiver extends BroadcastReceiver {\n\n    @Override\n    public void onReceive(Context context, Intent intent) {\n\n        if(Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {\n            Log.d(\"BootReceiver\", \"received BOOT_COMPLETED\");\n\n            //Log that boot completed was received\n            LifecycleWatcher.informBootReceived();\n\n            //First clean up database\n            context.getContentResolver().delete(NotesProvider.Notes.NOTES_URI, \"text IS NULL\", null);\n\n            //Show pins\n            //On newer Android versions apps are no longer allowed to start services when they are in background\n            //context.startService(new Intent(context, PinboardService.class));\n\n            //As a fix invoke Pinboard directly. Nevertheless this is bad style because it circumvents the encapsulation of Pinboard through its service\n            Pinboard.get(context).updateAll(true);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/receiver/DeleteNoteReceiver.java",
    "content": "package de.nproth.pin.receiver;\n\nimport android.content.BroadcastReceiver;\nimport android.content.ContentValues;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.UriMatcher;\nimport android.net.Uri;\nimport android.preference.PreferenceManager;\nimport android.text.TextUtils;\nimport android.util.Log;\n\nimport de.nproth.pin.NotesProvider;\nimport de.nproth.pin.pinboard.Pinboard;\nimport de.nproth.pin.pinboard.PinboardService;\n\n/**\n * Called from notification action button.\n * Marks pin as deleted and makes it disappear.\n */\npublic class DeleteNoteReceiver extends BroadcastReceiver {\n\n    private final int NOTES_ITEM = 1;\n    private final int NOTES_LIST = 2;\n\n    private UriMatcher mUris = new UriMatcher(UriMatcher.NO_MATCH);\n    {\n        mUris.addURI(NotesProvider.AUTHORITIES, \"notes/#\", NOTES_ITEM);\n        mUris.addURI(NotesProvider.AUTHORITIES, \"notes\", NOTES_LIST);\n    }\n\n    @Override\n    public void onReceive(Context context, Intent intent) {\n\n        Uri data = intent.getData();\n\n        if(data == null) {\n            Log.e(\"DeleteNoteReceiver\", \"Could not delete note: uri is null\");\n            return;\n        }\n\n        /*\n         * For some reason I forgot the pins must not be deleted from the database right away.\n         * I think it had something to do with the _id value in the database which is needed to reference visible notifications.\n         * So we still need it in order to hide the deleted pins.\n         *\n         * The deleted pins are cleaned up on every boot (if the system allows us to catch the boot completed intent. For more information see BootReceiver)\n         */\n\n        ContentValues cv = new ContentValues();\n\n        cv.putNull(NotesProvider.Notes.TEXT);//setting text to NULL marks note as deleted, it will be removed at next boot\n        cv.put(NotesProvider.Notes.MODIFIED, System.currentTimeMillis());\n\n        switch(mUris.match(data)) {\n            case NOTES_ITEM:\n                //Check if last path segment is really just a valid id (probably redundant)\n                String idstring = data.getLastPathSegment();\n\n                if(TextUtils.isEmpty(idstring) || !TextUtils.isDigitsOnly(idstring)) {\n                    Log.e(\"DeleteNoteReceiver\", String.format(\"Could not delete note item: invalid id '%s' in uri '%s'\", idstring, data.toString()));\n                    return;\n                }\n                //continue to next\n            case NOTES_LIST:\n                int rows = context.getContentResolver().update(data, cv, \"text IS NOT NULL\", null);//delete either on note item or all notes which are not marked as deleted already (text is not null)\n                Log.d(\"DeleteNoteProvider\", String.format(\"Deleted %d rows\", rows));\n\n                //update notifications\n                //context.startService(new Intent(context, PinboardService.class));\n                Pinboard.get(context).updateAll(true);\n\n                return;\n            default:\n                Log.e(\"DeleteNoteReceiver\", String.format(\"Could not snooze note: invalid uri '%s'\", data.toString()));\n                return;\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/receiver/NotificationJobService.java",
    "content": "package de.nproth.pin.receiver;\n\nimport android.annotation.TargetApi;\nimport android.app.job.JobParameters;\nimport android.app.job.JobService;\nimport android.content.Intent;\nimport android.preference.PreferenceManager;\n\nimport de.nproth.pin.pinboard.Pinboard;\nimport de.nproth.pin.pinboard.PinboardService;\nimport de.nproth.pin.receiver.AlarmReceiver;\n\n/**\n * Updates notifications in background using the JobScheduler framework.\n * Replaces {@link AlarmReceiver} on devices running android 5.0+\n */\n@TargetApi(21)\npublic class NotificationJobService extends JobService {\n\n    @Override\n    public boolean onStartJob(final JobParameters params) {\n        //update notifications\n        Intent i = new Intent(this, PinboardService.class);\n        i.setAction(PinboardService.INTENT_ACTION_WAKE_UP);\n        //startService(i);\n        Pinboard.get(this).updateAll(false);\n        return false;//work is done at this point\n    }\n\n    @Override\n    public boolean onStopJob(JobParameters params) {\n        return false;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/receiver/SnoozeNoteReceiver.java",
    "content": "package de.nproth.pin.receiver;\n\nimport android.content.BroadcastReceiver;\nimport android.content.ContentValues;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.content.UriMatcher;\nimport android.net.Uri;\nimport android.preference.PreferenceManager;\nimport android.text.TextUtils;\nimport android.util.Log;\nimport android.widget.Toast;\n\nimport de.nproth.pin.NotesProvider;\nimport de.nproth.pin.R;\nimport de.nproth.pin.pinboard.Pinboard;\nimport de.nproth.pin.pinboard.PinboardService;\nimport de.nproth.pin.util.Timespan;\n\nimport static de.nproth.pin.pinboard.PinboardService.PREFERENCE_SNOOZE_DURATION;\n\npublic class SnoozeNoteReceiver extends BroadcastReceiver {\n\n    public static final String ACTION_NOTIFICATION_DISMISSED = \"de.nproth.pin.ACTION_NOTIFICATION_DISMISSED\";\n\n    private static final int NOTES_ITEM = 1;\n    private static final int NOTES_LIST = 2;\n\n    private static final UriMatcher mUris = new UriMatcher(UriMatcher.NO_MATCH);\n    static {\n        mUris.addURI(NotesProvider.AUTHORITIES, \"notes/#\", NOTES_ITEM);\n        mUris.addURI(NotesProvider.AUTHORITIES, \"notes\", NOTES_LIST);\n    }\n\n    @Override\n    public void onReceive(Context context, Intent intent) {\n\n        Uri data = intent.getData();\n\n        if(data == null) {\n            Log.e(\"SnoozeNoteReceiver\", \"Could not snooze note: uri is null\");\n            return;\n        }\n\n        Intent i = new Intent(context, PinboardService.class);\n        i.setData(data);\n        i.setAction(PinboardService.INTENT_ACTION_SNOOZE_PIN);\n\n        //context.startService(i);\n\n        Pinboard pin = Pinboard.get(context);\n\n        onSnoozePins(context, pin.getSnoozeDuration(), data);\n        pin.updateAll(true);\n    }\n\n    /**\n     * Called from {@link PinboardService} when this receiver's onReceive method was called and passed an appropriate intent.\n     * This cannot be called directly as the snoozeDuration setting is needed which is held by the service and can only be obtained through binding.\n     * Binding a service is not possible in a BroadcastReceiver so just start the service and let it take care of the work (and call this method)\n     * @return number of updated pins\n     */\n    public static int onSnoozePins(Context context, long snoozeDuration, Uri data) {\n        ContentValues cv = new ContentValues();\n        long snoozed = System.currentTimeMillis();\n\n        //cv.put(NotesProvider.Notes.SNOOZED, snoozed);\n        cv.put(NotesProvider.Notes.MODIFIED, snoozed);\n\n        cv.put(NotesProvider.Notes.WAKE_UP, snoozed + snoozeDuration);\n\n        switch(mUris.match(data)) {\n            case NOTES_ITEM:\n                //Check if last path segment is really just a valid id (probably redundant)\n                String idstring = data.getLastPathSegment();\n\n                if(TextUtils.isEmpty(idstring) || !TextUtils.isDigitsOnly(idstring)) {\n                    Log.e(\"SnoozeNoteReceiver\", String.format(\"Could not snooze note item: invalid id '%s' in uri '%s'\", idstring, data.toString()));\n                    return 0;\n                }\n                //continue to next\n            case NOTES_LIST:\n                int rows = context.getContentResolver().update(data, cv, \"text IS NOT NULL\", null);//snooze either on note item or all notes which are not marked as deleted (text is not null)\n                Log.d(\"SnoozeNoteReceiver\", String.format(\"Snoozed %d rows\", rows));\n\n                //show a toast if the user had dismissed this pin to indicate that this note will pop up again after some delay\n                Toast.makeText(context, context.getResources().getString(R.string.toast_pin_dismissed, new Timespan(context, snoozeDuration).toString()), Toast.LENGTH_SHORT).show();\n\n                return rows;\n            default:\n                Log.e(\"SnoozeNoteReceiver\", String.format(\"Could not snooze note: invalid uri '%s'\", data.toString()));\n                return 0;\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/util/LifecycleWatcher.java",
    "content": "package de.nproth.pin.util;\n\n/**\n * Provides a static interface to check whether the boot completed broadcast was received. This allows the app to inform the user that he must disable some energy saving options\n * for this app in order to work properly if appropriate\n */\npublic final class LifecycleWatcher {\n    private static boolean onBoot = false;\n\n    private static boolean userWarned = false;\n\n    public static void informBootReceived() {\n        onBoot = true;\n    }\n\n    public static void informUserWarned() {\n        userWarned = true;\n    }\n\n    public static boolean hasBootReceived() {\n        return onBoot;\n    }\n\n    public static boolean isUserWarned() {\n        return userWarned;\n    }\n\n    /**\n     * For debugging only\n     */\n    public static void reset() {\n        onBoot = false;\n        userWarned = true;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/de/nproth/pin/util/Timespan.java",
    "content": "package de.nproth.pin.util;\n\nimport android.content.Context;\n\nimport de.nproth.pin.R;\n\n/**\n * Utility class that converts a timestamp from milliseconds into something human readable\n */\npublic final class Timespan {\n\n    public final long millis;\n    public final Context mContext;\n\n    public Timespan(Context c, long millis) {\n        mContext = c;\n        this.millis = millis;\n    }\n\n    public double inSecs() {\n        return millis / 1000.;\n    }\n\n    public double inMins() {\n        return millis / 60000.;\n    }\n\n    public double inHours() {\n        return millis / 3600000.;\n    }\n\n    public double inDays() {\n        return millis / 86400000.;\n    }\n\n    public int restDays() {\n        return (int) inDays();\n    }\n\n    public int restHours() {\n        long millis = this.millis % 86400000;\n        return (int) (millis / 3600000);\n    }\n\n    public int restMins() {\n        long millis = this.millis % 3600000;\n        return (int) (millis / 60000);\n    }\n\n    public int restSecs() {\n        long millis = this.millis % 60000;\n        return (int) (millis / 1000);\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder str = new StringBuilder();\n        if(restDays() > 0)\n            str.append(restDays() + mContext.getString(R.string.symbol_time_days) + \" \");\n        if(restHours() > 0)\n            str.append(restHours() + mContext.getString(R.string.symbol_time_hours) + \" \");\n        if(restMins() > 0)\n            str.append(restMins() + mContext.getString(R.string.symbol_time_minutes) + \" \");\n        if(restSecs() > 0 || str.length() == 0)\n            str.append(restSecs() + mContext.getString(R.string.symbol_time_seconds) + \" \");\n        str.deleteCharAt(str.length() - 1);\n        return str.toString();\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/anim/activity_enter.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <scale android:fromXScale=\"200%\" android:fromYScale=\"400%\" android:toXScale=\"100%\" android:toYScale=\"100%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:pivotX=\"50%\" android:pivotY=\"50%\" android:startOffset=\"0\" android:duration=\"@android:integer/config_shortAnimTime\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n    <alpha android:fromAlpha=\"0.0\" android:toAlpha=\"1.0\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:duration=\"@android:integer/config_shortAnimTime\" android:startOffset=\"0\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/activity_exit.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <scale android:fromXScale=\"100%\" android:fromYScale=\"100%\" android:toXScale=\"200%\" android:toYScale=\"400%\" android:interpolator=\"@android:anim/accelerate_interpolator\" android:pivotX=\"50%\" android:pivotY=\"50%\" android:startOffset=\"0\" android:duration=\"@android:integer/config_shortAnimTime\" android:fillAfter=\"false\" android:fillEnabled=\"true\" android:fillBefore=\"false\"/>\n    <alpha android:fromAlpha=\"1.0\" android:toAlpha=\"0.0\" android:interpolator=\"@android:anim/accelerate_interpolator\" android:duration=\"@android:integer/config_shortAnimTime\" android:startOffset=\"0\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_enter_input_field.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromYDelta=\"150%\" android:toYDelta=\"0%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"500\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_enter_note_save_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromXDelta=\"150%\" android:toXDelta=\"0%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"500\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_enter_snooze_duration_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromXDelta=\"-150%\" android:toXDelta=\"0%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"500\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_exit_input_field.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromYDelta=\"0%\" android:toYDelta=\"150%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"500\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_exit_note_save_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromXDelta=\"0%\" android:toXDelta=\"150%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"500\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_exit_snooze_duration_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromXDelta=\"0%\" android:toXDelta=\"-150%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"500\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_input_field_empty.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate android:fromYDelta=\"0%\" android:toYDelta=\"-3%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"0\" android:duration=\"35\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n    <translate android:fromYDelta=\"-3%\" android:toYDelta=\"3%\" android:interpolator=\"@android:anim/accelerate_decelerate_interpolator\" android:startOffset=\"35\" android:duration=\"70\" android:fillAfter=\"false\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n    <translate android:fromYDelta=\"3%\" android:toYDelta=\"0%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"105\" android:duration=\"35\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n\n    <translate android:fromYDelta=\"0%\" android:toYDelta=\"-3%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"140\" android:duration=\"35\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n    <translate android:fromYDelta=\"-3%\" android:toYDelta=\"3%\" android:interpolator=\"@android:anim/accelerate_decelerate_interpolator\" android:startOffset=\"175\" android:duration=\"70\" android:fillAfter=\"false\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n    <translate android:fromYDelta=\"3%\" android:toYDelta=\"0%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"245\" android:duration=\"35\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_input_field_pin.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shareInterpolator=\"false\">\n    <translate android:fromYDelta=\"0%\" android:toYDelta=\"-200%\" android:interpolator=\"@android:anim/accelerate_interpolator\" android:startOffset=\"0\" android:duration=\"175\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n    <alpha android:fromAlpha=\"1.0\" android:toAlpha=\"0.0\" android:interpolator=\"@android:anim/accelerate_interpolator\" android:startOffset=\"0\" android:duration=\"175\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n\n    <translate android:fromYDelta=\"100%\" android:toYDelta=\"0%\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:startOffset=\"175\" android:duration=\"500\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n    <alpha android:fromAlpha=\"0.0\" android:toAlpha=\"1.0\" android:interpolator=\"@android:anim/decelerate_interpolator\" android:duration=\"500\" android:startOffset=\"175\" android:fillBefore=\"false\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_pop_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"  android:interpolator=\"@android:interpolator/bounce\"\n    android:duration=\"@android:integer/config_mediumAnimTime\">\n    <scale android:fromXScale=\"10%\" android:fromYScale=\"10%\" android:toXScale=\"100%\" android:toYScale=\"100%\" android:pivotX=\"50%\" android:pivotY=\"50%\"  android:fillAfter=\"true\" android:fillEnabled=\"true\"/>\n    <alpha android:fromAlpha=\"0\" android:toAlpha=\"1.0\" android:fillAfter=\"true\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_pop_out.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"  android:interpolator=\"@android:interpolator/bounce\"\n    android:duration=\"@android:integer/config_mediumAnimTime\" android:fillAfter=\"true\" android:fillEnabled=\"true\">\n    <scale android:fromXScale=\"100%\" android:fromYScale=\"100%\" android:toXScale=\"10%\" android:toYScale=\"10%\" android:pivotX=\"50%\" android:pivotY=\"50%\" android:fillAfter=\"true\" android:fillEnabled=\"true\"/>\n    <alpha android:fromAlpha=\"1.0\" android:toAlpha=\"0\" android:fillAfter=\"true\" android:fillEnabled=\"true\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_rotary_control.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" android:duration=\"@android:integer/config_longAnimTime\">\n    <scale android:fromXScale=\"50%\" android:fromYScale=\"50%\" android:toXScale=\"100%\" android:toYScale=\"100%\" android:pivotX=\"50%\" android:pivotY=\"50%\" android:interpolator=\"@android:anim/overshoot_interpolator\"/>\n</set>"
  },
  {
    "path": "app/src/main/res/anim/anim_rotary_set.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <scale android:fromXScale=\"100%\" android:fromYScale=\"100%\" android:toXScale=\"125%\" android:toYScale=\"125%\" android:pivotX=\"50%\" android:pivotY=\"50%\" android:interpolator=\"@android:anim/accelerate_interpolator\" android:duration=\"125\" android:fillBefore=\"false\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n    <alpha android:fromAlpha=\"1\" android:toAlpha=\"0\"  android:interpolator=\"@android:anim/decelerate_interpolator\" android:duration=\"125\"  android:fillBefore=\"false\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n\n    <scale android:fromXScale=\"50%\" android:fromYScale=\"50%\" android:toXScale=\"100%\" android:toYScale=\"100%\" android:pivotX=\"50%\" android:pivotY=\"50%\" android:interpolator=\"@android:anim/overshoot_interpolator\" android:duration=\"250\" android:startOffset=\"125\"  android:fillBefore=\"false\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>\n    <!--<alpha android:fromAlpha=\"0.25\" android:toAlpha=\"1\"  android:interpolator=\"@android:anim/accelerate_interpolator\" android:duration=\"125\" android:startOffset=\"125\"  android:fillBefore=\"false\" android:fillAfter=\"false\" android:fillEnabled=\"true\"/>-->\n</set>"
  },
  {
    "path": "app/src/main/res/animator/state_anim_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\">\n        <set>\n            <objectAnimator android:propertyName=\"scaleX\"\n                android:duration=\"50\"\n                android:valueTo=\"0.95\"\n                android:valueType=\"floatType\"/>\n            <objectAnimator android:propertyName=\"scaleY\"\n                android:duration=\"50\"\n                android:valueTo=\"0.95\"\n                android:valueType=\"floatType\"/>\n        </set>\n    </item>\n    <!-- the default, non-pressed state; set x and y size to 100% -->\n    <item android:state_pressed=\"false\">\n    <set>\n        <objectAnimator android:propertyName=\"scaleX\"\n            android:duration=\"50\"\n            android:valueTo=\"1\"\n            android:valueType=\"floatType\"/>\n        <objectAnimator android:propertyName=\"scaleY\"\n            android:duration=\"50\"\n            android:valueTo=\"1\"\n            android:valueType=\"floatType\"/>\n    </set>\n    </item>\n</selector>"
  },
  {
    "path": "app/src/main/res/drawable/background_button_actionbutton.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/background_button_actionbutton_pressed\"/>\n    <item android:state_selected=\"true\" android:drawable=\"@drawable/background_button_actionbutton_selected\"/>\n    <item android:state_focused=\"true\" android:drawable=\"@drawable/background_button_actionbutton_selected\"/>\n    <item android:drawable=\"@drawable/background_button_actionbutton_default\"/>\n</selector>"
  },
  {
    "path": "app/src/main/res/drawable/background_button_actionbutton_default.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shape=\"oval\" >\n    <solid android:color=\"@color/colorPrimary\"/>\n    <size android:width=\"56dp\" android:height=\"56dp\"/>\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/background_button_actionbutton_pressed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shape=\"oval\" >\n    <solid android:color=\"@color/colorPrimaryDark\"/>\n    <size android:width=\"56dp\" android:height=\"56dp\"/>\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/background_button_actionbutton_selected.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shape=\"oval\" >\n    <solid android:color=\"@color/colorPrimaryLight\"/>\n    <size android:width=\"56dp\" android:height=\"56dp\"/>\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/background_button_light.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/colorPrimaryLight\"/>\n            <size android:width=\"24dp\" android:height=\"24dp\"/>\n        </shape>\n    </item>\n\n    <item android:state_selected=\"true\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/colorPrimaryLight\"/>\n            <size android:width=\"24dp\" android:height=\"24dp\"/>\n        </shape>\n    </item>\n\n    <item android:state_focused=\"true\">\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/colorPrimaryLight\"/>\n            <size android:width=\"24dp\" android:height=\"24dp\"/>\n        </shape>\n    </item>\n\n    <item>\n        <shape android:shape=\"oval\">\n            <solid android:color=\"@color/colorPrimaryVeryLight\"/>\n            <size android:width=\"24dp\" android:height=\"24dp\"/>\n        </shape>\n    </item>\n</selector>"
  },
  {
    "path": "app/src/main/res/drawable/background_rotary.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<inset xmlns:android=\"http://schemas.android.com/apk/res/android\"\nandroid:insetBottom=\"24dp\"\nandroid:insetLeft=\"24dp\"\nandroid:insetRight=\"24dp\"\nandroid:insetTop=\"24dp\">\n    <shape android:shape=\"oval\" >\n        <solid android:color=\"#424242\"/>\n        <size android:width=\"88dp\" android:height=\"88dp\"/>\n    </shape>\n</inset>\n"
  },
  {
    "path": "app/src/main/res/drawable/background_textfield.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shape=\"rectangle\">\n    <solid android:color=\"@color/colorSecondary\"/>\n    <corners android:radius=\"2dp\"/>\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/bar.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"88dp\"\n    android:height=\"88dp\"\n    android:viewportWidth=\"23.283333\"\n    android:viewportHeight=\"23.283335\">\n  <path\n      android:pathData=\"m3.2489,15.5553a9.2604,9.2604 0,0 1,2.6491 -11.1776,9.2604 9.2604,0 0,1 11.4873,0 9.2604,9.2604 0,0 1,2.6491 11.1776\"\n      android:strokeWidth=\"1.05833334\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#ffffff\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"butt\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/bar2.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"88dp\"\n    android:height=\"88dp\"\n    android:viewportWidth=\"23.283333\"\n    android:viewportHeight=\"23.283335\">\n  <path\n      android:pathData=\"M11.6225,1.3229C5.9475,1.3339 1.3339,5.9475 1.3229,11.6225L1.3229,11.6629C1.3256,13.061 1.6082,14.3942 2.1167,15.6104L3.5652,15.6104C2.9774,14.4141 2.6464,13.0681 2.6464,11.6427C2.6464,6.6666 6.6666,2.6464 11.6427,2.6464C16.6188,2.6464 20.6365,6.6666 20.6365,11.6427C20.6365,13.0681 20.3057,14.4141 19.7182,15.6104L21.1672,15.6104C21.6755,14.3942 21.9577,13.061 21.9604,11.6629L21.9604,11.6225C21.9495,5.9475 17.3379,1.3339 11.6629,1.3229L11.6225,1.3229z\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"miter\"\n      android:strokeWidth=\"5\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:fillType=\"nonZero\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"butt\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportWidth=\"14.816666\"\n        android:viewportHeight=\"14.816667\">\n  <path\n      android:pathData=\"m5.0271,6.6146a0.5613,0.5613 0,0 0,0.7937 0l1.1906,1.1906 -0.3969,0.3969a0.5613,0.5613 0,0 0,0 0.7937l0.3969,-0.3969 0.3969,-0.3969 0.1984,-0.1984 1.7859,1.7859 0.3969,-0 0,-0.3969 -1.7859,-1.7859 0.1984,-0.1984 0.3969,-0.3969 0.3969,-0.3969a0.5613,0.5613 0,0 0,-0.7938 0l-0.3969,0.3969 -1.1906,-1.1906a0.5613,0.5613 0,0 0,0 -0.7937l-0.3969,0.3969 -0.7938,0.7937z\"\n      android:strokeAlpha=\"1\"\n      android:strokeWidth=\"16.87502289\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"square\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_pin_icon_black.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"6.35\"\n    android:viewportHeight=\"6.3500004\">\n  <path\n      android:pathData=\"m0.79375,2.38123a0.56127,0.56127 0,0 0,0.79375 0l1.19063,1.19062 -0.39688,0.39687a0.56127,0.56127 0,0 0,0 0.79375l0.39688,-0.39687 0.39688,-0.39687 0.19844,-0.19844 1.78594,1.78594 0.39687,-0.00001 0,-0.39687 -1.78594,-1.78594 0.19844,-0.19844 0.39688,-0.39686 0.39688,-0.39688a0.56127,0.56127 0,0 0,-0.79375 0l-0.39688,0.39687 -1.19063,-1.19063a0.56127,0.56127 0,0 0,0 -0.79374l-0.39688,0.39688 -0.79375,0.79374z\"\n      android:fillColor=\"#000000\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_pin_icon_white.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"6.35\"\n    android:viewportHeight=\"6.3500004\">\n  <path\n      android:pathData=\"m0.79375,2.38123a0.56127,0.56127 0,0 0,0.79375 0l1.19063,1.19062 -0.39688,0.39687a0.56127,0.56127 0,0 0,0 0.79375l0.39688,-0.39687 0.39688,-0.39687 0.19844,-0.19844 1.78594,1.78594 0.39687,-0.00001 0,-0.39687 -1.78594,-1.78594 0.19844,-0.19844 0.39688,-0.39686 0.39688,-0.39688a0.56127,0.56127 0,0 0,-0.79375 0l-0.39688,0.39687 -1.19063,-1.19063a0.56127,0.56127 0,0 0,0 -0.79374l-0.39688,0.39688 -0.79375,0.79374z\"\n      android:fillColor=\"#FFFFFF\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_pin_notification.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:alpha=\"0.8\"\n    android:viewportWidth=\"6.35\"\n    android:viewportHeight=\"6.3500004\">\n  <path\n      android:pathData=\"m0.79375,2.38123a0.56127,0.56127 0,0 0,0.79375 0l1.19063,1.19062 -0.39688,0.39687a0.56127,0.56127 0,0 0,0 0.79375l0.39688,-0.39687 0.39688,-0.39687 0.19844,-0.19844 1.78594,1.78594 0.39687,-0.00001 0,-0.39687 -1.78594,-1.78594 0.19844,-0.19844 0.39688,-0.39686 0.39688,-0.39688a0.56127,0.56127 0,0 0,-0.79375 0l-0.39688,0.39687 -1.19063,-1.19063a0.56127,0.56127 0,0 0,0 -0.79374l-0.39688,0.39688 -0.79375,0.79374z\"\n      android:fillColor=\"#FFFFFF\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_pin_statusbar.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:alpha=\"1\"\n    android:viewportWidth=\"6.35\"\n    android:viewportHeight=\"6.3500004\">\n    <path\n        android:pathData=\"m0.79375,2.38123a0.56127,0.56127 0,0 0,0.79375 0l1.19063,1.19062 -0.39688,0.39687a0.56127,0.56127 0,0 0,0 0.79375l0.39688,-0.39687 0.39688,-0.39687 0.19844,-0.19844 1.78594,1.78594 0.39687,-0.00001 0,-0.39687 -1.78594,-1.78594 0.19844,-0.19844 0.39688,-0.39686 0.39688,-0.39688a0.56127,0.56127 0,0 0,-0.79375 0l-0.39688,0.39687 -1.19063,-1.19063a0.56127,0.56127 0,0 0,0 -0.79374l-0.39688,0.39688 -0.79375,0.79374z\"\n        android:fillColor=\"#FFFFFF\"/>\n</vector>"
  },
  {
    "path": "app/src/main/res/drawable/ic_timespan.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"6.35\"\n    android:viewportHeight=\"6.3500004\">\n  <path\n      android:pathData=\"m2.91042,3.17502v-1.58751h0.52917v1.58751z\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"miter\"\n      android:strokeWidth=\"0.26458335\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:strokeLineCap=\"butt\"/>\n  <path\n      android:pathData=\"m3.36209,2.98788 l1.49672,1.49672 -0.37419,0.37417 -1.4967,-1.4967z\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"miter\"\n      android:strokeWidth=\"0.26458335\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:strokeLineCap=\"butt\"/>\n  <path\n      android:pathData=\"M3.175,3.17499m-0.26458,0a0.26458,0.26458 0,1 1,0.52917 0a0.26458,0.26458 0,1 1,-0.52917 0\"\n      android:strokeWidth=\"1.32291675\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"butt\"/>\n  <path\n      android:pathData=\"M3.43958,0.01344L3.43958,3.06545L5.59914,5.225A3.175,3.175 135,0 0,6.35 3.175A3.175,3.175 0,0 0,3.43958 0.01344z\"\n      android:strokeAlpha=\"0.5\"\n      android:strokeWidth=\"5.00000048\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:fillAlpha=\"0.5\"\n      android:strokeLineCap=\"butt\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_warn.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"6.35\"\n    android:viewportHeight=\"6.3500004\">\n  <path\n      android:pathData=\"M0.79375,4.76245L5.55625,4.76245l-2.38125,-4.23333z\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"0.5291667\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#ffffff\"\n      android:strokeLineCap=\"square\"/>\n  <path\n      android:pathData=\"M2.91042,3.70416h0.52917v0.52917h-0.52917z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"0.52916664\"\n      android:fillColor=\"#ffffff\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"square\"/>\n  <path\n      android:pathData=\"M2.91042,2.38129h0.52917v1.05833h-0.52917z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"0.52916664\"\n      android:fillColor=\"#ffffff\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"square\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/scale.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"88dp\"\n    android:height=\"88dp\"\n    android:viewportWidth=\"23.283333\"\n    android:viewportHeight=\"23.283335\">\n  <path\n      android:pathData=\"m3.8484,15.2757a8.599,8.599 0,0 1,2.4599 -10.3792,8.599 8.599,0 0,1 10.6668,0 8.599,8.599 0,0 1,2.4599 10.3792\"\n      android:strokeWidth=\"0.26458335\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#ffffff\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"square\"/>\n  <path\n      android:pathData=\"M2.2902,16.0023 L3.9688,15.2196\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"miter\"\n      android:strokeWidth=\"0.26458335\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#ffffff\"\n      android:strokeLineCap=\"butt\"/>\n  <path\n      android:pathData=\"m21.1135,16.0584 l-1.6786,-0.7827\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"miter\"\n      android:strokeWidth=\"0.26458335\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#ffffff\"\n      android:strokeLineCap=\"butt\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/scale2.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"88dp\"\n    android:height=\"88dp\"\n    android:viewportWidth=\"23.283333\"\n    android:viewportHeight=\"23.283335\">\n  <path\n      android:pathData=\"M11.6427,2.6464C6.676,2.6464 2.6464,6.676 2.6464,11.6427C2.6464,13.0671 2.9789,14.4134 3.5688,15.6104L3.8644,15.6104C3.2557,14.4198 2.9099,13.0722 2.9099,11.6427C2.9099,6.819 6.819,2.9099 11.6427,2.9099C16.4664,2.9099 20.3729,6.819 20.3729,11.6427C20.3729,13.0722 20.0279,14.4198 19.4195,15.6104L19.7146,15.6104C20.3042,14.4134 20.6365,13.0671 20.6365,11.6427C20.6365,6.676 16.6094,2.6464 11.6427,2.6464z\"\n      android:strokeAlpha=\"1\"\n      android:strokeLineJoin=\"miter\"\n      android:strokeWidth=\"1\"\n      android:fillColor=\"#ffffff\"\n      android:strokeColor=\"#00000000\"\n      android:fillType=\"nonZero\"\n      android:fillAlpha=\"1\"\n      android:strokeLineCap=\"butt\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_note.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clickable=\"true\"\n    android:focusable=\"false\"\n    android:onClick=\"onParentLayoutClicked\"\n    android:theme=\"@style/AppTheme\"\n    tools:context=\".NoteActivity\"\n    tools:ignore=\"UsingOnClickInXml\">\n\n    <de.nproth.pin.RotaryControlView\n        android:id=\"@+id/snooze_duration_slider\"\n        android:layout_width=\"136dp\"\n        android:layout_height=\"136dp\"\n        android:layout_above=\"@id/note_input_field\"\n        android:padding=\"24dp\"\n        android:layout_marginBottom=\"-56dp\"\n        android:layout_marginLeft=\"-16dp\"\n        android:layout_marginStart=\"-16dp\"\n        android:layout_marginRight=\"0dp\"\n        android:layout_marginEnd=\"0dp\"\n        android:background=\"@drawable/background_rotary\"\n        android:elevation=\"4dp\"\n        android:stateListAnimator=\"@animator/state_anim_button\"\n        app:barDrawable=\"@drawable/bar2\"\n        app:scaleDrawable=\"@drawable/scale2\"\n        app:value=\"100\"\n        app:startAngle=\"155\"\n        app:endAngle=\"25\"\n        android:alpha=\"0.9\"/>\n\n    <Button\n        android:id=\"@+id/snooze_duration_button\"\n        android:layout_width=\"56dp\"\n        android:layout_height=\"56dp\"\n        android:layout_above=\"@id/note_input_field\"\n        android:layout_alignStart=\"@id/note_input_field\"\n        android:layout_alignLeft=\"@id/note_input_field\"\n        android:layout_marginStart=\"16dp\"\n        android:layout_marginLeft=\"16dp\"\n        android:layout_marginBottom=\"-16dp\"\n        android:background=\"@drawable/background_button_actionbutton\"\n        android:elevation=\"8dp\"\n        android:nextFocusForward=\"@id/note_input_field\"\n        android:onClick=\"onSetSnoozeDurationButtonClicked\"\n        android:stateListAnimator=\"@animator/state_anim_button\"\n        android:text=\"@string/text_default_button_snooze_duration\"\n        android:textAllCaps=\"false\"\n        android:textColor=\"@color/colorSecondary\" />\n\n    <EditText\n        android:id=\"@+id/note_input_field\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_margin=\"8dp\"\n        android:background=\"@drawable/background_textfield\"\n        android:elevation=\"16dp\"\n        android:focusedByDefault=\"true\"\n        android:hint=\"@string/note_text_hint\"\n        android:imeOptions=\"actionDone\"\n        android:inputType=\"textCapSentences|textAutoCorrect\"\n        android:nextFocusForward=\"@id/note_save_button\"\n        android:paddingStart=\"8dp\"\n        android:paddingLeft=\"8dp\"\n        android:paddingTop=\"8dp\"\n        android:paddingEnd=\"72dp\"\n        android:paddingRight=\"72dp\"\n        android:paddingBottom=\"8dp\">\n        <requestFocus/>\n    </EditText>\n\n    <ImageButton\n        android:id=\"@+id/note_pin_background\"\n        android:layout_width=\"24dp\"\n        android:layout_height=\"24dp\"\n        android:layout_above=\"@+id/note_save_button\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:layout_marginRight=\"8dp\"\n        android:layout_marginEnd=\"8dp\"\n        android:onClick=\"onNotePinBackgroundButtonClicked\"\n        android:background=\"@drawable/background_button_light\"\n        android:src=\"@drawable/ic_timespan\"\n        android:elevation=\"16dp\"/>\n\n    <ImageButton\n        android:id=\"@+id/note_save_button\"\n        android:layout_width=\"56dp\"\n        android:layout_height=\"56dp\"\n        android:layout_above=\"@id/note_input_field\"\n        android:layout_alignEnd=\"@id/note_input_field\"\n        android:layout_alignRight=\"@id/note_input_field\"\n        android:layout_marginEnd=\"8dp\"\n        android:layout_marginRight=\"8dp\"\n        android:layout_marginBottom=\"-36dp\"\n        android:background=\"@drawable/background_button_actionbutton\"\n        android:elevation=\"24dp\"\n        android:nextFocusForward=\"@id/snooze_duration_button\"\n        android:onClick=\"onNoteSaveButtonClicked\"\n        android:padding=\"16dp\"\n        android:src=\"@drawable/ic_pin_icon_white\"\n        android:stateListAnimator=\"@animator/state_anim_button\" />\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/attrs_rotary_control_view.xml",
    "content": "<resources>\n    <declare-styleable name=\"RotaryControlView\">\n        <attr name=\"scaleDrawable\" format=\"reference\" />\n        <attr name=\"barDrawable\" format=\"reference\" />\n        <attr name=\"startAngle\" format=\"float\" />\n        <attr name=\"endAngle\" format=\"float\" />\n        <attr name=\"min\" format=\"integer\" />\n        <attr name=\"max\" format=\"integer\" />\n        <attr name=\"step\" format=\"integer\" />\n        <attr name=\"value\" format=\"integer\" />\n    </declare-styleable>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#212121</color>\n    <color name=\"colorPrimaryDark\">#000000</color>\n    <color name=\"colorPrimaryLight\">#484848</color>\n    <color name=\"colorPrimaryVeryLight\">#737373</color>\n    <color name=\"colorSecondary\">#FFFFFF</color>\n    <color name=\"activityBackground\">#00FFFFFF</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#212121</color>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\" translatable=\"false\">p!n</string>\n    <string name=\"note_text_hint\">Your note</string>\n\n    <string name=\"channel_name_pin\">Newly added notes</string>\n    <string name=\"channel_description_pin\">Newly created notes are pushed to this notification channel to be shown silently.</string>\n\n    <string name=\"channel_name_wake\">Wake up alert</string>\n    <string name=\"channel_description_wake\">Snoozed notes that wake up are pushed to this notification channel and issue an alert.</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"one\">%d pin</item>\n        <item quantity=\"other\">%d pins</item>\n    </plurals>\n\n    <string name=\"text_default_button_snooze_duration\" translatable=\"false\">-:--</string>\n    <string name=\"ftext_button_snooze_duration\" translatable=\"false\">%1$01d:%2$02d</string>\n    <string name=\"ftext_button_zero_snooze\" translatable=\"false\">%1$2ds</string>\n\n    <string name=\"action_delete\">Done</string>\n    <string name=\"action_snooze\">Snooze %1$s</string>\n    <string name=\"action_edit\">Edit</string>\n\n    <string name=\"toast_pin_dismissed\">Snoozed for %1$s</string>\n    <string name=\"toast_pin_background\">Show in %1$s</string>\n\n    <string name=\"symbol_time_seconds\">s</string>\n    <string name=\"symbol_time_minutes\">min</string>\n    <string name=\"symbol_time_hours\">h</string>\n    <string name=\"symbol_time_days\">d</string>\n\n    <string name=\"toast_show_all\">Show All Notes</string>\n\n    <string name=\"toast_fix_pins\">Lock Pins</string>\n    <string name=\"toast_unfix_pins\">Unlock Pins</string>\n\n    <string name=\"qstile_label\">Open p!n</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorPrimaryLight</item>\n\n        <item name=\"android:windowBackground\">@color/activityBackground</item>\n        <item name=\"android:windowIsTranslucent\">true</item>\n    </style>\n\n    <style name=\"WindowAnimationStyle\">\n        <item name=\"android:windowEnterAnimation\">@anim/activity_enter</item>\n        <item name=\"android:windowExitAnimation\">@anim/activity_exit</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/values.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- in milliseconds -->\n    <!--<integer name=\"zero_snooze_duration\">10000</integer>-->\n\n    <!-- Not currently in use -->\n    <integer-array name=\"zero_snooze_durations\">\n        <!--<item>1000</item>--><!-- 10sec: 1sec -->\n        <!--<item>5000</item>--><!-- 1min: 5sec -->\n        <item>5000</item><!-- 0:30h: 5sec -->\n        <item>10000</item><!-- 1:00h: 10sec -->\n        <!--<item>30000</item><!- 1:30h: 30sec -->\n        <!--<item>30000</item><!- 2:00h: 30sec -->\n        <item>15000</item><!-- 3:00h: 30sec -->\n        <item>30000</item><!-- 6:00h: 10sec -->\n        <item>30000</item><!-- 12:00h: 30sec -->\n        <item>30000</item><!-- 24:00h: 30sec -->\n    </integer-array>\n\n    <integer-array name=\"snooze_durations\">\n        <!--<item>10000</item>--><!-- 10sec -->\n        <!--<item>60000</item>--><!-- 1min -->\n        <item>1800000</item><!-- 0:30h -->\n        <item>3600000</item><!-- 1:00h -->\n        <!--<item>5400000</item><!- 1:30h -->\n        <!--<item>7200000</item><!- 2:00h -->\n        <item>10800000</item><!-- 3:00h -->\n        <item>21600000</item><!-- 6:00h -->\n        <item>43200000</item><!-- 12:00h -->\n        <item>86400000</item><!-- 24:00h -->\n    </integer-array>\n\n    <integer-array name=\"snooze_duration_steps\">\n        <!--<item>1000</item>--><!-- 10sec: 1sec -->\n        <!--<item>5000</item>--><!-- 1min: 5sec -->\n        <item>60000</item><!-- 0:30h: 1min -->\n        <item>300000</item><!-- 1:00h: 5min -->\n        <!--<item>5400000</item><!- 1:30h -->\n        <!--<item>600000</item><!- 2:00h: 10min -->\n        <item>600000</item><!-- 3:00h: 10min -->\n        <item>900000</item><!-- 6:00h: 15min -->\n        <item>1800000</item><!-- 12:00h: 30min -->\n        <item>3600000</item><!-- 24:00h: 1h -->\n    </integer-array>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-de/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"note_text_hint\">Neue Notiz</string>\n\n    <string name=\"channel_name_pin\">Neu erstellte Notizen</string>\n    <string name=\"channel_description_pin\">Neu erstellte Notizen werden zu diesem stummen Benachrichtigungskanal hinzugefügt</string>\n\n    <string name=\"channel_name_wake\">Aufgeweckte Notizen</string>\n    <string name=\"channel_description_wake\">Wieder sichtbar gewordene Notizen werden in diesem Kanal angezeigt und machen je nach Systemkonfiguration mit Ton oder Vibration auf sich aufmerksam.</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"one\">%d Notiz</item>\n        <item quantity=\"other\">%d Notizen</item>\n    </plurals>\n\n    <string name=\"action_delete\">Löschen</string>\n    <string name=\"action_snooze\">%1$s Verbergen</string>\n    <string name=\"action_edit\">Bearbeiten</string>\n\n    <string name=\"toast_pin_dismissed\">Erinnerung in %1$s</string>\n    <string name=\"toast_pin_background\">Sichtbar in %1$s</string>\n\n    <string name=\"symbol_time_seconds\">s</string>\n    <string name=\"symbol_time_minutes\">min</string>\n    <string name=\"symbol_time_hours\">h</string>\n    <string name=\"symbol_time_days\">d</string>\n\n    <string name=\"toast_show_all\">Alle sichtbar</string>\n\n    <string name=\"toast_fix_pins\">Notizen fixiert</string>\n    <string name=\"toast_unfix_pins\">Notizen nicht fixiert</string>\n\n    <string name=\"qstile_label\">p!n öffnen</string>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-it/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"note_text_hint\">Nota</string>\n\n    <string name=\"channel_name_pin\">Note appena aggiunte</string>\n    <string name=\"channel_description_pin\">Le note appena create verrano inviate nell\\'area di notifica senza avviso acustico.</string>\n\n    <string name=\"channel_name_wake\">Notifica di riattivazione</string>\n    <string name=\"channel_description_wake\">Le note posticipate che si riattivano verranno inviate nell\\'area di notifica con un avviso acustico.</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"one\">%d pin</item>\n        <item quantity=\"other\">%d pin</item>\n    </plurals>\n\n    <string name=\"action_delete\">Fatto</string>\n    <string name=\"action_snooze\">Posticipa %1$s</string>\n    <string name=\"action_edit\">Modifica</string>\n\n    <string name=\"toast_pin_dismissed\">Posticipato di %1$s</string>\n    <string name=\"toast_pin_background\">Mostra tra %1$s</string>\n\n    <string name=\"symbol_time_seconds\">s</string>\n    <string name=\"symbol_time_minutes\">min</string>\n    <string name=\"symbol_time_hours\">h</string>\n    <string name=\"symbol_time_days\">g</string>\n\n    <string name=\"toast_show_all\">Mostra tutte le note</string>\n\n    <string name=\"toast_fix_pins\">Notifiche bloccate</string>\n    <string name=\"toast_unfix_pins\">Notifiche sbloccate</string>\n\n    <string name=\"qstile_label\">Apri p!n</string>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-ja/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\" translatable=\"false\">p!n</string>\n    <string name=\"note_text_hint\">メモを入力</string>\n\n    <string name=\"channel_name_pin\">新しく追加したメモ</string>\n    <string name=\"channel_description_pin\">新たに作成されたメモは、この通知チャネルにプッシュされ、サイレント表示されます。</string>\n\n    <string name=\"channel_name_wake\">Wake up alert</string>\n    <string name=\"channel_description_wake\">スヌーズされたメモは、この通知チャネルにプッシュされ、アラートがなります。</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"other\">%d 個のメモ</item>\n    </plurals>\n\n    <string name=\"text_default_button_snooze_duration\" translatable=\"false\">-:--</string>\n    <string name=\"ftext_button_snooze_duration\" translatable=\"false\">%1$01d:%2$02d</string>\n    <string name=\"ftext_button_zero_snooze\" translatable=\"false\">%1$2ds</string>\n\n    <string name=\"action_delete\">完了</string>\n    <string name=\"action_snooze\">%1$s スヌーズ</string>\n    <string name=\"action_edit\">編集</string>\n\n    <string name=\"toast_pin_dismissed\">%1$s スヌーズされました</string>\n    <string name=\"toast_pin_background\">%1$s で表示されます</string>\n\n    <string name=\"symbol_time_seconds\">秒間</string>\n    <string name=\"symbol_time_minutes\">分間</string>\n    <string name=\"symbol_time_hours\">時間</string>\n    <string name=\"symbol_time_days\">日</string>\n\n    <string name=\"toast_show_all\">全てのノートを表示</string>\n\n    <string name=\"toast_fix_pins\">ピン留めをロック</string>\n    <string name=\"toast_unfix_pins\">ピン留めのロックを解除</string>\n\n    <string name=\"qstile_label\">p!nを開く</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-pl/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"note_text_hint\">Twoja notatka</string>\n\n    <string name=\"channel_name_pin\">Nowe notatki</string>\n    <string name=\"channel_description_pin\">Nowo utworzone notatki umieszczane w kanale cichych powiadomień.</string>\n\n    <string name=\"channel_name_wake\">Uśpione notatki</string>\n    <string name=\"channel_description_wake\">Notatki pojawiące się po określonym czasie.</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"one\">%d Notatka</item>\n        <item quantity=\"few\">%d Notatki</item>\n        <item quantity=\"many\">%d Notatek</item>\n    </plurals>\n\n    <string name=\"action_delete\">Usuń</string>\n    <string name=\"action_snooze\">Uśpij na %1$s</string>\n    <string name=\"action_edit\">Edytuj</string>\n\n    <string name=\"toast_pin_dismissed\">Uśpiono na %1$s</string>\n    <string name=\"toast_pin_background\">Pokaż za %1$s</string>\n\n    <string name=\"symbol_time_seconds\">s</string>\n    <string name=\"symbol_time_minutes\">min</string>\n    <string name=\"symbol_time_hours\">h</string>\n    <string name=\"symbol_time_days\">d</string>\n\n    <string name=\"toast_show_all\">Pokaż wszystkie notatki</string>\n\n    <string name=\"toast_fix_pins\">Notatki przypięte</string>\n    <string name=\"toast_unfix_pins\">Notatki nieprzypięte</string>\n\n    <string name=\"qstile_label\">Otwórz p!n</string>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-ru/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"note_text_hint\">Ваша записка</string>\n\n    <string name=\"channel_name_pin\">Новые записки</string>\n    <string name=\"channel_description_pin\">Новые записки тихо показываются тут.</string>\n\n    <string name=\"channel_name_wake\">Возвращающиеся записки</string>\n    <string name=\"channel_description_wake\">Отложенные записки возвращаются сюда.</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"one\">%d Записка</item>\n        <item quantity=\"few\">%d Записки</item>\n        <item quantity=\"other\">%d Записок</item>\n    </plurals>\n\n    <string name=\"action_delete\">Удалить</string>\n    <string name=\"action_snooze\">Отложить на %1$с</string>\n    <string name=\"action_edit\">Править</string>\n\n    <string name=\"toast_pin_dismissed\">Отложено на %1$с</string>\n    <string name=\"toast_pin_background\">Появится через %1$с</string>\n\n    <string name=\"symbol_time_seconds\">с</string>\n    <string name=\"symbol_time_minutes\">мин</string>\n    <string name=\"symbol_time_hours\">ч</string>\n    <string name=\"symbol_time_days\">д</string>\n\n    <string name=\"toast_show_all\">Показать все записки</string>\n\n    <string name=\"toast_fix_pins\">Закрепить записки</string>\n    <string name=\"toast_unfix_pins\">Разкрепить записки</string>\n\n    <string name=\"qstile_label\">Открыть p!n</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-sv/strings.xml",
    "content": "<resources>\n    <string name=\"note_text_hint\">Skriv en lapp</string>\n\n    <string name=\"channel_name_pin\">Nyss fästa lappar</string>\n    <string name=\"channel_description_pin\">Nyligen fästa lappar skickas till den här tysta aviseringskanalen.</string>\n\n    <string name=\"channel_name_wake\">Snoozeslut</string>\n    <string name=\"channel_description_wake\">Lappar vars snoozetid går ut skickas till den här aviseringskanalen och gör sig påminda med hjälp av ljud och/eller vibration.</string>\n\n    <plurals name=\"notification_summary_title\">\n        <item quantity=\"one\">%d lapp</item>\n        <item quantity=\"other\">%d lappar</item>\n    </plurals>\n\n    <string name=\"action_delete\">Klart</string>\n    <string name=\"action_snooze\">Snooza i %1$s</string>\n    <string name=\"action_edit\">Redigera</string>\n\n    <string name=\"toast_pin_dismissed\">Snoozades i %1$s</string>\n    <string name=\"toast_pin_background\">Visas om %1$s</string>\n\n    <string name=\"symbol_time_seconds\">s</string>\n    <string name=\"symbol_time_minutes\">min</string>\n    <string name=\"symbol_time_hours\">h</string>\n    <string name=\"symbol_time_days\">d</string>\n\n    <string name=\"toast_show_all\">Alla lappar visas</string>\n\n    <string name=\"toast_fix_pins\">Lapparna låstes</string>\n    <string name=\"toast_unfix_pins\">Lapparna låstes upp</string>\n\n    <string name=\"qstile_label\">Öppna p!n</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorPrimaryLight</item>\n\n        <item name=\"android:windowBackground\">@color/activityBackground</item>\n        <item name=\"android:windowIsTranslucent\">true</item>\n        <item name=\"android:windowDrawsSystemBarBackgrounds\">true</item>\n        <item name=\"android:statusBarColor\">@color/activityBackground</item>\n    </style>\n\n    <style name=\"WindowAnimationStyle\">\n        <item name=\"android:windowEnterAnimation\">@anim/activity_enter</item>\n        <item name=\"android:windowExitAnimation\">@anim/activity_exit</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    \n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:7.0.2'\n        \n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/10.txt",
    "content": "* Quick Settings Tile zum Öffnen von p!n\n* Übersetzung ins Schwedische\n* Tastatur öffnet sich automatisch beim App-Start"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/11.txt",
    "content": "* Italienische Übersetzung\n* Bugfix: Textauswahl ist nun sichtbar"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/12.txt",
    "content": "* Änderungen an italienischer Übersetzung"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/13.txt",
    "content": "* Japanische Übersetzung"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/16.txt",
    "content": "* Russische Übersetzung\n* Mögliche Fehlerbehebung im Quick Settings Tile"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/17.txt",
    "content": "* Polnische Übersetzung"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/3.txt",
    "content": "Verbesserte Benachrichtigungen:\n\n* Notizen werden bei langem Drücken des 'Pin'-Buttons in der Benachrichtigunsleiste fixiert\n* Langes Drücken des 'Timer'-Buttons lässt alle verborgenen Notizen erscheinen\n* Benachrichtigungston, wenn Notizen aufwachen"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/4.txt",
    "content": "* Dauer, um Notizen zu verbergen, lässt sich frei einstellen"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/5.txt",
    "content": "* Kurzes Zeitintervall zum Verbergen von Notizen hinzugefügt, wenn der Regler auf Null gesetzt ist\n* Notizen können im Hintergrund hinzugefügt und direkt verborgen werden"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/6.txt",
    "content": "* Abstürze bei Systemstart behoben"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/8.txt",
    "content": "* Füge 3 und 12 Stunden als Zeitintervalle zum Verstecken von Notizen hinzu"
  },
  {
    "path": "fastlane/metadata/android/de/changelogs/9.txt",
    "content": "* Bugfix: Beim Verstecken von Pins bleiben andere Notizen in der Benachrichtigungsleiste fixiert\n* Im Eingabefeld für Notizen werden Satzanfänge nun standardmäßig groß geschrieben"
  },
  {
    "path": "fastlane/metadata/android/de/full_description.txt",
    "content": "﻿Eine minimalistische Notiz-App, die Erinnerungen in der Benachrichtigungsleiste speichert:\n\n<ul>\n<li>Pinne Notizen an die Benachrichtigungsleiste</li>\n<li>Bereits geschriebene Erinnerungen lassen sich bearbeiten</li>\n<li>Lösche nicht mehr benötigte Pins</li>\n<li>Verstecke Notizen für eine bestimmte Zeit</li>\n</ul>\n\nDie App ist in <b>Material Design</b> gehalten.\n\nDie Notizen werden zusätzlich in einer Datenbank gespeichert und bleiben nach einem Neustart erhalten.\n"
  },
  {
    "path": "fastlane/metadata/android/de/short_description.txt",
    "content": "Pinne Notizen an die Benachrichtigungsleiste.\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/10.txt",
    "content": "* Add Quick Settings Tile that opens p!n\n* Add Swedish translation\n* Automatically open keyboard when p!n launches"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/11.txt",
    "content": "* Add Italian translation\n* Fix text selection color"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/12.txt",
    "content": "* Fix Italian translation"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/13.txt",
    "content": "* Japanese translation"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/14.txt",
    "content": "* Fix shifted text selection overflow menu"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/15.txt",
    "content": "* Fix F-Droid build"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/16.txt",
    "content": "* Add Russian translation\n* Attempt to fix Quick Settings Tile"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/17.txt",
    "content": "* Add Polish translation"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/3.txt",
    "content": "Improved notification handling:\n\n* Make notifications persistent by long pressing 'pin'-button\n* Show hidden pins by long pressing 'timer'-button\n* Alert when notes wake up"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/4.txt",
    "content": "* Change pin sleep duration freely via slider"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/5.txt",
    "content": "* Added small snooze duration for pins when slider is set to zero\n* Notes can be pinned in background and snoozed immediately"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/6.txt",
    "content": "* Fix app crashing on boot under some circumstances"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/7.txt",
    "content": "* Fix pin snooze duration not updating"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/8.txt",
    "content": "* Add 3 and 12 hours as snooze durations"
  },
  {
    "path": "fastlane/metadata/android/en-US/changelogs/9.txt",
    "content": "* Fix bug that causes snoozing a note to unlock all pins\n* Autocapitalize sentences in note input field"
  },
  {
    "path": "fastlane/metadata/android/en-US/full_description.txt",
    "content": "A minimalistic note-taking app utilizing your phone's notification area:\n\n<ul>\n<li>Take notes and save them as notifications</li>\n<li>Edit pinned notices</li>\n<li>Delete pins</li>\n<li>Hide notes for a specific period of time</li>\n</ul>\n\nThe app was build with <b>Material Design</b> in mind.\n\nAll notes are stored in the app's database and survive reboots.\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/short_description.txt",
    "content": "Pin notes to the notification area.\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/title.txt",
    "content": "p!n\n"
  },
  {
    "path": "fastlane/metadata/android/it/full_description.txt",
    "content": "Un'app minimalista per scrivere note da mostrare come promemoria nell'area di notifica del telefono:\n\n<ul>\n<li>Scrivi le tue note e salvale come notifiche</li>\n<li>Modifica le tue note</li>\n<li>Elimina le tue note</li>\n<li>Nascondi le tue note per un periodo di tempo specifico</li>\n</ul>\n\nL'app è stata progettata tenendo conto delle linee guida del <b>Material Design</b>.\n\nLe note create vengono salvate nel database dell'app e verranno mostrate nuovamente anche dopo un riavvio del telefono. (Verificare che le impostazioni di risparmio energetico del sistema permettano all'app di funzionare in background)"
  },
  {
    "path": "fastlane/metadata/android/it/short_description.txt",
    "content": "Appunta le note nell'area di notifica."
  },
  {
    "path": "fastlane/metadata/android/ja/full_description.txt",
    "content": "スマホの通知領域を活用したミニマルなメモ帳アプリ:\n\n<ul>\n<li>メモを取って、通知領域にピン留め</li>\n<li>ピン留めしたメモを編集</li>\n<li>ピン留めしたメモを削除</li>\n<li>一定期間、メモをスヌーズ</li>\n</ul>\n\nこのアプリは<b>マテリアルデザイン</b> に準拠しています\n\nすべてのメモはアプリのデータベースに保存され、再起動しても保持されます。\n"
  },
  {
    "path": "fastlane/metadata/android/ja/short_description.txt",
    "content": "通知エリアにメモをピン留めします\n"
  },
  {
    "path": "fastlane/metadata/android/pl/full_description.txt",
    "content": "Minimalistyczna aplikacja do notatek wykorzystująca panel powiadomień twojego telefonu:\n\n<ul>\n<li>Dodawaj notatki do panelu powiadomień</li>\n<li>Edytuj utworzone notatki</li>\n<li>Usuwaj utworzone notatki</li>\n<li>Ukrywaj notatki przez określony czas</li>\n</ul>\n\nAplikacja została utworzona z myślą o <b>Material Design</b>.\n\nWszystkie notatki są zapisywane w bazie danych aplikacji i nie są usuwane po restarcie telefonu.\n"
  },
  {
    "path": "fastlane/metadata/android/pl/short_description.txt",
    "content": "Przypinaj notatki do panelu powiadomień.\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.0.2-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\nandroid.enableJetifier=true\nandroid.useAndroidX=true\norg.gradle.jvmargs=-Xmx1536m\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\n"
  },
  {
    "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# 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\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n\r\n@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto execute\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app'\n"
  }
]