[
  {
    "path": ".gitignore",
    "content": "<<<<<<< HEAD\n*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n.cxx\nlocal.properties\n=======\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Log/OS Files\n*.log\n\n# Android Studio generated files and folders\ncaptures/\n.externalNativeBuild/\n.cxx/\n*.apk\noutput.json\n\n# IntelliJ\n*.iml\n.idea/\nmisc.xml\ndeploymentTargetDropDown.xml\nrender.experimental.xml\n\n# Keystore files\n*.jks\n*.keystore\n\n# Google Services (e.g. APIs or Firebase)\ngoogle-services.json\n\n# Android Profiling\n*.hprof\n>>>>>>> e9865a95eb7ed2d3a6e3c0283d94db23f9eefe06\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": "# TeleVip LSPosed\n\nA module for modifying Telegram with the following features:\n\n1. Hide \"Seen\" status for groups, channels, and private messages.\n\n2. Hide \"Typing...\" indicator.\n\n3. Hide story view status.\n\n4. Removes Content-Saving.\n\n5. Boost Telegram download speed.\n\n6. Enable Local Premium.\n\n7. Save stories to the gallery, including those that cannot normally be saved.\n\n8. Hide Phone Number.\n\n9. Hide Online Status.\n\n10. Prevent Deletion of Secret Media.\n\n11. Show Deleted Messages.\n\n12. Disable Stories.\n\n13. Hide Update App.\n\n14. Save Messages Edits History.\n\n15. Disable Number Rounding.\n\n16. Disable Channel Swipe\n\n17. Disable Profile Swipe\n\n18. Hide Pinned Messages\n\n19. Enable Secret Media\n\n20. Hide Proxy Sponsor\n\nThere are additional features that are not listed here.\n\n# Support clients\n1. Telegram 12.6.4 (66662)\n2. Plus 12.5.1.1 (22150)\n3. TG Connect 11.13.1 (11130109)\n4. Nagram 12.6.4 (1235)\n5. Skygram 10.20.6 (40639) TeleVip 1.4.6\n6. iMe 12.3.6 (12030602)\n7. iMe Direct 12.3.6 (12030609)\n8. X Plus 12.0.1 (61669)\n9. Cherrygram 11.9.1 (59100) TeleVip 2.0\n10. Nicegram 1.54.0 (2079)\n11. Telegram web 12.6.4 (66669)\n12. Telegram Beta 12.7.0 (67369)\n13. Nekogram 11.5.3S (55150) TeleVip 1.4.6\n14. ForkGram 12.6.6.0 (667008)\n15. ForkClient Beta 12.5.2.0 (658109)\n16. NagramX 12.6.4-e3e4419 (1247)\n17. Teegra 10.3.2 (41469) TeleVip 3.2\n18. Telegraph 12.5.1.2 (65832)\n19. Telega 2.4.3 (107)\n20. Momogram 12.6.4-6a8da4a514 (11269)\n\n# Telegram\n\nAll TeleVip updates are posted on my Telegram channel: [TeleVip](https://t.me/t_l0_e)\n\n# Warning\nThis module is intended for educational purposes only. Its use may result in issues with your Telegram account, including the risk of banning or suspension. Use it at your own risk.\n\n# License\n\nThis project is licensed under the GNU General Public License v3.0 (GPLv3).  \nSee the [LICENSE](./LICENSE) file for more details.\n\nPartially based on [Re-Telegram](https://github.com/Sakion-Team/Re-Telegram).\n\nDeveloped by an @mustafa1dev\n"
  },
  {
    "path": "SUMMARY",
    "content": "TeleVip A module for modifying Telegram"
  },
  {
    "path": "app/.gitignore",
    "content": "/build"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    namespace 'com.my.televip'\n    compileSdk 36\n\n    defaultConfig {\n        applicationId \"com.my.televip\"\n        minSdk 27\n        targetSdk 36\n        versionCode 310\n        versionName \"3.4\"\n\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n        vectorDrawables {\n            useSupportLibrary true\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n\n}\n\ndependencies {\n    compileOnly libs.api\n    implementation(libs.gson)\n    implementation(libs.appcompat)\n    implementation(libs.material)\n}\ntasks.register(\"copyLargestDexAsJava\") {\n\n    dependsOn(\":settingsadapter:assembleDebug\")\n\n    doLast {\n        def apkFile = fileTree(\"$rootDir/settingsadapter/build/intermediates/apk/debug\")\n                .matching { include \"*.apk\" }\n                .singleFile\n\n        def tempDir = new File(buildDir, \"tmp/dexExtract\")\n        tempDir.mkdirs()\n\n        copy {\n            from zipTree(apkFile)\n            into tempDir\n            include \"classes*.dex\"\n        }\n\n        def dexFiles = fileTree(tempDir).matching { include \"classes*.dex\" }.files\n\n        if (dexFiles.isEmpty()) {\n            throw new GradleException(\"No dex files found!\")\n        }\n\n        def largestDex = dexFiles.max { it.length() }\n\n        // قراءة dex كـ bytes\n        byte[] dexBytes = largestDex.bytes\n\n        def hex = dexBytes.collect { String.format(\"%02X\", it) }.join(\"\")\n\n        def outputDir = file(\"$projectDir/src/main/java/com/my/televip/dex\")\n        outputDir.mkdirs()\n\n        def javaFile = new File(outputDir, \"DexHolder.java\")\n\n        javaFile.text = \"\"\"\npackage com.my.televip.dex;\n\npublic class DexHolder {\n    public static final byte[] DEX_BYTES = hexToBytes(\"${hex}\");\n\n    private static byte[] hexToBytes(String hex) {\n        int len = hex.length();\n        byte[] data = new byte[len / 2];\n        for (int i = 0; i < len; i += 2) {\n            data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4)\n                                + Character.digit(hex.charAt(i+1), 16));\n        }\n        return data;\n    }\n}\n\"\"\"\n        println \"Generated DexHolder with largest dex: ${largestDex.name}\"\n    }\n}\n\npreBuild.dependsOn(\"copyLargestDexAsJava\")"
  },
  {
    "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"
  },
  {
    "path": "app/src/androidTest/java/com/my/televip/ExampleInstrumentedTest.java",
    "content": "package com.my.televip;\n\nimport android.content.Context;\n\nimport androidx.test.platform.app.InstrumentationRegistry;\nimport androidx.test.ext.junit.runners.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();\n        assertEquals(\"com.my.televip\", appContext.getPackageName());\n    }\n}"
  },
  {
    "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    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        tools:ignore=\"UnusedAttribute\">\n\n        <meta-data\n            android:name=\"xposedmodule\"\n            android:value=\"true\" />\n        <meta-data\n            android:name=\"xposeddescription\"\n            android:value=\"اضافة مميزات جديده لتيلجرام\" />\n        <meta-data\n            android:name=\"xposedminversion\"\n            android:value=\"93+\" />\n        <meta-data\n            android:name=\"xposedscope\"\n            android:resource=\"@array/xposedscope\" />\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/assets/lang/ar.json",
    "content": "{\n  \"ToTheBeginning\": \"اذهب إلى أول رسالة\",\n  \"ToTheMessage\": \"إلى الرسالة\",\n  \"InputMessageId\": \"ادخل معرف الرسالة\",\n  \"Done\": \"حسناً\",\n  \"NewName\": \"الاسم الجديد\",\n  \"Change\": \"تغيير\",\n  \"Cancel\": \"إلغاء\",\n  \"ChangeTo\": \"تم التغيير الى\",\n  \"NameDeleted\": \"تم حذف الاسم\",\n  \"GhostMode\": \"وضع الشبح 👻\",\n  \"ByMustafa\": \"تم تطوير من قبل @m_1_iq\",\n  \"HideSeen\": \"اخفاء علامة الاستلام\",\n  \"HideStoryView\": \"اخفاء مشاهدة قصة\",\n  \"HideTyping\": \"اخفاء مؤشر الكتابة\",\n  \"TelegramPremium\": \"فتح تيليجرام المميز\",\n  \"RemovesContentSaving\": \"إزالة قيود حفظ المحتوى\",\n  \"EnableSavingStories\": \"السماح بحفظ القصص\",\n  \"GhostModeSettings\": \"وضع الشبح\",\n  \"Save\": \"حفظ\",\n  \"DeveloperChannel\": \"قناة المطور\",\n  \"HideOnline\": \"إخفاء حالة الاتصال بالإنترنت\",\n  \"PreventMedia\": \"تعطيل حذف الوسائط السرية\",\n  \"HidePhone\": \"اخفاء رقم هاتف\",\n  \"ShowDeletedMessages\": \"إظهار الرسائل المحذوفة\",\n  \"Deleted\": \"محذوفه\",\n  \"Copied\": \"تم نسخ '%s' إلى الحافظة\" ,\n  \"UserOffline\": \"لست متصلاً بالإنترنت\",\n  \"DisableStories\": \"اخفاء القصص\",\n  \"HideUpdateApp\": \"اخفاء تحديث تطبيق\",\n  \"JoinTeleVip\": \"انضم إلى قناة TeleVip لتكون أول من يحصل على أحدث التحديثات والميزات الجديدة أولاً بأول\",\n  \"Join\": \"انضم\",\n  \"DontShowAgain\": \"لا تظهر مرة اخرى\",\n  \"RestartApp\": \"إعادة تشغيل التطبيق\",\n  \"RestartRequired\": \"إعادة التشغيل مطلوبة\",\n  \"DisableNumberRounding\": \"تعطيل تقريب الأرقام\",\n  \"EditsHistory\": \"تاريخ التعديلات\",\n  \"SaveEditsHistory\": \"حفظ سجل تعديلات الرسالة\",\n  \"StoriesSettings\": \"القصص\",\n  \"MessagesSettings\": \"الرسائل\",\n  \"MediaSettings\": \"الوسائط\",\n  \"OtherFeaturesSettings\": \"مميزات اخرى\",\n  \"FixTLError\": \"إخفاء TL Error\",\n  \"ShowMessageID\": \"عرض معرف الرسالة\",\n  \"DownloadSpeed\": \"تنزيل فائق سرعة\",\n  \"ConnectionsSettings\": \"اتصالات\",\n  \"Message\": \"رسالة \",\n  \"Edited\": \" تم التعديل في \",\n  \"MarkReadAfterSend\": \"تعيين الرسائل كمقروءة بعد الإرسال أو عند النقر على تفاعل\",\n  \"OfflineVisibilityInfo\": \"عند تفعيل ميزة 'إخفاء حالة الاتصال بالإنترنت'، لن يتم إخفاء حالة اتصالك بشكل كامل، بل يتم تقليل عدد مرات ظهورك كمتصل. قد تظهر متصلاً عند التفاعل مع التطبيق، مثل إرسال الرسائل أو التفاعل معها أو قراءة الرسائل. ستعود حالتك إلى غير متصل بعد حوالي 30-60 ثانية. للحصول على أفضل نتيجة، يُنصح بتفعيل جميع خيارات وضع الشبح.\",\n  \"DisableChannelSwipeBack\": \"تعطيل الرجوع بالسحب في القنوات\",\n  \"DisableProfileSwipeBack\": \"تعطيل الرجوع بالسحب في الملف الشخصي\",\n  \"HidePinnedMessages\": \"إخفاء الرسائل المثبتة\",\n  \"UiSettings\": \"واجهة المستخدم\",\n  \"SecretMediaSave\": \"تفعيل حفظ الوسائط السرية\",\n  \"HideProxySponsor\": \"إخفاء راعي الخادم الوسيط\"\n}"
  },
  {
    "path": "app/src/main/assets/lang/en.json",
    "content": "{\n  \"ToTheBeginning\": \"Go to First Message\",\n  \"ToTheMessage\": \"To The Message\",\n  \"InputMessageId\": \"Input Message Id\",\n  \"Done\": \"Done\",\n  \"NewName\": \"New Name\",\n  \"Change\": \"Change\",\n  \"Cancel\": \"Cancel\",\n  \"ChangeTo\": \"Change to\",\n  \"NameDeleted\": \"Name deleted\",\n  \"GhostMode\": \"Ghost Mode 👻\",\n  \"ByMustafa\": \"by @m_1_iq\",\n  \"HideSeen\": \"Hide 'Seen' status\",\n  \"HideStoryView\": \"Hide 'Story View' status\",\n  \"HideTyping\": \"Hide Typing...\",\n  \"TelegramPremium\": \"Enable Local Premium\",\n  \"RemovesContentSaving\": \"Removes Content-Saving\",\n  \"EnableSavingStories\": \"Enable Saving Stories\",\n  \"GhostModeSettings\": \"Ghost Mode\",\n  \"Save\": \"Save\",\n  \"DeveloperChannel\": \"Developer Channel\",\n  \"HideOnline\": \"Hide 'Online' status\",\n  \"PreventMedia\": \"Prevent Deletion of Secret Media.\",\n  \"HidePhone\": \"Hide 'Phone' number\",\n  \"ShowDeletedMessages\": \"Show 'Deleted Messages'\",\n  \"Deleted\": \"deleted\",\n  \"Copied\": \"Copied '%s' to the clipboard\",\n  \"UserOffline\": \"You are currently offline\",\n  \"DisableStories\": \"Disable 'Stories'\",\n  \"HideUpdateApp\": \"Hide Update App\",\n  \"JoinTeleVip\": \"Join the TeleVip channel to be among the first to get the latest updates and new features\",\n  \"Join\": \"Join\",\n  \"DontShowAgain\": \"Don't show again\",\n  \"RestartApp\": \"Restart App\",\n  \"RestartRequired\": \"Restart required\",\n  \"DisableNumberRounding\": \"Disable Number Rounding\",\n  \"EditsHistory\": \"Edits History\",\n  \"SaveEditsHistory\": \"Save Messages Edits History\",\n  \"StoriesSettings\": \"Stories\",\n  \"MessagesSettings\": \"Messages\",\n  \"MediaSettings\": \"Media\",\n  \"OtherFeaturesSettings\": \"Other Features\",\n  \"FixTLError\": \"Hide TL Error\",\n  \"ShowMessageID\": \"Show Message ID\",\n  \"DownloadSpeed\": \"Download Speed Boost\",\n  \"ConnectionsSettings\": \"Connections\",\n  \"Message\": \"Message \",\n  \"Edited\": \" Edited on \",\n  \"MarkReadAfterSend\": \"Mark messages as read after sending or tap a reaction\",\n  \"OfflineVisibilityInfo\": \"When the “Hide Online Status” feature is enabled, your online status will not be completely hidden. Instead, it reduces how often you appear as online. You may still appear online when interacting with the app, such as sending messages, reacting to them, or reading messages. Your status will return to offline after about 30–60 seconds. For the best result, it is recommended to enable all Ghost Mode options.\",\n  \"DisableChannelSwipeBack\": \"Disable Channel Swipe Back\",\n  \"DisableProfileSwipeBack\": \"Disable Profile Swipe Back\",\n  \"HidePinnedMessages\": \"Hide Pinned Messages\",\n  \"UiSettings\": \"UI\",\n  \"SecretMediaSave\": \"Enable Secret Media Save\",\n  \"HideProxySponsor\": \"Hide Proxy Sponsor\"\n}"
  },
  {
    "path": "app/src/main/assets/lang/zh.json",
    "content": "{\n  \"ToTheBeginning\": \"跳转到第一条消息\",\n  \"ToTheMessage\": \"跳转到消息\",\n  \"InputMessageId\": \"输入消息 ID\",\n  \"Done\": \"完成\",\n  \"NewName\": \"新名字\",\n  \"Change\": \"更改\",\n  \"Cancel\": \"取消\",\n  \"ChangeTo\": \"更改为\",\n  \"NameDeleted\": \"名称已删除\",\n  \"GhostMode\": \"幽灵模式 👻\",\n  \"ByMustafa\": \"by @m_1_iq\",\n  \"HideSeen\": \"隐藏“已查看”状态\",\n  \"HideStoryView\": \"隐藏 '故事观看' 状态\",\n  \"HideTyping\": \"隐藏正在输入...\",\n  \"TelegramPremium\": \"启用 Telegram 本地会员\",\n  \"RemovesContentSaving\": \"移除内容保存限制\",\n  \"EnableSavingStories\": \"启用保存故事\",\n  \"GhostModeSettings\": \"幽灵模式\",\n  \"Save\": \"保存\",\n  \"DeveloperChannel\": \"开发者频道\",\n  \"HideOnline\": \"隐藏 '在线' 状态\",\n  \"PreventMedia\": \"防止删除秘密媒体\",\n  \"HidePhone\": \"隐藏 '电话' 号码\",\n  \"ShowDeletedMessages\": \"显示已删除的消息\",\n  \"Deleted\": \"已删除\",\n  \"Copied\": \"已复制“%s”到剪贴板\",\n  \"UserOffline\": \"您当前处于离线状态\",\n  \"DisableStories\": \"禁用 故事\",\n  \"HideUpdateApp\": \"隐藏应用更新\",\n  \"JoinTeleVip\": \"加入 TeleVip 频道，第一时间获取最新更新和新功能\",\n  \"Join\": \"加入\",\n  \"DontShowAgain\": \"不再显示\",\n  \"RestartApp\": \"重新启动应用\",\n  \"RestartRequired\": \"需要重新启动\",\n  \"DisableNumberRounding\": \"禁用数字四舍五入\",\n  \"EditsHistory\": \"编辑历史\",\n  \"SaveEditsHistory\": \"保存消息编辑历史\",\n  \"StoriesSettings\": \"故事\",\n  \"MessagesSettings\": \"消息\",\n  \"MediaSettings\": \"媒体\",\n  \"OtherFeaturesSettings\": \"其他功能\",\n  \"FixTLError\": \"隐藏 TL Error\",\n  \"ShowMessageID\": \"显示消息ID\",\n  \"DownloadSpeed\": \"下载速度加速\",\n  \"ConnectionsSettings\": \"连接\",\n  \"Message\": \"消息 \",\n  \"Edited\": \" 编辑于 \",\n  \"MarkReadAfterSend\": \"发送消息后或点击反应后，将消息标记为已读\",\n  \"OfflineVisibilityInfo\": \"启用“隐藏在线状态”功能后，您的在线状态不会被完全隐藏，而是会减少您显示为在线的频率。当您与应用进行交互时，例如发送消息、对消息做出反应或阅读消息，您仍可能会显示为在线。大约30–60秒后，您的状态将恢复为离线。为了获得最佳效果，建议启用所有幽灵模式选项。\",\n  \"DisableChannelSwipeBack\": \"禁用频道滑动返回\",\n  \"DisableProfileSwipeBack\": \"禁用个人资料滑动返回\",\n  \"HidePinnedMessages\": \"隐藏置顶消息\",\n  \"UiSettings\": \"用户界面\",\n  \"SecretMediaSave\": \"启用秘密媒体保存\",\n  \"HideProxySponsor\": \"隐藏代理赞助商\"\n}"
  },
  {
    "path": "app/src/main/assets/xposed_init",
    "content": "com.my.televip.MainHook\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Callback/IntCallback.java",
    "content": "package com.my.televip.Callback;\n\n@FunctionalInterface\npublic interface IntCallback {\n    void run(int param);\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/Class/ClassLoad.java",
    "content": "package com.my.televip.Class;\n\nimport android.content.Context;\n\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Utils;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ClassLoad {\n\n\n    private static final Map<String, Class<?>> cache = new HashMap<>();\n\n    public static Class<?> getClass(String name) {\n        String resolved = AutomationResolver.resolve(name);\n\n        if (cache.containsKey(resolved)) {\n            return cache.get(resolved);\n        }\n\n        try {\n            Class<?> cls = XposedHelpers.findClassIfExists(\n                    resolved,\n                    Utils.classLoader\n            );\n            if (cls != null) {\n                cache.put(resolved, cls);\n            } else {\n                if ((ClientChecker.check(ClientChecker.ClientType.Nagram) || ClientChecker.check(ClientChecker.ClientType.Momogram)) && name.equals(ClassNames.DRAWABLE)) return null;\n                Logger.w(\"Not found \" + name + \", \" + resolved + \" \" + Utils.issue);\n            }\n            return cls;\n\n        } catch (Throwable e) {\n            Logger.e(e);\n            return null;\n        }\n    }\n\n    public static Class<?> getClass(String name, ClassLoader classLoader) {\n        String resolved = AutomationResolver.resolve(name);\n\n        if (cache.containsKey(resolved)) {\n            return cache.get(resolved);\n        }\n\n        try {\n            Class<?> cls = XposedHelpers.findClassIfExists(\n                    resolved,\n                    classLoader\n            );\n            if (cls != null) {\n                cache.put(resolved, cls);\n            } else {\n                Logger.w(\"Not found \" + name + \", \" + resolved + \" \" + Utils.issue);\n            }\n            return cls;\n\n        } catch (Throwable e) {\n            Logger.e(e);\n            return null;\n        }\n    }\n\n    private static Context applicationContext;\n\n    public static Context getApplicationContext() {\n        if (applicationContext == null) {\n            applicationContext = (Context) XposedHelpers.getStaticObjectField(\n                    getClass(ClassNames.APPLICATION_LOADER),\n                    AutomationResolver.resolve(\"ApplicationLoader\", \"applicationContext\", AutomationResolver.ResolverType.Field)\n            );\n        }\n        return applicationContext;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Class/ClassNames.java",
    "content": "package com.my.televip.Class;\n\npublic class ClassNames {\n\n    public static final String MESSAGE_OBJECT = \"org.telegram.messenger.MessageObject\";\n    public static final String CHAT_ACTIVITY = \"org.telegram.ui.ChatActivity\";\n    public static final String PROFILE_ACTIVITY = \"org.telegram.ui.ProfileActivity\";\n    public static final String DRAWABLE = \"org.telegram.messenger.R$drawable\";\n    public static final String MESSAGES_CONTROLLER = \"org.telegram.messenger.MessagesController\";\n    public static final String MESSAGES_STORAGE = \"org.telegram.messenger.MessagesStorage\";\n    public static final String THEME = \"org.telegram.ui.ActionBar.Theme\";\n    public static final String APPLICATION_LOADER = \"org.telegram.messenger.ApplicationLoader\";\n    public static final String DRAWER_LAYOUT_ADAPTER = \"org.telegram.ui.Adapters.DrawerLayoutAdapter\";\n    public static final String LOCALE_CONTROLLER = \"org.telegram.messenger.LocaleController\";\n    public static final String NOTIFICATIONS_CONTROLLER = \"org.telegram.messenger.NotificationsController\";\n    public static final String NOTIFICATION_CENTER = \"org.telegram.messenger.NotificationCenter\";\n    public static final String LAUNCH_ACTIVITY = \"org.telegram.ui.LaunchActivity\";\n    public static final String ALERT_DIALOG_BUILDER = \"org.telegram.ui.ActionBar.AlertDialog.Builder\";\n    public static final String TEXT_SETTINGS_CELL = \"org.telegram.ui.Cells.TextSettingsCell\";\n    public static final String TLRPC_ENCRYPTED_CHAT = \"org.telegram.tgnet.TLRPC$EncryptedChat\";\n    public static final String TL_OBJECT = \"org.telegram.tgnet.TLObject\";\n    public static final String STORY_ITEM_HOLDER = \"org.telegram.ui.Stories.PeerStoriesView$StoryItemHolder\";\n    public static final String TLRPC_USER = \"org.telegram.tgnet.TLRPC$User\";\n    public static final String STORIES_CONTROLLER = \"org.telegram.ui.Stories.StoriesController\";\n    public static final String FILE_LOAD_OPERATION = \"org.telegram.messenger.FileLoadOperation\";\n    public static final String CONNECTIONS_MANAGER = \"org.telegram.tgnet.ConnectionsManager\";\n    public static final String TL_ACCOUNT_UPDATE_STATUS = \"org.telegram.tgnet.tl.TL_account$updateStatus\";\n    public static final String REQUEST_DELEGATE = \"org.telegram.tgnet.RequestDelegate\";\n    public static final String REQUEST_DELEGATE_TIMESTAMP = \"org.telegram.tgnet.RequestDelegateTimestamp\";\n    public static final String QUICK_ACK_DELEGATE = \"org.telegram.tgnet.QuickAckDelegate\";\n    public static final String WRITE_TO_SOCKET_DELEGATE = \"org.telegram.tgnet.WriteToSocketDelegate\";\n    public static final String TL_HELP_APP_UPDATE = \"org.telegram.tgnet.TLRPC$TL_help_appUpdate\";\n    public static final String TL_UPDATE_DELETE_MESSAGES = \"org.telegram.tgnet.TLRPC$TL_updateDeleteMessages\";\n    public static final String TL_UPDATE_DELETE_CHANNEL_MESSAGES = \"org.telegram.tgnet.TLRPC$TL_updateDeleteChannelMessages\";\n    public static final String CHAT_MESSAGE_CELL = \"org.telegram.ui.Cells.ChatMessageCell\";\n    public static final String DOWNLOAD_CONTROLLER = \"org.telegram.messenger.DownloadController\";\n    public static final String TL_MESSAGE = \"org.telegram.tgnet.TLRPC$Message\";\n    public static final String SECRET_MEDIA_VIEWER = \"org.telegram.ui.SecretMediaViewer\";\n    public static final String PHOTO_VIEWER = \"org.telegram.ui.PhotoViewer\";\n    public static final String PHOTO_VIEWER_PROVIDER = \"org.telegram.ui.PhotoViewer$PhotoViewerProvider\";\n    public static final String USER_CONFIG = \"org.telegram.messenger.UserConfig\";\n    public static final String TL_MESSAGES_MESSAGES = \"org.telegram.tgnet.TLRPC$messages_Messages\";\n    public static final String ALERT_DIALOG_BUTTON_CLICK = \"org.telegram.ui.ActionBar.AlertDialog$OnButtonClickListener\";\n    public static final String UTILITIES = \"org.telegram.messenger.Utilities\";\n    public static final String TL_MESSAGES_AFFECTED = \"org.telegram.tgnet.TLRPC$TL_messages_affectedMessages\";\n    public static final String TL_CHANNELS_READ_HISTORY = \"org.telegram.tgnet.TLRPC$TL_channels_readHistory\";\n    public static final String TL_MESSAGES_READ_HISTORY = \"org.telegram.tgnet.TLRPC$TL_messages_readHistory\";\n    public static final String SHARED_CONFIG = \"org.telegram.messenger.SharedConfig\";\n    public static final String TLRPC_CHAT = \"org.telegram.tgnet.TLRPC$Chat\";\n    public static final String CHAT_MESSAGE_CELL_DELEGATE = \"org.telegram.ui.ChatActivity$ChatMessageCellDelegate\";\n    public static final String FILE_LOADER = \"org.telegram.messenger.FileLoader\";\n    public static final String SETTINGS_ADAPTER_LIST_ADAPTER = \"com.televip.SettingsAdapter.SettingsAdapter$ListAdapter\";\n    public static final String ANDROID_UTILITIES = \"org.telegram.messenger.AndroidUtilities\";\n    public static final String SETTINGS_ADAPTER_RECYCLER_LIST_VIEW = \"com.televip.SettingsAdapter.SettingsAdapter$RecyclerListView\";\n    public static final String SETTINGS_ADAPTER = \"com.televip.SettingsAdapter.SettingsAdapter\";\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/ClientChecker.java",
    "content": "package com.my.televip;\n\nimport java.util.Arrays;\n\npublic class ClientChecker {\n    public static boolean check(ClientType client, String pkgName)\n    {\n        return Arrays.asList(client.getPackageNames()).contains(pkgName);\n    }\n\n    public static boolean check(ClientType client)\n    {\n        return check(client, Utils.pkgName);\n    }\n\n    public enum ClientType {\n        Telegram(\"org.telegram.messenger\", com.my.televip.Clients.Telegram.class),\n        TelegramWeb(\"org.telegram.messenger.web\", com.my.televip.Clients.TelegramWeb.class),\n        TelegramPlus(\"org.telegram.plus\", com.my.televip.Clients.TelegramPlus.class),\n        TGConnect(\"com.tgconnect.android\", com.my.televip.Clients.TGConnect.class),\n        Nagram(\"xyz.nextalone.nagram\", com.my.televip.Clients.Nagram.class),\n        Nicegram(\"app.nicegram\", com.my.televip.Clients.Nicegram.class),\n        TelegramBeta(\"org.telegram.messenger.beta\", com.my.televip.Clients.TelegramBeta.class),\n        NagramX(\"nu.gpu.nagram\", com.my.televip.Clients.NagramX.class),\n        XPlus(\"com.xplus.messenger\", com.my.televip.Clients.XPlus.class),\n        iMe(\"com.iMe.android\", com.my.televip.Clients.iMe.class),\n        iMeWeb(\"com.iMe.android.web\", com.my.televip.Clients.iMeWeb.class),\n        forkgram(\"org.forkgram.messenger\", com.my.televip.Clients.forkgram.class),\n        forkgramBeta(\"org.forkclient.messenger.beta\", com.my.televip.Clients.forkgramBeta.class),\n        Telegraph(\"ir.ilmili.telegraph\", com.my.televip.Clients.Telegraph.class),\n        Telega(\"ru.dahl.messenger\", com.my.televip.Clients.Telega.class),\n        Momogram(new String[]{\"nekox.messenger.broken\", \"momo.gram\"}, com.my.televip.Clients.Momogram.class);\n\n        private final String[] packageNames;\n        private final Class<?> resolverClass;\n\n        ClientType(String packageName, Class<?> resolverClass) {\n            this.packageNames = new String[]{packageName};\n            this.resolverClass = resolverClass;\n        }\n\n        ClientType(String[] packageNames, Class<?> resolverClass) {\n            this.packageNames = packageNames;\n            this.resolverClass = resolverClass;\n        }\n\n        public String[] getPackageNames() { return packageNames; }\n        public Class<?> getResolverClass() { return resolverClass; }\n\n        public static ClientType fromPackage(String pkg){\n            for (ClientType type: ClientType.values()){\n                for (String name: type.getPackageNames()){\n                    if (name.equals(pkg)) return type;\n                }\n            }\n            return null;\n        }\n\n        public static boolean containsPackage(String pkg){\n            return fromPackage(pkg) != null;\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/Momogram.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Momogram {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name, classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {\n        ParameterResolver.register(\"sendRequestInternal\",new Class[]{ClassLoad.getClass(ClassNames.TL_OBJECT), ClassLoad.getClass(ClassNames.REQUEST_DELEGATE), ClassLoad.getClass(ClassNames.REQUEST_DELEGATE_TIMESTAMP), ClassLoad.getClass(ClassNames.QUICK_ACK_DELEGATE), ClassLoad.getClass(ClassNames.WRITE_TO_SOCKET_DELEGATE), int.class, int.class, int.class, boolean.class, int.class, Runnable.class});\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/Nagram.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\n\npublic class Nagram {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            Class<?>[] classes = objectList.get(name);\n            if (classes != null){\n                has = true;\n            }\n\n            return has;\n        }\n    }\n\n    public static void loadParameter() {\n        ParameterResolver.register(\"markMessagesAsDeletedInternal\",new Class[]{ArrayList.class, boolean.class, int.class, int.class, long.class});\n\n        ParameterResolver.register(\"putMessages\",new Class[]{int.class, int.class, int.class, long.class, long.class, ClassLoad.getClass(ClassNames.TL_MESSAGES_MESSAGES), boolean.class});\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/NagramX.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class NagramX {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/Nicegram.java",
    "content": "package com.my.televip.Clients;\n\nimport android.view.View;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Nicegram {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {\n\n        ParameterResolver.register(\"fillMessageMenu\",new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), ArrayList.class, ArrayList.class, ArrayList.class, ArrayList.class, ArrayList.class, ArrayList.class});\n\n        ParameterResolver.register(\"processSelectedOption\",new Class[]{int.class, View.class});\n\n\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/TGConnect.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class TGConnect {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            Class<?>[] classes = objectList.get(name);\n            if (classes != null){\n                has = true;\n            }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/Telega.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Telega {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            Class<?>[] classes = objectList.get(name);\n            if (classes != null){\n                has = true;\n            }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/Telegram.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Telegram {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name, classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/TelegramBeta.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class TelegramBeta {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/TelegramPlus.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class TelegramPlus {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            Class<?>[] classes = objectList.get(name);\n            if (classes != null){\n                has = true;\n            }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/TelegramWeb.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class TelegramWeb {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            Class<?>[] classes = objectList.get(name);\n            if (classes != null){\n                has = true;\n            }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/Telegraph.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Utils;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport de.robv.android.xposed.XC_MethodReplacement;\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class Telegraph {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {\n        classList.add(new ClassInfo(\"org.telegram.messenger.ApplicationLoader\", \"org.telegram.messenger.com5\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.ActionBar.AlertDialog$OnButtonClickListener\", \"org.telegram.ui.ActionBar.AlertDialog$coN\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.ActionBar.Theme\", \"org.telegram.ui.ActionBar.x\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.LocaleController\", \"org.telegram.messenger.h9\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Cells.ChatMessageCell\",\"org.telegram.ui.Cells.COm7\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.MessagesController\",\"org.telegram.messenger.Zq\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.MessagesStorage\",\"org.telegram.messenger.uw\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.NotificationsController\",\"org.telegram.messenger.Yx\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.NotificationCenter\",\"org.telegram.messenger.Ow\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.MessageObject\",\"org.telegram.messenger.ih\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.UserConfig\",\"org.telegram.messenger.OE\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Stories.StoriesController\",\"org.telegram.ui.Stories.w2\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Stories.PeerStoriesView$StoryItemHolder\",\"org.telegram.ui.Stories.m$coM2\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.ActionBar.BaseFragment\",\"org.telegram.ui.ActionBar.com8\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.PhotoViewer$PhotoViewerProvider\",\"org.telegram.ui.PhotoViewer$lpt1\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.ChatActivity\",\"org.telegram.ui.Og\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.BaseController\",\"org.telegram.messenger.com7\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.AndroidUtilities\",\"org.telegram.messenger.com4\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Cells.TextCheckCell\",\"org.telegram.ui.Cells.N0\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Cells.ShadowSectionCell\",\"org.telegram.ui.Cells.Q\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Cells.HeaderCell\",\"org.telegram.ui.Cells.lPT6\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Cells.TextSettingsCell\",\"org.telegram.ui.Cells.n1\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.Components.UniversalAdapter\",\"org.telegram.ui.Components.iN\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.SharedConfig\",\"org.telegram.messenger.DC\"));\n        classList.add(new ClassInfo(\"org.telegram.messenger.MessagesStorage$IntCallback\",\"org.telegram.messenger.uw$AUx\"));\n        classList.add(new ClassInfo(\"org.telegram.ui.ChatActivity$ChatMessageCellDelegate\",\"org.telegram.ui.Og$LPT6\"));\n\n        fieldList.add(new FieldInfo(\"ApplicationLoader\", \"applicationContext\", \"b\"));\n        fieldList.add(new FieldInfo(\"LaunchActivity\", \"drawerLayoutAdapter\", \"M\"));\n        fieldList.add(new FieldInfo(\"LaunchActivity\", \"drawerLayoutContainer\", \"L\"));\n        fieldList.add(new FieldInfo(\"LocaleController\", \"currentLocale\", \"y\"));\n        fieldList.add(new FieldInfo(\"ChatMessageCell\",\"currentMessageObject\",\"W6\"));\n        fieldList.add(new FieldInfo(\"MessagesController\",\"dialogMessage\",\"C\"));\n        fieldList.add(new FieldInfo(\"MessagesController\",\"dialogMessagesByIds\",\"F\"));\n        fieldList.add(new FieldInfo(\"NotificationCenter\",\"messagesDeleted\",\"c0\"));\n        fieldList.add(new FieldInfo(\"MessagesController$ReadTask\",\"dialogId\",\"a\"));\n        fieldList.add(new FieldInfo(\"Theme\",\"chat_timePaint\",\"o3\"));\n        fieldList.add(new FieldInfo(\"ChatMessageCell\",\"currentTimeString\",\"fb\"));\n        fieldList.add(new FieldInfo(\"ChatMessageCell\",\"timeTextWidth\",\"cb\"));\n        fieldList.add(new FieldInfo(\"ChatMessageCell\",\"timeWidth\",\"bb\"));\n        fieldList.add(new FieldInfo(\"ProfileActivity\",\"userId\",\"J0\"));\n        fieldList.add(new FieldInfo(\"LaunchActivity\",\"frameLayout\",\"H\"));\n        fieldList.add(new FieldInfo(\"ChatActivity\",\"selectedObject\",\"S4\"));\n        fieldList.add(new FieldInfo(\"MessagesStorage\",\"database\",\"b\"));\n        fieldList.add(new FieldInfo(\"UserConfig\",\"clientUserId\",\"i\"));\n        fieldList.add(new FieldInfo(\"UserConfig\",\"selectedAccount\",\"j0\"));\n        fieldList.add(new FieldInfo(\"UItem\",\"id\",\"d\"));\n        fieldList.add(new FieldInfo(\"SettingsActivity$SettingCell\",\"iconView\",\"c\"));\n        fieldList.add(new FieldInfo(\"ChatActivity\",\"pinnedMessageView\",\"l2\"));\n        fieldList.add(new FieldInfo(\"PhotoViewer$PlaceProviderObject\",\"imageReceiver\",\"a\"));\n\n        methodList.add(new MethodInfo(\"AlertDialog\",\"setTitle\", \"H\"));\n        methodList.add(new MethodInfo(\"AlertDialog\",\"setView\", \"O\"));\n        methodList.add(new MethodInfo(\"AlertDialog\",\"setMessage\", \"G\"));\n        methodList.add(new MethodInfo(\"AlertDialog\",\"setPositiveButton\", \"F\"));\n        methodList.add(new MethodInfo(\"AlertDialog\",\"setNegativeButton\", \"z\"));\n        methodList.add(new MethodInfo(\"AlertDialog\",\"setNeutralButton\", \"A\"));\n        methodList.add(new MethodInfo(\"AlertDialog\",\"show\", \"R\"));\n        methodList.add(new MethodInfo(\"AlertDialog$OnButtonClickListener\",\"onClick\", \"a\"));\n        methodList.add(new MethodInfo(\"Theme\",\"getActiveTheme\", \"T3\"));\n        methodList.add(new MethodInfo(\"Theme\",\"isDark\", \"J\"));\n        methodList.add(new MethodInfo(\"Theme\",\"getEventType\", \"O2\"));\n        methodList.add(new MethodInfo(\"DrawerLayoutContainer\", \"closeDrawer\", \"e\"));\n        methodList.add(new MethodInfo(\"LocaleController\", \"getInstance\", \"E1\"));\n        methodList.add(new MethodInfo(\"ChatMessageCell\",\"measureTime\",\"z6\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"deleteMessages\",\"M9\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"markMessagesAsDeleted\",\"l7\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"markMessagesAsDeletedInternal\",\"o7\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"updateDialogsWithDeletedMessagesInternal\",\"h9\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"updateDialogsWithDeletedMessages\",\"g9\"));\n        methodList.add(new MethodInfo(\"NotificationsController\",\"removeDeletedMessagesFromNotifications\",\"q1\"));\n        methodList.add(new MethodInfo(\"NotificationCenter\",\"postNotificationName\",\"B\"));\n        methodList.add(new MethodInfo(\"UserConfig\",\"isPremium\",\"N\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"completeReadTask\",\"u9\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"getUser\",\"mc\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"getDatabase\",\"z5\"));\n        methodList.add(new MethodInfo(\"StoriesController\",\"hasStories\",\"f1\"));\n        methodList.add(new MethodInfo(\"StoriesController\",\"hasStories2\",\"g1\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"storiesEnabled\",\"Og\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"storyEntitiesAllowed\",\"Ng\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"storyEntitiesAllowed2\",\"Pg\"));\n        methodList.add(new MethodInfo(\"PeerStoriesView$StoryItemHolder\",\"allowScreenshots\",\"r\"));\n        methodList.add(new MethodInfo(\"UserConfig\",\"getClientUserId\",\"v\"));\n        methodList.add(new MethodInfo(\"ProfileActivity\",\"updateProfileData\",\"Ie\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"isChatNoForwards\",\"Qc\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"sendSecretMessageRead\",\"Fx\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"sendSecretMediaDelete\",\"Ex\"));\n        methodList.add(new MethodInfo(\"TextCheckCell\",\"setTextAndValueAndCheck\",\"j\"));\n        methodList.add(new MethodInfo(\"TextCheckCell\",\"setTextAndCheck\",\"i\"));\n        methodList.add(new MethodInfo(\"TextCheckCell\",\"isChecked\",\"d\"));\n        methodList.add(new MethodInfo(\"AndroidUtilities\",\"isTablet\",\"u4\"));\n        methodList.add(new MethodInfo(\"TextSettingsCell\",\"setText\",\"c\"));\n        methodList.add(new MethodInfo(\"LocaleController\",\"formatShortNumber\",\"x0\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"fillMessageMenu\",\"Ur\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"processSelectedOption\",\"Qw\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"putMessages\",\"P7\"));\n        methodList.add(new MethodInfo(\"SettingsActivity$SettingCell\",\"set\",\"a\"));\n        methodList.add(new MethodInfo(\"SettingsActivity\",\"fillItems\",\"M0\"));\n        methodList.add(new MethodInfo(\"SettingsActivity\",\"onClick\",\"Q0\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"getInstance\",\"N5\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"getStorageQueue\",\"g6\"));\n        methodList.add(new MethodInfo(\"MessagesStorage\",\"getDialogMaxMessageId\",\"E5\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"getInstance\",\"Cb\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"processNewDifferenceParams\",\"af\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"getInputChannel\",\"qb\"));\n        methodList.add(new MethodInfo(\"UserConfig\",\"getCurrentUser\",\"w\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"createPinnedMessageView\",\"mr\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"updatePinnedMessageView\",\"Uz\"));\n        methodList.add(new MethodInfo(\"ChatActivity\",\"hasSelectedNoforwardsMessage\",\"yt\"));\n        methodList.add(new MethodInfo(\"Theme\",\"isCurrentThemeDark\",\"U3\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"checkPromoInfoInternal\",\"q9\"));\n        methodList.add(new MethodInfo(\"MessagesController\",\"hidePromoDialog\",\"Hc\"));\n        methodList.add(new MethodInfo(\"ChatActivity$ChatMessageCellDelegate\",\"didPressImage\",\"C\"));\n        methodList.add(new MethodInfo(\"PhotoViewer\",\"getInstance\",\"pc\"));\n        methodList.add(new MethodInfo(\"PhotoViewer\",\"setParentActivity\",\"Oe\"));\n        methodList.add(new MethodInfo(\"PhotoViewer\",\"openPhoto\",\"Kd\"));\n\n        ParameterResolver.register(\"fillMessageMenu\", new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), ArrayList.class, ArrayList.class, ArrayList.class});\n\n    }\n\n    public static void removeAd(){\n        try {\n            Class<?> connectionsManager = XposedHelpers.findClassIfExists(\"org.telegram.tgnet.ConnectionsManager\", Utils.classLoader);\n            if (connectionsManager != null) {\n                HMethod.hookMethod(connectionsManager, \"native_expireFile\", long.class, new XC_MethodReplacement() {\n                    @Override\n                    protected Object replaceHookedMethod(MethodHookParam param) {\n                        return false;\n                    }\n                });\n                HMethod.hookMethod(connectionsManager, \"native_daysFile\", long.class, new XC_MethodReplacement() {\n                    @Override\n                    protected Object replaceHookedMethod(MethodHookParam param) {\n                        return 999;\n                    }\n                });\n                HMethod.hookMethod(connectionsManager, \"native_checkLicense\", long.class, new XC_MethodReplacement() {\n                    @Override\n                    protected Object replaceHookedMethod(MethodHookParam param) {\n                        return true;\n                    }\n                });\n                HMethod.hookMethod(connectionsManager, \"native_removeInstance\", int.class, boolean.class, new XC_MethodReplacement() {\n                    @Override\n                    protected Object replaceHookedMethod(MethodHookParam param) {\n                        return true;\n                    }\n                });\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/XPlus.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class XPlus {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name) {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name) {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name) {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class ParameterResolver {\n        static Map<String, Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name, Class<?>[] classes) {\n            objectList.put(name, classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name) {\n            boolean has = false;\n            Class<?>[] classes = objectList.get(name);\n            if (classes != null) {\n                has = true;\n            }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/forkgram.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class forkgram {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/forkgramBeta.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class forkgramBeta {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/iMe.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class iMe {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Clients/iMeWeb.java",
    "content": "package com.my.televip.Clients;\n\nimport com.my.televip.obfuscate.struct.ClassInfo;\nimport com.my.televip.obfuscate.struct.FieldInfo;\nimport com.my.televip.obfuscate.struct.MethodInfo;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class iMeWeb {\n    private static final List<ClassInfo> classList = new ArrayList<>();\n    private static final List<FieldInfo> fieldList = new ArrayList<>();\n    private static final List<MethodInfo> methodList = new ArrayList<>();\n\n\n    public static class ClassResolver\n    {\n        public static String resolve(String name) {\n            for (ClassInfo info : classList)\n                if (info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n            for (ClassInfo info : classList) {\n                if (info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class FieldResolver\n    {\n        public static String resolve(String className, String name) {\n            for (FieldInfo info : fieldList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (FieldInfo info : fieldList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n\n    public static class MethodResolver\n    {\n        public static String resolve(String className, String name) {\n            for (MethodInfo info : methodList)\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name))\n                    return info.getResolved();\n\n            return null;\n        }\n\n        public static boolean has(String className, String name)\n        {\n            boolean has = false;\n            for (MethodInfo info : methodList) {\n                if (info.getClassName().equals(className) && info.getOriginal().equals(name)) {\n                    has = true;\n                    break;\n                }\n            }\n            return has;\n        }\n    }\n    public static class ParameterResolver\n    {\n        static Map<String,Class<?>[]> objectList = new HashMap<>();\n\n        public static void register(String name,  Class<?>[] classes){\n            objectList.put(name,classes);\n        }\n\n        public static Class<?>[] resolve(String name) {\n            return objectList.get(name);\n        }\n\n        public static boolean has(String name)\n        {\n            boolean has = false;\n           Class<?>[] classes = objectList.get(name);\n           if (classes != null){\n               has = true;\n           }\n            return has;\n        }\n    }\n\n    public static void loadParameter() {}\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Configs/ConfigItem.java",
    "content": "package com.my.televip.Configs;\n\npublic class ConfigItem {\n\n    public static final int HEADER = 0,\n            SWITCH = 1,\n            BUTTON = 2,\n            DIVIDER = 3,\n            INFO = 4;\n\n    private final int type;\n    private String key;\n    private String text;\n    private boolean value;\n    private Runnable runnable;\n\n    public ConfigItem(int type, String key, String text, boolean value, Runnable runnable) {\n        this.type = type;\n        this.key = key;\n        this.text = text;\n        this.value = value;\n        this.runnable = runnable;\n    }\n\n    public ConfigItem(int type, String key, boolean value, Runnable runnable) {\n        this.type = type;\n        this.key = key;\n        this.value = value;\n        this.runnable = runnable;\n    }\n\n    public ConfigItem(int type, String key) {\n        this.type = type;\n        this.key = key;\n    }\n\n    public ConfigItem(int type) {\n        this.type = type;\n    }\n\n    public int getType() { return type; }\n    public String getKey() { return key; }\n    public String getText() { return text; }\n\n    public boolean isEnable() { return value; }\n    public void setEnable(boolean value) {\n        this.value = value;\n        ConfigPreferences.putBoolean(key, value);\n    }\n\n    public Runnable getRunnable() { return runnable; }\n\n    public void run() {\n        if (runnable != null) runnable.run();\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/Configs/ConfigManager.java",
    "content": "package com.my.televip.Configs;\n\nimport android.content.Context;\n\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Clients.Telegraph;\nimport com.my.televip.features.DisableChannelSwipeBack;\nimport com.my.televip.features.DisableNumberRounding;\nimport com.my.televip.features.DisableProfileSwipeBack;\nimport com.my.televip.features.DisableStories;\nimport com.my.televip.features.DownloadSpeed;\nimport com.my.televip.features.EnableSavingStories;\nimport com.my.televip.features.FixTLError;\nimport com.my.televip.features.GhostMode;\nimport com.my.televip.features.HideOnline;\nimport com.my.televip.features.HidePhone;\nimport com.my.televip.features.HidePinnedMessages;\nimport com.my.televip.features.HideProxySponsor;\nimport com.my.televip.features.HideUpdateApp;\nimport com.my.televip.features.PreventMedia;\nimport com.my.televip.features.RemovesContentSaving;\nimport com.my.televip.features.SaveEditsHistory;\nimport com.my.televip.features.SecretMediaSave;\nimport com.my.televip.features.ShowDeletedMessages;\nimport com.my.televip.features.TelePremium;\nimport com.my.televip.features.otherFeatures.CopyNameHook;\nimport com.my.televip.features.otherFeatures.FeatureInitializer;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.ui.Cells.ChatMessageCell;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n\npublic class ConfigManager {\n    \n\n    private static final List<ConfigItem> configs = new ArrayList<>();\n\n\n    // GhostMode\n    public static ConfigItem ghostModeSettings;\n    public static ConfigItem hideSeen;\n    public static ConfigItem markReadAfterSend;\n    public static ConfigItem hideTyping;\n    public static ConfigItem hideStoryView;\n    public static ConfigItem hidePhone;\n    public static ConfigItem hideOnline;\n    public static ConfigItem onlineInfo;\n\n    public static ConfigItem shadows;\n\n    // Stories\n    public static ConfigItem stories;\n    public static ConfigItem disableStories;\n\n    // Messages\n    public static ConfigItem messages;\n    public static ConfigItem showDeletedMessages;\n    public static ConfigItem showMessageId;\n    public static ConfigItem saveEditsHistory;\n\n    // Connections\n    public static ConfigItem connections;\n    public static ConfigItem downloadSpeed;\n\n    // Media\n    public static ConfigItem media;\n    public static ConfigItem secretMediaSave;\n    public static ConfigItem preventMedia;\n    public static ConfigItem enableSavingStories;\n\n    //UI\n    public static ConfigItem ui;\n    public static ConfigItem hidePinnedMessages;\n    public static ConfigItem disableChannelSwipeBack;\n    public static ConfigItem disableProfileSwipeBack;\n    public static ConfigItem hideProxySponsor;\n\n    // Other Features\n    public static ConfigItem otherFeatures;\n    public static ConfigItem removesContentSaving;\n    public static ConfigItem telegramPremium;\n    public static ConfigItem disableNumberRounding;\n    public static ConfigItem hideUpdateApp;\n    public static ConfigItem fixTLError;\n\n    // Button\n    public static ConfigItem btnChannel;\n    public static ConfigItem btnRestartApp;\n\n    public static void loadAndRead(Context context){\n        ConfigPreferences.init();\n        load(context);\n        readFeature(context);\n    }\n\n    public static void load(Context context) {\n\n        configs.clear();\n\n        // GhostMode\n        ghostModeSettings = new ConfigItem(ConfigItem.HEADER, Keys.GhostModeSettings);\n        configs.add(ghostModeSettings);\n\n        hideSeen = new ConfigItem(ConfigItem.SWITCH, Keys.HideSeen, ConfigPreferences.getBoolean(Keys.HideSeen), GhostMode::init);\n        configs.add(hideSeen);\n\n        markReadAfterSend = new ConfigItem(ConfigItem.SWITCH, Keys.MarkReadAfterSend, ConfigPreferences.getBoolean(Keys.MarkReadAfterSend), GhostMode::init);\n        configs.add(markReadAfterSend);\n\n        hideTyping = new ConfigItem(ConfigItem.SWITCH, Keys.HideTyping, ConfigPreferences.getBoolean(Keys.HideTyping), GhostMode::init);\n        configs.add(hideTyping);\n\n        hideStoryView = new ConfigItem(ConfigItem.SWITCH, Keys.HideStoryView, ConfigPreferences.getBoolean(Keys.HideStoryView), GhostMode::init);\n        configs.add(hideStoryView);\n\n        hidePhone = new ConfigItem(ConfigItem.SWITCH, Keys.HidePhone, Translator.get(Keys.RestartRequired), ConfigPreferences.getBoolean(Keys.HidePhone), HidePhone::init);\n        configs.add(hidePhone);\n\n        hideOnline = new ConfigItem(ConfigItem.SWITCH, Keys.HideOnline, Translator.get(Keys.RestartRequired), ConfigPreferences.getBoolean(Keys.HideOnline), () -> {\n            GhostMode.init();\n            HideOnline.init();\n        });\n        configs.add(hideOnline);\n\n        onlineInfo = new ConfigItem(ConfigItem.INFO, Keys.OfflineVisibilityInfo);\n        configs.add(onlineInfo);\n\n        shadows = new ConfigItem(ConfigItem.DIVIDER);\n        configs.add(shadows);\n\n        // Stories\n        stories = new ConfigItem(ConfigItem.HEADER, Keys.StoriesSettings);\n        configs.add(stories);\n\n        disableStories = new ConfigItem(ConfigItem.SWITCH, Keys.DisableStories, Translator.get(Keys.RestartRequired), ConfigPreferences.getBoolean(Keys.DisableStories), DisableStories::init);\n        configs.add(disableStories);\n\n        configs.add(shadows);\n\n        // Messages\n        messages = new ConfigItem(ConfigItem.HEADER, Keys.MessagesSettings);\n        configs.add(messages);\n\n        showDeletedMessages = new ConfigItem(ConfigItem.SWITCH, Keys.ShowDeletedMessages, ConfigPreferences.getBoolean(Keys.ShowDeletedMessages), ShowDeletedMessages::initProcessing);\n        configs.add(showDeletedMessages);\n\n        if (!ClientChecker.check(ClientChecker.ClientType.NagramX)) {\n            showMessageId = new ConfigItem(ConfigItem.SWITCH, Keys.ShowMessageID, ConfigPreferences.getBoolean(Keys.ShowMessageID), ChatMessageCell::init);\n            configs.add(showMessageId);\n        }\n\n        saveEditsHistory = new ConfigItem(ConfigItem.SWITCH, Keys.SaveEditsHistory, ConfigPreferences.getBoolean(Keys.SaveEditsHistory), () -> SaveEditsHistory.init(context));\n        configs.add(saveEditsHistory);\n\n        configs.add(shadows);\n\n        // Connections\n        connections = new ConfigItem(ConfigItem.HEADER, Keys.ConnectionsSettings);\n        configs.add(connections);\n\n        downloadSpeed = new ConfigItem(ConfigItem.SWITCH, Keys.DownloadSpeed, ConfigPreferences.getBoolean(Keys.DownloadSpeed), DownloadSpeed::init);\n        configs.add(downloadSpeed);\n\n        configs.add(shadows);\n\n        // Media\n        media = new ConfigItem(ConfigItem.HEADER, Keys.MediaSettings);\n        configs.add(media);\n\n        secretMediaSave = new ConfigItem(ConfigItem.SWITCH, Keys.SecretMediaSave, ConfigPreferences.getBoolean(Keys.SecretMediaSave), SecretMediaSave::init);\n        configs.add(secretMediaSave);\n\n        preventMedia = new ConfigItem(ConfigItem.SWITCH, Keys.PreventMedia, ConfigPreferences.getBoolean(Keys.PreventMedia), PreventMedia::init);\n        configs.add(preventMedia);\n\n        enableSavingStories = new ConfigItem(ConfigItem.SWITCH, Keys.EnableSavingStories, ConfigPreferences.getBoolean(Keys.EnableSavingStories), EnableSavingStories::init);\n        configs.add(enableSavingStories);\n\n        configs.add(shadows);\n\n        // UI\n        ui = new ConfigItem(ConfigItem.HEADER, Keys.UiSettings);\n        configs.add(ui);\n\n        hidePinnedMessages = new ConfigItem(ConfigItem.SWITCH, Keys.HidePinnedMessages, ConfigPreferences.getBoolean(Keys.HidePinnedMessages), HidePinnedMessages::init);\n        configs.add(hidePinnedMessages);\n\n        disableChannelSwipeBack = new ConfigItem(ConfigItem.SWITCH, Keys.DisableChannelSwipeBack, ConfigPreferences.getBoolean(Keys.DisableChannelSwipeBack), DisableChannelSwipeBack::init);\n        configs.add(disableChannelSwipeBack);\n\n        disableProfileSwipeBack = new ConfigItem(ConfigItem.SWITCH, Keys.DisableProfileSwipeBack, ConfigPreferences.getBoolean(Keys.DisableProfileSwipeBack), DisableProfileSwipeBack::init);\n        configs.add(disableProfileSwipeBack);\n\n        hideProxySponsor = new ConfigItem(ConfigItem.SWITCH, Keys.HideProxySponsor, Translator.get(Keys.RestartRequired), ConfigPreferences.getBoolean(Keys.HideProxySponsor), GhostMode::init);\n        configs.add(hideProxySponsor);\n\n        configs.add(shadows);\n\n        // Other Features\n        otherFeatures = new ConfigItem(ConfigItem.HEADER, Keys.OtherFeaturesSettings);\n        configs.add(otherFeatures);\n\n        removesContentSaving = new ConfigItem(ConfigItem.SWITCH, Keys.RemovesContentSaving, ConfigPreferences.getBoolean(Keys.RemovesContentSaving), RemovesContentSaving::init);\n        configs.add(removesContentSaving);\n\n        telegramPremium = new ConfigItem(ConfigItem.SWITCH, Keys.TelegramPremium, ConfigPreferences.getBoolean(Keys.TelegramPremium), TelePremium::init);\n        configs.add(telegramPremium);\n\n        if (!ClientChecker.check(ClientChecker.ClientType.Telegraph)) {\n            disableNumberRounding = new ConfigItem(ConfigItem.SWITCH, Keys.DisableNumberRounding, \"5.3K -> 5300\", ConfigPreferences.getBoolean(Keys.DisableNumberRounding), DisableNumberRounding::init);\n            hideUpdateApp = new ConfigItem(ConfigItem.SWITCH, Keys.HideUpdateApp, Translator.get(Keys.RestartRequired), ConfigPreferences.getBoolean(Keys.HideUpdateApp), HideUpdateApp::init);\n            fixTLError = new ConfigItem(ConfigItem.SWITCH, Keys.FixTLError, ConfigPreferences.getBoolean(Keys.FixTLError), FixTLError::init);\n            configs.add(disableNumberRounding);\n            configs.add(hideUpdateApp);\n            configs.add(fixTLError);\n        }\n\n        configs.add(shadows);\n\n        btnChannel = new ConfigItem(ConfigItem.BUTTON, Keys.DeveloperChannel);\n        configs.add(btnChannel);\n\n        configs.add(shadows);\n\n        btnRestartApp = new ConfigItem(ConfigItem.BUTTON, Keys.RestartApp);\n        configs.add(btnRestartApp);\n\n        configs.add(shadows);\n\n        if (hideProxySponsor.isEnable()) HideProxySponsor.removePromoDialog();\n\n        if ((showDeletedMessages.isEnable() || showMessageId.isEnable()) && !ChatMessageCell.isEnable) ChatMessageCell.init();\n    }\n\n    public static List<ConfigItem> getItems(Context context) {\n        load(context);\n\n        List<ConfigItem> items = new ArrayList<>();\n\n        for (ConfigItem configItem : configs) {\n            if (configItem == null) continue;\n            items.add(new ConfigItem(configItem.getType(), configItem.getKey(), configItem.getText(), configItem.isEnable(), configItem.getRunnable()));\n        }\n        return items;\n    }\n\n    public static void readFeature(Context context) {\n        try {\n            for (ConfigItem item : configs) {\n                if (item == null) continue;\n                if (item.getType() != ConfigItem.SWITCH) continue;\n                if (item.isEnable()) item.run();\n            }\n\n            if (!ClientChecker.check(ClientChecker.ClientType.Telegraph)) {\n                FeatureInitializer.init(context);\n                CopyNameHook.init(context);\n            } else {\n                Telegraph.removeAd();\n            }\n\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    public static boolean isGhostMode(){\n        return hideSeen.isEnable() ||\n                hideStoryView.isEnable() ||\n                hideTyping.isEnable() ||\n                hideOnline.isEnable() ||\n                markReadAfterSend.isEnable() ||\n                hideProxySponsor.isEnable();\n\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Configs/ConfigPreferences.java",
    "content": "package com.my.televip.Configs;\n\nimport android.app.Activity;\nimport android.content.SharedPreferences;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.logging.Logger;\n\npublic class ConfigPreferences {\n\n    private static SharedPreferences sharedPreferences;\n\n\n    public static void init(){\n        sharedPreferences = ClassLoad.getApplicationContext().getSharedPreferences(\"TeleVip\", Activity.MODE_PRIVATE);\n    }\n\n    public static boolean getBoolean(String key) {\n        try {\n            return sharedPreferences.getBoolean(key, false);\n        } catch (ClassCastException e) {\n            sharedPreferences.edit().remove(key).apply();\n            return false;\n        }\n    }\n\n    public static void putBoolean(String key, boolean b) {\n        try {\n            sharedPreferences.edit().putBoolean(key, b).apply();\n        } catch (ClassCastException e) {\n            sharedPreferences.edit().remove(key).apply();\n        }\n    }\n\n    public static String getString(String key) {\n        try {\n            return sharedPreferences.getString(key, null);\n        } catch (ClassCastException e) {\n\n            sharedPreferences.edit().remove(key).apply();\n            return null;\n        }\n    }\n\n    public static void putString(String key, String v) {\n        try {\n            sharedPreferences.edit().putString(key, v).apply();\n        } catch (ClassCastException e) {\n            sharedPreferences.edit().remove(key).apply();\n        }\n    }\n\n    public static void remove(String key){\n        try {\n            sharedPreferences.edit().remove(key).apply();\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Database/MessageDatabase.java",
    "content": "package com.my.televip.Database;\n\nimport android.content.ContentValues;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteOpenHelper;\n\nimport com.my.televip.logging.Logger;\n\nimport java.io.File;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.Locale;\n\npublic class MessageDatabase extends SQLiteOpenHelper {\n\n    private final String TABLE_MESSAGES = \"messages\";\n    private final String COLUMN_ID = \"id\";\n    private final String COLUMN_MSG_ID = \"msg_id\";\n    private final String COLUMN_MESSAGE = \"message\";\n    private final String COLUMN_MESSAGE_EDITED = \"message_Edited\";\n    private final String COLUMN_MSG_COUNT = \"msg_count\";\n\n    public MessageDatabase(Context context) {\n        super(context, getDataBasePath(context), null, 1);\n    }\n\n    public static String getDataBasePath(Context context) {\n        File appDir = new File(context.getDataDir(), \"TeleVip\");\n        if (!appDir.exists()) {\n            appDir.mkdirs();\n        }\n        return new File(appDir, \"SaveMessages.db\").getAbsolutePath();\n    }\n\n    @Override\n    public void onCreate(SQLiteDatabase db) {\n        String TABLE_CREATE = \"CREATE TABLE \" + TABLE_MESSAGES + \" (\" +\n                COLUMN_ID + \" LONG, \" +\n                COLUMN_MSG_ID + \" INTEGER, \" +\n                COLUMN_MSG_COUNT + \" INTEGER, \" +\n                COLUMN_MESSAGE + \" TEXT, \" +\n                COLUMN_MESSAGE_EDITED + \" TEXT \" +\n                \");\";\n        db.execSQL(TABLE_CREATE);\n    }\n\n    @Override\n    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n        db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_MESSAGES);\n        onCreate(db);\n    }\n\n    public void addMessage(long id, int msgId, String message) {\n        try {\n            SQLiteDatabase database = getWritableDatabase();\n            if (!searchMessage(id, msgId, message)) {\n                ContentValues values = new ContentValues();\n                values.put(COLUMN_ID, id);\n                values.put(COLUMN_MSG_ID, msgId);\n                values.put(COLUMN_MESSAGE, message);\n\n                int maxMsgCount = getMaxMessageCount(id, msgId);\n                values.put(COLUMN_MSG_COUNT, maxMsgCount + 1);\n\n                String formattedDate = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\", Locale.US).format(new Date());\n                values.put(COLUMN_MESSAGE_EDITED, formattedDate);\n\n                database.insert(TABLE_MESSAGES, null, values);\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n    public boolean searchMessage(long id, int msgId, String message) {\n        if (message == null) return false;\n\n        try {\n            SQLiteDatabase database = getReadableDatabase();\n            String query = \"SELECT * FROM \" + TABLE_MESSAGES +\n                    \" WHERE \" + COLUMN_ID + \" = ? AND \" +\n                    COLUMN_MSG_ID + \" = ? AND \" +\n                    COLUMN_MESSAGE + \" = ?\";\n            Cursor cursor = database.rawQuery(query, new String[]{\n                    String.valueOf(id),\n                    String.valueOf(msgId),\n                    message\n            });\n            boolean exists = cursor.getCount() > 0;\n            cursor.close();\n            return exists;\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n        return false;\n    }\n\n    public boolean searchMessage(long id, int msgId) {\n        try {\n            SQLiteDatabase database = getReadableDatabase();\n            String query = \"SELECT * FROM \" + TABLE_MESSAGES +\n                    \" WHERE \" + COLUMN_ID + \" = ? AND \" +\n                    COLUMN_MSG_ID + \" = ?\";\n            Cursor cursor = database.rawQuery(query, new String[]{\n                    String.valueOf(id),\n                    String.valueOf(msgId)\n            });\n            boolean exists = cursor.getCount() > 0;\n            cursor.close();\n            return exists;\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n        return false;\n    }\n\n\n    public String getMessage(long id, int msgId) {\n        try {\n            SQLiteDatabase database = getReadableDatabase();\n            String query = \"SELECT \" + COLUMN_MESSAGE + \" FROM \" + TABLE_MESSAGES +\n                    \" WHERE \" + COLUMN_ID + \" = ? AND \" + COLUMN_MSG_ID + \" = ?\";\n            Cursor cursor = database.rawQuery(query, new String[]{String.valueOf(id), String.valueOf(msgId)});\n            String message = null;\n            if (cursor.moveToFirst()) {\n                message = cursor.getString(cursor.getColumnIndexOrThrow(COLUMN_MESSAGE));\n            }\n            cursor.close();\n            return message;\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n        return null;\n    }\n\n    public String getMessage(long id, int msgId, int msgCount) {\n        try {\n            SQLiteDatabase database = getReadableDatabase();\n            String query = \"SELECT \" + COLUMN_MESSAGE + \" FROM \" + TABLE_MESSAGES +\n                    \" WHERE \" + COLUMN_ID + \" = ? AND \" + COLUMN_MSG_ID + \" = ? AND \" + COLUMN_MSG_COUNT + \" = ?\";\n            Cursor cursor = database.rawQuery(query, new String[]{String.valueOf(id), String.valueOf(msgId), String.valueOf(msgCount)});\n            String message = null;\n            if (cursor.moveToFirst()) {\n                message = cursor.getString(cursor.getColumnIndexOrThrow(COLUMN_MESSAGE));\n            }\n            cursor.close();\n            return message;\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n        return null;\n    }\n\n    public String getMessageEdited(long id, int msgId, int msgCount) {\n        try {\n            SQLiteDatabase database = getReadableDatabase();\n            String query = \"SELECT \" + COLUMN_MESSAGE_EDITED + \" FROM \" + TABLE_MESSAGES +\n                    \" WHERE \" + COLUMN_ID + \" = ? AND \" + COLUMN_MSG_ID + \" = ? AND \" + COLUMN_MSG_COUNT + \" = ?\";\n            Cursor cursor = database.rawQuery(query, new String[]{String.valueOf(id), String.valueOf(msgId), String.valueOf(msgCount)});\n            String messageEdited = null;\n            if (cursor.moveToFirst()) {\n                messageEdited = cursor.getString(cursor.getColumnIndexOrThrow(COLUMN_MESSAGE_EDITED));\n            }\n            cursor.close();\n            return messageEdited;\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n        return null;\n    }\n\n    public int getMaxMessageCount(long id, int msgId) {\n        int maxCount = 0;\n        try {\n            SQLiteDatabase database = getReadableDatabase();\n            String query = \"SELECT MAX(\" + COLUMN_MSG_COUNT + \") as max_count FROM \" + TABLE_MESSAGES +\n                    \" WHERE \" + COLUMN_ID + \" = ? AND \" + COLUMN_MSG_ID + \" = ?\";\n            Cursor cursor = database.rawQuery(query, new String[]{String.valueOf(id), String.valueOf(msgId)});\n            if (cursor.moveToFirst()) {\n                maxCount = cursor.getInt(cursor.getColumnIndexOrThrow(\"max_count\"));\n            }\n            cursor.close();\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n        return maxCount;\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/Drawable/ArrowDrawable.java",
    "content": "package com.my.televip.Drawable;\n\nimport static android.view.View.LAYOUT_DIRECTION_RTL;\n\nimport android.graphics.Canvas;\nimport android.graphics.ColorFilter;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.graphics.drawable.Drawable;\n\nimport com.my.televip.virtuals.Theme;\n\npublic class ArrowDrawable extends Drawable {\n\n    private final Paint paint;\n    private final Path path;\n\n    public ArrowDrawable() {\n        paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        paint.setStyle(Paint.Style.FILL);\n        paint.setColor(Theme.getArrowDrawableColor());\n\n        path = new Path();\n        path.moveTo(20f, 11f);\n        path.lineTo(7.8f, 11f);\n        path.lineTo(13.4f, 5.4f);\n        path.lineTo(12f, 4f);\n        path.lineTo(4f, 12f);\n        path.lineTo(12f, 20f);\n        path.lineTo(13.4f, 18.6f);\n        path.lineTo(7.8f, 13f);\n        path.lineTo(20f, 13f);\n        path.lineTo(20f, 11f);\n        path.close();\n    }\n\n    @Override\n    public void draw(Canvas canvas) {\n        float scaleX = getBounds().width() / 24f;\n        float scaleY = getBounds().height() / 24f;\n        canvas.save();\n\n        // دعم autoMirrored عند RTL\n        if ((getLayoutDirection() == LAYOUT_DIRECTION_RTL)) {\n            canvas.translate(getBounds().width(), 0);\n            canvas.scale(-scaleX, scaleY);\n        } else {\n            canvas.scale(scaleX, scaleY);\n        }\n\n        canvas.drawPath(path, paint);\n        canvas.restore();\n    }\n\n    @Override\n    public void setAlpha(int alpha) {\n        paint.setAlpha(alpha);\n        invalidateSelf();\n    }\n\n    @Override\n    public void setColorFilter(ColorFilter colorFilter) {\n        paint.setColorFilter(colorFilter);\n        invalidateSelf();\n    }\n\n    @Override\n    public int getOpacity() {\n        return paint.getAlpha() == 255 ? android.graphics.PixelFormat.OPAQUE : android.graphics.PixelFormat.TRANSLUCENT;\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/Drawable/GhostDrawable.java",
    "content": "package com.my.televip.Drawable;\n\nimport static android.view.View.LAYOUT_DIRECTION_RTL;\n\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.ColorFilter;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.graphics.PixelFormat;\nimport android.graphics.drawable.Drawable;\n\npublic class GhostDrawable extends Drawable {\n\n    private final Paint paint;\n    private final Path bodyPath;\n    private final Path eyeLeft;\n    private final Path eyeRight;\n    private final Paint eyePaint;\n\n    public GhostDrawable() {\n        paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        paint.setStyle(Paint.Style.FILL);\n        paint.setColor(Color.WHITE);\n\n        // جسم الشبح\n        bodyPath = new Path();\n        bodyPath.moveTo(12f, 1.83f);\n        bodyPath.cubicTo(6.94f, 1.83f, 2.84f, 5.96f, 2.84f, 11.06f);\n        bodyPath.lineTo(2.84f, 20.82f);\n        bodyPath.cubicTo(2.84f, 21.37f, 3.4f, 21.71f, 3.88f, 21.47f);\n        bodyPath.lineTo(6.2f, 20.3f);\n        bodyPath.cubicTo(7.77f, 19.51f, 9.67f, 19.97f, 10.73f, 21.38f);\n        bodyPath.cubicTo(11.44f, 22.34f, 12.83f, 22.44f, 13.68f, 21.58f);\n        bodyPath.lineTo(14.05f, 21.21f);\n        bodyPath.cubicTo(15.37f, 19.88f, 17.43f, 19.63f, 19.05f, 20.6f);\n        bodyPath.lineTo(20.35f, 21.39f);\n        bodyPath.cubicTo(20.7f, 21.59f, 21.15f, 21.35f, 21.15f, 20.92f);\n        bodyPath.lineTo(21.15f, 11.06f);\n        bodyPath.cubicTo(21.15f, 5.96f, 17.05f, 1.83f, 12f, 1.83f);\n        bodyPath.close();\n\n        // العين اليمنى\n        eyeRight = new Path();\n        eyeRight.addCircle(15.5f, 11f, 1.5f, Path.Direction.CW);\n\n        // العين اليسرى\n        eyeLeft = new Path();\n        eyeLeft.addCircle(8.5f, 11f, 1.5f, Path.Direction.CW);\n\n        eyePaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        eyePaint.setStyle(Paint.Style.FILL);\n        eyePaint.setColor(0xFF000000); // أسود (تقدر تغيّره)\n    }\n\n    @Override\n    public void draw(Canvas canvas) {\n        float scaleX = getBounds().width() / 24f;\n        float scaleY = getBounds().height() / 24f;\n\n        canvas.save();\n\n        if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) {\n            canvas.translate(getBounds().width(), 0);\n            canvas.scale(-scaleX, scaleY);\n        } else {\n            canvas.scale(scaleX, scaleY);\n        }\n\n        // رسم الجسم\n        canvas.drawPath(bodyPath, paint);\n\n        // رسم العيون\n        canvas.drawPath(eyeLeft, eyePaint);\n        canvas.drawPath(eyeRight, eyePaint);\n\n        canvas.restore();\n    }\n\n    @Override\n    public void setAlpha(int alpha) {\n        paint.setAlpha(alpha);\n        invalidateSelf();\n    }\n\n    @Override\n    public void setColorFilter(ColorFilter colorFilter) {\n        paint.setColorFilter(colorFilter);\n        invalidateSelf();\n    }\n\n    @Override\n    public int getOpacity() {\n        return paint.getAlpha() == 255 ? PixelFormat.OPAQUE : PixelFormat.TRANSLUCENT;\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/MainHook.java",
    "content": "package com.my.televip;\r\n\r\n\r\nimport android.app.Activity;\r\nimport android.os.Bundle;\r\n\r\nimport com.my.televip.Class.ClassLoad;\r\nimport com.my.televip.Class.ClassNames;\r\nimport com.my.televip.base.AbstractMethodHook;\r\nimport com.my.televip.hooks.HMethod;\r\n\r\nimport de.robv.android.xposed.IXposedHookLoadPackage;\r\nimport de.robv.android.xposed.IXposedHookZygoteInit;\r\nimport de.robv.android.xposed.callbacks.XC_LoadPackage;\r\n\r\npublic class MainHook implements IXposedHookLoadPackage, IXposedHookZygoteInit {\r\n\r\n    private boolean isStart;\r\n\r\n    @Override\r\n    public void initZygote(StartupParam startupParam){ Utils.modulePath = startupParam.modulePath; }\r\n\r\n    @Override\r\n    public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {\r\n        if (!ClientChecker.ClientType.containsPackage(lpparam.packageName)) {\r\n            return;\r\n        }\r\n        Utils.pkgName = lpparam.packageName;\r\n        Utils.classLoader = lpparam.classLoader;\r\n\r\n\r\n        HMethod.hookMethod(ClassLoad.getClass(ClassNames.LAUNCH_ACTIVITY), \"onCreate\", Bundle.class, new AbstractMethodHook() {\r\n            @Override\r\n            protected void beforeMethod(MethodHookParam param) {\r\n                Activity launchActivity = (Activity) param.thisObject;\r\n                if (!isStart) {\r\n                    TeleVip.startHook(launchActivity);\r\n                    isStart = true;\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n\r\n}\r\n\r\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/TeleVip.java",
    "content": "package com.my.televip;\n\nimport static com.my.televip.obfuscate.AutomationResolver.resolverRegistry;\n\nimport android.content.Context;\n\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.application.AndroidUtilities;\nimport com.my.televip.application.ApplicationLoaderHook;\nimport com.my.televip.dex.DexInjector;\nimport com.my.televip.language.Translator;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.settings.SettingsManager;\nimport com.my.televip.settings.controller.SettingsController;\nimport com.my.televip.virtuals.TeleVip.Bridge.Bridge;\n\npublic class TeleVip {\n    \n    public static void startHook(Context context) {\n        try {\n            resolverRegistry.loadParameter();\n            Translator.init();\n            AndroidUtilities.init(context);\n            DexInjector.injectDex(Utils.classLoader);\n\n            SettingsController settingsController = new SettingsController(context);\n\n            Bridge.init(context, settingsController);\n            ConfigManager.loadAndRead(context);\n            SettingsManager.init(settingsController);\n\n            ApplicationLoaderHook.init();\n\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/Utils.java",
    "content": "package com.my.televip;\n\nimport java.util.ArrayList;\n\npublic class Utils {\n    public static String pkgName = null;\n    public static String modulePath = null;\n    public static ClassLoader classLoader = null;\n    public static final String issue = \"Your Telegram client may be an incompatible version with TeleVip. Please download the latest version that is compatible with TeleVip.\";\n\n\n    public static <T> ArrayList<T> castList(Object obj, Class<T> clazz)\n    {\n        ArrayList<T> result = new ArrayList<>();\n        if (obj instanceof ArrayList<?>)\n        {\n            for (Object o : (ArrayList<?>) obj)\n                result.add(clazz.cast(o));\n\n            return result;\n        }\n        return result;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/application/AndroidUtilities.java",
    "content": "package com.my.televip.application;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.os.Handler;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.logging.Logger;\n\npublic class AndroidUtilities {\n\n    private static float density = 1;\n\n    public static volatile Handler applicationHandler;\n\n    public static void runOnUIThread(Runnable runnable) {\n        if (applicationHandler == null) {\n            return;\n        }\n        applicationHandler.post(runnable);\n\n    }\n\n    public static void init(Context context) {\n        try {\n            applicationHandler = new Handler(ClassLoad.getApplicationContext().getMainLooper());\n            density = context.getResources().getDisplayMetrics().density;\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    public static int dp(float value) {\n        if (value == 0) {\n            return 0;\n        }\n        return (int) Math.ceil(density * value);\n    }\n\n    public static int getStatusBarHeight(Context context) {\n        @SuppressLint({\"InternalInsetResource\", \"DiscouragedApi\"}) int resourceId = context.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n        return resourceId > 0 ? context.getResources().getDimensionPixelSize(resourceId) : 0;\n    }\n\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/application/ApplicationLoaderHook.java",
    "content": "package com.my.televip.application;\n\nimport android.app.Application;\nimport android.content.Context;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Utils;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.io.File;\n\nimport de.robv.android.xposed.XC_MethodHook;\n\npublic class ApplicationLoaderHook {\n    private static boolean initialized = false;\n\n    public static void init() {\n        // our minSdk is 21 so there is no need to wait for MultiDex to initialize\n        if (initialized)\n            return;\n\n\n        if (ClassLoad.getClass(ClassNames.APPLICATION_LOADER) == null) { return; }\n\n        HMethod.hookMethod(ClassLoad.getClass(ClassNames.APPLICATION_LOADER), AutomationResolver.resolve(\"ApplicationLoader\", \"onCreate\", AutomationResolver.ResolverType.Method), new XC_MethodHook(51) {\n            @Override\n            protected void beforeHookedMethod(MethodHookParam param) {\n                Context app = (Application) param.thisObject;\n\n                try {\n                    app = app.getApplicationContext();\n                } catch (Throwable ignored) {}\n\n                if (app == null)\n                {\n                    Logger.w(\"ApplicationLoader is wrong, \" + Utils.issue);\n                    return;\n                }\n\n                File dir = new File(app.getFilesDir().getParentFile(), \"TeleVip\");\n                if (!dir.exists())\n                    if (!dir.mkdir())\n                    {\n                        Logger.w(\"Cannot create \" + dir.getAbsolutePath() + \" dir, please create by yourself!\");\n                    }\n\n            }\n        });\n        initialized = true;\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/audio.java",
    "content": "package com.my.televip;\n\nimport android.media.AudioAttributes;\nimport android.media.AudioManager;\nimport android.media.MediaPlayer;\n\nimport java.io.IOException;\n\npublic class audio {\n\n    public static boolean playing = false;\n    private static MediaPlayer mediaPlayer;\n\n    public static void init(){\n            mediaPlayer = new MediaPlayer();\n\n            mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n            AudioAttributes audioAttributes = new AudioAttributes.Builder()\n                    .setUsage(AudioAttributes.USAGE_MEDIA)\n                    .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)\n                    .build();\n\n            mediaPlayer.setAudioAttributes(audioAttributes);\n    }\n\n    public static void start(){\n        int num = (int) (Math.random() * 3);\n        String audioUrl;\n        if (num == 0) {\n            audioUrl = \"https://qurango.net/radio/abdulbasit_abdulsamad_mojawwad\";\n        } else if (num == 1) {\n            audioUrl = \"https://qurango.net/radio/yasser_aldosari\";\n        } else {\n            audioUrl = \"https://backup.qurango.net/radio/maher\";\n        }\n\n        try {\n            mediaPlayer.reset();\n            mediaPlayer.setDataSource(audioUrl);\n            mediaPlayer.prepareAsync();\n            mediaPlayer.setOnPreparedListener(mp -> {\n                mediaPlayer.start();\n                playing = true;\n            });\n        } catch (IllegalArgumentException |\n                 IllegalStateException |\n                 IOException e) {\n            playing = false;\n            init();\n        }\n    }\n\n    public static void stop() {\n        if (mediaPlayer != null && mediaPlayer.isPlaying()) {\n            mediaPlayer.stop();\n        }\n\n        if (mediaPlayer != null) {\n            mediaPlayer.release();\n            init();\n        }\n        playing = false;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/base/AbstractMethodHook.java",
    "content": "package com.my.televip.base;\n\nimport com.my.televip.logging.Logger;\n\nimport de.robv.android.xposed.XC_MethodHook;\n\npublic abstract class AbstractMethodHook extends XC_MethodHook {\n    protected void beforeMethod(MethodHookParam param) throws Throwable {\n\n    }\n\n    protected void afterMethod(MethodHookParam param) throws Throwable {\n\n    }\n\n    @Override\n    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {\n        super.beforeHookedMethod(param);\n        try {\n            beforeMethod(param);\n        } catch (Throwable throwable) {\n            Logger.e(throwable);\n        }\n    }\n\n    @Override\n    protected void afterHookedMethod(MethodHookParam param) throws Throwable {\n        super.afterHookedMethod(param);\n        try {\n            afterMethod(param);\n        } catch (Throwable throwable) {\n            Logger.e(throwable);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/dex/DexInjector.java",
    "content": "package com.my.televip.dex;\n\nimport com.my.televip.logging.Logger;\n\nimport java.nio.ByteBuffer;\n\nimport dalvik.system.InMemoryDexClassLoader;\n\npublic class DexInjector {\n\n    public static ClassLoader classLoader;\n\n    public static void injectDex(ClassLoader classLoader) {\n        try {\n            byte[] dexBytes = DexHolder.DEX_BYTES;\n\n            ByteBuffer buffer = ByteBuffer.wrap(dexBytes);\n\n            DexInjector.classLoader = new InMemoryDexClassLoader(\n                    buffer,\n                    classLoader\n            );\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/DisableChannelSwipeBack.java",
    "content": "package com.my.televip.features;\n\nimport android.view.MotionEvent;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\npublic class DisableChannelSwipeBack {\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                if (ClassLoad.getClass(ClassNames.CHAT_ACTIVITY) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"isSwipeBackEnabled\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"isSwipeBackEnabled\", new Class[]{MotionEvent.class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.disableChannelSwipeBack.isEnable()) {\n                                param.setResult(false);\n                            }\n                        }\n                    }));\n                }\n            }\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/DisableNumberRounding.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\npublic class DisableNumberRounding {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.LOCALE_CONTROLLER) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.LOCALE_CONTROLLER), AutomationResolver.resolve(\"LocaleController\", \"formatShortNumber\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"formatShortNumber\", new Class[]{int.class, int[].class}),\n                            new AbstractMethodHook() {\n                                @Override\n                                protected void beforeMethod(MethodHookParam param) {\n                                    if (ConfigManager.disableNumberRounding.isEnable()) {\n                                        int[] rounded = (int[]) param.args[1];\n                                        int number = (int) param.args[0];\n                                        if (rounded != null) {\n                                            rounded[0] = number;\n                                        }\n                                        param.setResult(String.valueOf(number));\n                                    }\n                                }\n                            }));\n                }\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/DisableProfileSwipeBack.java",
    "content": "package com.my.televip.features;\n\nimport android.view.MotionEvent;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\npublic class DisableProfileSwipeBack {\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.CHAT_ACTIVITY) != null) {\n\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ProfileActivity\", \"isSwipeBackEnabled\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"isSwipeBackEnabled\", new Class[]{MotionEvent.class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.disableProfileSwipeBack.isEnable()) {\n                                param.setResult(false);\n                            }\n                        }\n                    }));\n                }\n            }\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/DisableStories.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\npublic class DisableStories {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), new String[]{AutomationResolver.resolve(\"MessagesController\", \"storiesEnabled\", AutomationResolver.ResolverType.Method), AutomationResolver.resolve(\"MessagesController\", \"storyEntitiesAllowed\", AutomationResolver.ResolverType.Method)}, new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.disableStories.isEnable()) param.setResult(false);\n                        }\n                    });\n\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), AutomationResolver.resolve(\"MessagesController\", \"storyEntitiesAllowed2\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"storyEntitiesAllowed\", new Class[]{ClassLoad.getClass(ClassNames.TLRPC_USER)}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.disableStories.isEnable()) param.setResult(false);\n                        }\n                    }));\n                }\n\n                if (ClassLoad.getClass(ClassNames.STORIES_CONTROLLER) != null) {\n                    if (ClientChecker.check(ClientChecker.ClientType.NagramX)) {\n                        HMethod.hookMethod(ClassLoad.getClass(ClassNames.STORIES_CONTROLLER), AutomationResolver.resolve(\"StoriesController\", \"hasStories2\", AutomationResolver.ResolverType.Method), long.class, new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                if (ConfigManager.disableStories.isEnable())\n                                    param.setResult(false);\n                            }\n                        });\n                    } else {\n                        HMethod.hookMethod(ClassLoad.getClass(ClassNames.STORIES_CONTROLLER), AutomationResolver.resolve(\"StoriesController\", \"hasStories\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                if (ConfigManager.disableStories.isEnable())\n                                    param.setResult(false);\n                            }\n                        });\n                    }\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/DownloadSpeed.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.messenger.FileLoadOperation;\n\npublic class DownloadSpeed {\n\n    public static boolean isEnable = false;\n\n    public static void init(){\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.FILE_LOAD_OPERATION) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.FILE_LOAD_OPERATION), AutomationResolver.resolve(\"FileLoadOperation\", \"updateParams\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                        @Override\n                        protected void afterMethod(MethodHookParam param) {\n                            if (ConfigManager.downloadSpeed.isEnable()) {\n                                FileLoadOperation fileLoadOperation = new FileLoadOperation(param.thisObject);\n\n                                int downloadChunkSizeBig = 1024 * 512;\n                                int maxDownloadRequests = 8;\n\n                                long defaultMaxFileSize = 1024L * 1024L * 2000L;\n\n                                int maxCdnParts = (int) (defaultMaxFileSize / downloadChunkSizeBig);\n\n                                fileLoadOperation.setDownloadChunkSizeBig(downloadChunkSizeBig);\n                                fileLoadOperation.setMaxDownloadRequests(maxDownloadRequests);\n                                fileLoadOperation.setMaxDownloadRequestsBig(maxDownloadRequests);\n                                fileLoadOperation.setMaxCdnParts(maxCdnParts);\n                                param.setResult(null);\n                            }\n\n                        }\n                    });\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/EnableSavingStories.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\npublic class EnableSavingStories {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.STORY_ITEM_HOLDER) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.STORY_ITEM_HOLDER), AutomationResolver.resolve(\"PeerStoriesView$StoryItemHolder\", \"allowScreenshots\", AutomationResolver.ResolverType.Method),\n                            new AbstractMethodHook() {\n                                @Override\n                                protected void beforeMethod(MethodHookParam param) {\n                                    if (ConfigManager.enableSavingStories.isEnable())\n                                        param.setResult(true);\n                                }\n                            });\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/FixTLError.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.messenger.NotificationCenter;\n\npublic class FixTLError {\n\n    public static boolean isEnable = false;\n\n    public static void init(){\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                if (ClassLoad.getClass(ClassNames.LAUNCH_ACTIVITY) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.LAUNCH_ACTIVITY), AutomationResolver.resolve(\"LaunchActivity\", \"didReceivedNotification\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"didReceivedNotification\", new Class[]{int.class, int.class, Object[].class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            int id = (int) param.args[0];\n                            if (id == NotificationCenter.getTlSchemeParseException() && ConfigManager.fixTLError.isEnable())\n                                param.setResult(null);\n                        }\n                    }));\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n    }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/GhostMode.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedBridge;\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class GhostMode {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                if (ClassLoad.getClass(ClassNames.CONNECTIONS_MANAGER) != null && ConfigManager.isGhostMode()) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CONNECTIONS_MANAGER), AutomationResolver.resolve(\"ConnectionsManager\", \"sendRequestInternal\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"sendRequestInternal\", new Class[]{ClassLoad.getClass(ClassNames.TL_OBJECT), ClassLoad.getClass(ClassNames.REQUEST_DELEGATE), ClassLoad.getClass(ClassNames.REQUEST_DELEGATE_TIMESTAMP), ClassLoad.getClass(ClassNames.QUICK_ACK_DELEGATE), ClassLoad.getClass(ClassNames.WRITE_TO_SOCKET_DELEGATE), int.class, int.class, int.class, boolean.class, int.class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            try {\n                                if (HideSeen.isReadMessages) {\n                                    HideSeen.isReadMessages = false;\n                                } else if (ConfigManager.isGhostMode()) {\n                                    Object object = param.args[0];\n                                    if (ClientChecker.check(ClientChecker.ClientType.Nagram)) {\n                                        HideSeen.saveReadHistory(object);\n                                    }\n                                    if (ConfigManager.hideOnline.isEnable()) {\n                                        if (ClassLoad.getClass(ClassNames.TL_ACCOUNT_UPDATE_STATUS) != null) {\n\n                                            if (ClassLoad.getClass(ClassNames.TL_ACCOUNT_UPDATE_STATUS).isInstance(object)) {\n                                                XposedHelpers.setBooleanField(object, AutomationResolver.resolve(\"TL_account$updateStatus\", \"offline\", AutomationResolver.ResolverType.Field), true);\n                                            }\n                                        }\n                                    }\n\n                                    if (ConfigManager.hideSeen.isEnable() && HideSeen.isReadMessageRequest(object)) {\n                                        HideSeen.sendFakeReadResponse(param.args[1]);\n                                        param.setResult(null);\n                                        return;\n                                    }\n\n                                    if (ConfigManager.hideTyping.isEnable() && HideTyping.isTypingRequest(object)) {\n                                        param.setResult(null);\n                                        return;\n                                    }\n\n                                    if (ConfigManager.hideStoryView.isEnable() && HideStoryRead.isReadStoriesRequest(object)) {\n                                        param.setResult(null);\n                                        return;\n                                    }\n\n                                    if (ConfigManager.hideProxySponsor.isEnable() && HideProxySponsor.isPromoDataRequest(object)) {\n                                        param.setResult(null);\n                                        return;\n                                    }\n\n                                    HideSeen.handleReadAfterSend(object);\n                                }\n                            } catch (Throwable e) {\n                                XposedBridge.log(e);\n                            }\n                        }\n                    }));\n                }\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HideOnline.java",
    "content": "package com.my.televip.features;\n\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.ActionBar.SimpleTextView;\nimport com.my.televip.virtuals.ui.ProfileActivity;\n\npublic class HideOnline {\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.PROFILE_ACTIVITY) != null) {\n\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.PROFILE_ACTIVITY),\n                            AutomationResolver.resolve(\"ProfileActivity\", \"updateProfileData\", AutomationResolver.ResolverType.Method),\n                            AutomationResolver.merge(AutomationResolver.resolveObject(\"updateProfileData\", new Class[]{boolean.class}),\n                                    new AbstractMethodHook() {\n                                        @Override\n                                        protected void afterMethod(MethodHookParam param) {\n                                            if (ConfigManager.hideOnline.isEnable()) {\n                                                final ProfileActivity profileActivity = new ProfileActivity(param.thisObject);\n\n                                                if (profileActivity.getUserId() != 0 && profileActivity.getUserId() == profileActivity.getBaseFragment().getUserConfig().getClientUserId()) {\n                                                    Object[] onlineTextViewArray = profileActivity.getOnlineTextView();\n\n                                                    if (onlineTextViewArray != null && onlineTextViewArray.length > 1) {\n\n                                                        SimpleTextView simpleTextView = new SimpleTextView(onlineTextViewArray[1]);\n\n                                                        if (simpleTextView.getSimpleTextView() != null) {\n                                                            simpleTextView.setText(Translator.get(Keys.UserOffline));\n                                                        }\n                                                    }\n                                                }\n                                            }\n                                        }\n                                    })\n                    );\n                }\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HidePhone.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.messenger.UserConfig;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\npublic class HidePhone {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.USER_CONFIG) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.USER_CONFIG), AutomationResolver.resolve(\"UserConfig\", \"getClientUserId\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.hidePhone.isEnable()) {\n                                UserConfig userConfig = new UserConfig(param.thisObject);\n                                if (userConfig.getCurrentUser().getUser() != null) {\n                                    TLRPC.User user = userConfig.getCurrentUser();\n                                    if (user.getPhone() != null) {\n                                        user.setPhone(null);\n                                    }\n                                }\n                            }\n                        }\n                    });\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HidePinnedMessages.java",
    "content": "package com.my.televip.features;\n\nimport android.view.View;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.ui.ChatActivity;\n\npublic class HidePinnedMessages {\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                if (ClassLoad.getClass(ClassNames.CHAT_ACTIVITY) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY),\n                            AutomationResolver.resolve(\"ChatActivity\", \"createPinnedMessageView\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                                @Override\n                                protected void afterMethod(MethodHookParam param) {\n                                    if (ConfigManager.hidePinnedMessages.isEnable()) {\n                                        View button = new ChatActivity(param.thisObject).getPinnedMessageView();\n                                        if (button != null && button.getVisibility() != View.GONE)\n                                            button.setVisibility(View.GONE);\n                                    }\n                                }\n                            });\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"updatePinnedMessageView\", AutomationResolver.ResolverType.Method), boolean.class, int.class, new AbstractMethodHook() {\n                        @Override\n                        protected void afterMethod(MethodHookParam param) {\n                            if (ConfigManager.hidePinnedMessages.isEnable()) {\n                                View button = new ChatActivity(param.thisObject).getPinnedMessageView();\n                                if (button != null && button.getVisibility() != View.GONE)\n                                    button.setVisibility(View.GONE);\n                            }\n                        }\n                    });\n                }\n            }\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HideProxySponsor.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.virtuals.messenger.MessagesController;\n\npublic class HideProxySponsor {\n\n    public static boolean isPromoDataRequest(Object object){\n        return object.getClass().getName().contains(\"TL_help_getPromoData\");\n    }\n\n    public static void removePromoDialog() {\n        if (MessagesController.getGlobalMainSettings() == null) return;\n        MessagesController.getGlobalMainSettings().edit().remove(\"proxy_dialog\").remove(\"proxyDialogAddress\").remove(\"nextPromoInfoCheckTime\").apply();\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HideSeen.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Callback.IntCallback;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.application.AndroidUtilities;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.SQLite.SQLiteCursor;\nimport com.my.televip.virtuals.messenger.MessagesController;\nimport com.my.televip.virtuals.messenger.MessagesStorage;\nimport com.my.televip.virtuals.messenger.UserConfig;\nimport com.my.televip.virtuals.messenger.Utilities;\nimport com.my.televip.virtuals.tgnet.ConnectionsManager;\nimport com.my.televip.virtuals.tgnet.RequestDelegate;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class HideSeen {\n\n\n    public static Object TLChannels_readHistory;\n    public static Object TLMessages_readHistory;\n\n    public static void sendFakeReadResponse(Object onCompleteOrig) {\n        try {\n            TLRPC.TL_messages_affectedMessages fakeRes = new TLRPC.TL_messages_affectedMessages();\n            fakeRes.setPts(-1);\n            fakeRes.setPtsCount(0);\n            RequestDelegate onComplete = new RequestDelegate(onCompleteOrig);\n            Utilities.getStageQueue().postRunnable(() -> {\n                try {\n                    if (onComplete.requestDelegate != null) {\n                        onComplete.run(fakeRes.getTL_messages_affectedMessages(), null);\n                    }\n                } catch (Throwable e) {\n                    Logger.e(e);\n                }\n            });\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    public static boolean isTLMessagesReadHistoryRequest(Object object) {\n        return object.getClass().getName().contains(\"TL_messages_readHistory\");\n    }\n\n    public static boolean isTLChannelsReadHistoryRequest(Object object) {\n        return object.getClass().getName().contains(\"TL_channels_readHistory\");\n    }\n\n    public static boolean isReadMessageRequest(Object object) {\n        return object.getClass().getName().contains(\"TL_messages_readHistory\") ||\n                object.getClass().getName().contains(\"TL_messages_readEncryptedHistory\") ||\n                object.getClass().getName().contains(\"TL_messages_readDiscussion\") ||\n                object.getClass().getName().contains(\"TL_messages_readMessageContents\") ||\n                object.getClass().getName().contains(\"TL_channels_readMessageContents\") ||\n                object.getClass().getName().contains(\"TL_channels_readHistory\");\n    }\n\n    public static void saveReadHistory(Object object) {\n        if (HideSeen.TLChannels_readHistory == null && HideSeen.isTLChannelsReadHistoryRequest(object)) {\n            HideSeen.TLChannels_readHistory = object;\n        } else if (HideSeen.TLMessages_readHistory == null && HideSeen.isTLMessagesReadHistoryRequest(object)) {\n            HideSeen.TLMessages_readHistory = object;\n        }\n    }\n\n    public static void handleReadAfterSend(Object object) {\n        try {\n            if (ConfigManager.hideSeen.isEnable() && ConfigManager.markReadAfterSend.isEnable()) {\n                TLRPC.InputPeer peer = extractPeerFromSendObject(object);\n\n                if (peer != null && peer.inputPeer != null) {\n                    Long dialogId = getDialogId(peer);\n                    MessagesStorage messagesStorage = getMessagesStorage();\n                    messagesStorage.getStorageQueue().postRunnable(() ->\n                            getDialogMaxMessageId(messagesStorage, dialogId, (param -> markReadOnServer(param, peer))));\n                }\n            }\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    public static void getDialogMaxMessageId(MessagesStorage messagesStorage, long dialog_id, IntCallback callback) {\n        messagesStorage.getStorageQueue().postRunnable(() -> {\n            SQLiteCursor cursor = null;\n            int[] max = new int[1];\n            try {\n                cursor = messagesStorage.getDatabase().queryFinalized(\"SELECT MAX(mid) FROM messages_v2 WHERE uid = \" + dialog_id);\n                if (cursor.next()) {\n                    max[0] = cursor.intValue(0);\n                }\n            } catch (Throwable e) {\n                Logger.e(e);\n            } finally {\n                if (cursor != null) {\n                    cursor.dispose();\n                }\n            }\n            AndroidUtilities.runOnUIThread(() -> callback.run(max[0]));\n        });\n    }\n\n    public static boolean isReadMessages = false;\n\n    public static void markReadOnServer(int messageId, TLRPC.InputPeer peer) {\n        try {\n            Object req;\n\n            if (peer.inputPeer.getClass().getName().contains(\"TL_inputPeerChannel\")) {\n                TLRPC.TL_channels_readHistory request;\n                if (!ClientChecker.check(ClientChecker.ClientType.Nagram)) {\n                    request = new TLRPC.TL_channels_readHistory();\n                    request.setChannel(MessagesController.getInputChannel(peer));\n                } else {\n                    request = new TLRPC.TL_channels_readHistory(TLChannels_readHistory);\n                    request.setChannel(MessagesController.getInputChannel(getDialogId(peer)));\n                }\n                request.setMax_id(messageId);\n                req = request.getTL_channels_readHistory();\n            } else {\n                TLRPC.TL_messages_readHistory request;\n                if (!ClientChecker.check(ClientChecker.ClientType.Nagram)) {\n                    request = new TLRPC.TL_messages_readHistory();\n                } else {\n                    request = new TLRPC.TL_messages_readHistory(TLMessages_readHistory);\n                }\n                request.setPeer(peer);\n                request.setMax_id(messageId);\n                req = request.getTL_messages_readHistory();\n            }\n\n            isReadMessages = true;\n            getConnectionsManager().sendRequest(req, RequestDelegate.run((response, error) -> {\n                if (error == null) {\n                    if (ClassLoad.getClass(ClassNames.TL_MESSAGES_AFFECTED).isInstance(response)) {\n                        TLRPC.TL_messages_affectedMessages res = new TLRPC.TL_messages_affectedMessages(response);\n                        if (!ClientChecker.check(ClientChecker.ClientType.Nagram)) {\n                            getMessagesController().processNewDifferenceParams(-1, res.getPts(), -1, res.getPtsCount());\n                        } else {\n                            getMessagesController().processNewDifferenceParams(res.getPts(), -1, res.getPtsCount());\n                        }\n                    }\n\n                }\n            }));\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    private static TLRPC.InputPeer extractPeerFromSendObject(Object object) {\n        if (object.getClass().getName().contains(\"TL_messages_sendMessage\") ||\n                object.getClass().getName().contains(\"TL_messages_sendMedia\") ||\n                object.getClass().getName().contains(\"TL_messages_sendReaction\") ||\n                object.getClass().getName().contains(\"TL_messages_sendPaidReaction\") ||\n                object.getClass().getName().contains(\"TL_messages_sendMultiMedia\")) {\n            return new TLRPC.InputPeer(getPeer(object));\n        }\n        return null;\n    }\n\n    private static Object getPeer(Object msg) {\n        return XposedHelpers.getObjectField(msg, \"peer\");\n    }\n\n    public static Long getDialogId(TLRPC.InputPeer peer) {\n        long dialogId;\n        if (peer.getChat_id() != 0) {\n            dialogId = -peer.getChat_id();\n        } else if (peer.getChannel_id() != 0) {\n            dialogId = -peer.getChannel_id();\n        } else {\n            dialogId = peer.getUser_id();\n        }\n\n        return dialogId;\n    }\n\n    public static MessagesStorage getMessagesStorage() {\n        return MessagesStorage.getInstance(UserConfig.getSelectedAccount());\n    }\n\n    public static ConnectionsManager getConnectionsManager() {\n        return ConnectionsManager.getInstance(UserConfig.getSelectedAccount());\n    }\n\n    public static MessagesController getMessagesController() {\n        return MessagesController.getInstance(UserConfig.getSelectedAccount());\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HideStoryRead.java",
    "content": "package com.my.televip.features;\n\npublic class HideStoryRead {\n\n    public static boolean isReadStoriesRequest(Object object){\n        return object.getClass().getName().contains(\"TL_stories_readStories\") ||\n                object.getClass().getName().contains(\"TL_stories_incrementStoryViews\");\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HideTyping.java",
    "content": "package com.my.televip.features;\n\npublic class HideTyping {\n\n    public static boolean isTypingRequest(Object object){\n        return object.getClass().getName().contains(\"TL_messages_setTyping\") ||\n                object.getClass().getName().contains(\"TL_messages_setEncryptedTyping\");\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/HideUpdateApp.java",
    "content": "package com.my.televip.features;\n\nimport android.app.Activity;\nimport android.content.SharedPreferences;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XC_MethodReplacement;\n\npublic class HideUpdateApp {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                SharedPreferences preferences = ClassLoad.getApplicationContext().getSharedPreferences(\"mainconfig\", Activity.MODE_PRIVATE);\n                preferences.edit().remove(\"appUpdate\").apply();\n                preferences.edit().remove(\"appUpdateCheckTime\").apply();\n                preferences.edit().remove(\"appUpdateBuild\").apply();\n\n                if (ClassLoad.getClass(ClassNames.SHARED_CONFIG) != null) {\n\n                    HMethod.hookMethod(\n                            ClassLoad.getClass(ClassNames.SHARED_CONFIG),\n                            AutomationResolver.resolve(\"SharedConfig\", \"setNewAppVersionAvailable\", AutomationResolver.ResolverType.Method),\n                            AutomationResolver.merge(AutomationResolver.resolveObject(\"setNewAppVersionAvailable\", new Class[]{ClassLoad.getClass(ClassNames.TL_HELP_APP_UPDATE)}), new XC_MethodReplacement() {\n                                @Override\n                                protected Object replaceHookedMethod(MethodHookParam param) {\n                                    return false;\n                                }\n                            }));\n\n                    HMethod.hookMethod(\n                            ClassLoad.getClass(ClassNames.SHARED_CONFIG),\n                            AutomationResolver.resolve(\"SharedConfig\", \"isAppUpdateAvailable\", AutomationResolver.ResolverType.Method), new XC_MethodReplacement() {\n                                @Override\n                                protected Object replaceHookedMethod(MethodHookParam param) {\n                                    return false;\n                                }\n                            });\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/PreventMedia.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.ui.SecretMediaViewer;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class PreventMedia {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.CHAT_ACTIVITY) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"sendSecretMessageRead\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"sendSecretMessageRead\", new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), boolean.class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.preventMedia.isEnable()) param.setResult(null);\n                        }\n                    }));\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"sendSecretMediaDelete\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"sendSecretMediaDelete\", new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT)}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.preventMedia.isEnable()) param.setResult(null);\n                        }\n                    }));\n                }\n\n                if (ClassLoad.getClass(ClassNames.SECRET_MEDIA_VIEWER) != null) {\n                    SecretMediaViewer.openMedia();\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.SECRET_MEDIA_VIEWER), AutomationResolver.resolve(\"SecretMediaViewer\", \"closePhoto\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"closePhoto\", new Class[]{boolean.class, boolean.class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.preventMedia.isEnable()) {\n                                Object thisObject = param.thisObject;\n                                XposedHelpers.setObjectField(thisObject, AutomationResolver.resolve(\"SecretMediaViewer\", \"onClose\", AutomationResolver.ResolverType.Field), null);\n                            }\n                        }\n                    }));\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/RemovesContentSaving.java",
    "content": "package com.my.televip.features;\n\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\n\npublic class RemovesContentSaving {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), AutomationResolver.resolve(\"MessagesController\", \"isChatNoForwards\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"isChatNoForwards\", new Class[]{ClassLoad.getClass(ClassNames.TLRPC_CHAT)}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.removesContentSaving.isEnable())\n                                param.setResult(false);\n                        }\n                    }));\n                }\n\n                if (ClassLoad.getClass(ClassNames.CHAT_ACTIVITY) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"hasSelectedNoforwardsMessage\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.removesContentSaving.isEnable())\n                                param.setResult(false);\n                        }\n                    });\n                }\n\n                if (ClassLoad.getClass(ClassNames.MESSAGE_OBJECT) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), AutomationResolver.resolve(\"MessageObject\", \"canForwardMessage\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.removesContentSaving.isEnable())\n                                param.setResult(true);\n                        }\n                    });\n                }\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/SaveEditsHistory.java",
    "content": "package com.my.televip.features;\n\nimport android.content.Context;\nimport android.text.method.ScrollingMovementMethod;\nimport android.widget.ScrollView;\nimport android.widget.TextView;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.Database.MessageDatabase;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.ActionBar.AlertDialog;\nimport com.my.televip.virtuals.SettingsIconResolver;\nimport com.my.televip.virtuals.SQLite.SQLiteCursor;\nimport com.my.televip.virtuals.SQLite.SQLiteDatabase;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.messenger.BaseController;\nimport com.my.televip.virtuals.messenger.MessageObject;\nimport com.my.televip.virtuals.messenger.MessagesStorage;\nimport com.my.televip.virtuals.messenger.UserConfig;\nimport com.my.televip.virtuals.tgnet.NativeByteBuffer;\nimport com.my.televip.virtuals.tgnet.TLRPC;\nimport com.my.televip.virtuals.ui.ChatActivity;\n\nimport java.util.ArrayList;\nimport java.util.Locale;\n\npublic class SaveEditsHistory {\n\n    private static MessageDatabase messageDatabase;\n\n    public static boolean isEnable = false;\n\n    public static void init(Context context) {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                messageDatabase = new MessageDatabase(context);\n\n                if (ClassLoad.getClass(ClassNames.CHAT_ACTIVITY) != null) {\n\n                    HMethod.hookMethod(\n                            ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"fillMessageMenu\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"fillMessageMenu\", new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), ArrayList.class, ArrayList.class, ArrayList.class}), new AbstractMethodHook() {\n                                @Override\n                                protected void afterMethod(MethodHookParam param) {\n                                    if (ConfigManager.saveEditsHistory.isEnable()) {\n                                        ChatActivity chatActivity = new ChatActivity(param.thisObject);\n\n                                        if (chatActivity.getSelectedObject() != null) {\n                                            MessageObject messageObject = chatActivity.getSelectedObject();\n\n                                            if (messageObject.getMessageOwner() != null) {\n\n                                                TLRPC.Message message = messageObject.getMessageOwner();\n                                                if (message != null && message.getFrom_id() != null && message.getID() > 0) {\n\n                                                    long user_id = message.getFrom_id().getUser_id();\n                                                    long chat_id = message.getFrom_id().getChat_id();\n                                                    long channel_id = message.getFrom_id().getChannel_id();\n                                                    long dialogId = 0;\n\n                                                    if (user_id != 0) {\n                                                        dialogId = user_id;\n                                                    } else if (chat_id != 0) {\n                                                        dialogId = chat_id;\n                                                    } else if (channel_id != 0) {\n                                                        dialogId = channel_id;\n                                                    }\n\n                                                    if (dialogId != 0 && messageDatabase.getMessage(dialogId, message.getID()) != null) {\n\n                                                        ArrayList<Integer> icons;\n                                                        ArrayList<CharSequence> items;\n                                                        ArrayList<Integer> options;\n\n                                                        if (ClientChecker.check(ClientChecker.ClientType.Telegraph)) {\n                                                            icons = (ArrayList<Integer>) param.args[2];\n                                                            items = (ArrayList<CharSequence>) param.args[3];\n                                                            options = (ArrayList<Integer>) param.args[4];\n                                                        } else {\n                                                            icons = (ArrayList<Integer>) param.args[1];\n                                                            items = (ArrayList<CharSequence>) param.args[2];\n                                                            options = (ArrayList<Integer>) param.args[3];\n                                                        }\n\n                                                        items.add(Translator.get(Keys.EditsHistory));\n                                                        options.add(8353847);\n                                                        if (!ClientChecker.check(ClientChecker.ClientType.Nagram))\n                                                            icons.add(SettingsIconResolver.getIconSettings());\n                                                    }\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }));\n\n                    HMethod.hookMethod(\n                            ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"processSelectedOption\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"processSelectedOption\", new Class[]{int.class}), new AbstractMethodHook() {\n                                @Override\n                                protected void beforeMethod(MethodHookParam param) {\n                                    if (ConfigManager.saveEditsHistory.isEnable()) {\n                                        int option = (int) param.args[0];\n                                        ChatActivity chatActivity = new ChatActivity(param.thisObject);\n\n                                        if (option == 8353847) {\n\n                                            if (chatActivity.getSelectedObject() != null) {\n                                                MessageObject messageObject = chatActivity.getSelectedObject();\n\n                                                if (messageObject.getMessageOwner() != null) {\n\n                                                    TLRPC.Message message = messageObject.getMessageOwner();\n                                                    if (message.message != null && message.getFrom_id() != null && message.getID() > 0 && message.getMessage() != null) {\n\n                                                        if (getDialogId(message.getFrom_id()) != 0 & messageDatabase.searchMessage(getDialogId(message.getFrom_id()), message.getID())) {\n\n                                                            AlertDialog alertDialog = new AlertDialog(context);\n                                                            alertDialog.setTitle(Translator.get(Keys.EditsHistory));\n\n                                                            TextView textView = new TextView(context);\n\n                                                            int maxMsgCount = messageDatabase.getMaxMessageCount(getDialogId(message.getFrom_id()), message.getID());\n\n                                                            StringBuilder builder = new StringBuilder();\n\n                                                            if (maxMsgCount > 0) {\n\n                                                                for (int i = 1; i <= maxMsgCount; i++) {\n\n                                                                    String msg = messageDatabase.getMessage(getDialogId(message.getFrom_id()), message.getID(), i);\n                                                                    String messageEdited = messageDatabase.getMessageEdited(getDialogId(message.getFrom_id()), message.getID(), i);\n\n                                                                    if (msg != null && messageEdited != null) {\n                                                                        builder.append(Translator.get(Keys.Message)).append(i).append(Translator.get(Keys.Edited)).append(messageEdited).append(\"\\n\");\n                                                                        builder.append(msg).append(\"\\n\");\n                                                                    }\n                                                                }\n                                                            } else {\n                                                                builder.append(messageDatabase.getMessage(getDialogId(message.getFrom_id()), message.getID()));\n                                                            }\n\n                                                            textView.setText(builder.toString());\n                                                            textView.setPadding(32, 32, 32, 32);\n                                                            textView.setTextSize(16);\n                                                            textView.setTextColor(Theme.getTextColor());\n                                                            textView.setMovementMethod(new ScrollingMovementMethod());\n                                                            textView.setTextIsSelectable(true);\n\n                                                            ScrollView scrollView = new ScrollView(context);\n                                                            scrollView.addView(textView);\n                                                            alertDialog.setView(scrollView);\n                                                            alertDialog.setPositiveButton(Translator.get(Keys.Done), null);\n                                                            alertDialog.show();\n                                                        }\n                                                    }\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }));\n                }\n\n                if (ClassLoad.getClass(ClassNames.MESSAGES_STORAGE) != null) {\n                    HMethod.hookMethod(\n                            ClassLoad.getClass(ClassNames.MESSAGES_STORAGE), AutomationResolver.resolve(\"MessagesStorage\", \"putMessages\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"putMessages\", new Class[]{ClassLoad.getClass(ClassNames.TL_MESSAGES_MESSAGES), long.class, int.class, int.class, boolean.class, int.class, long.class}), new AbstractMethodHook() {\n                                @Override\n                                protected void beforeMethod(MethodHookParam param) {\n                                    if (ConfigManager.saveEditsHistory.isEnable()) {\n                                        int load_type = (int) param.args[2];\n                                        if (ClientChecker.check(ClientChecker.ClientType.Nagram)) {\n                                            load_type = (int) param.args[0];\n                                        }\n\n                                        if (load_type == -2) {\n                                            Object messagesStorageObject = param.thisObject;\n                                            Object messagesObject = param.args[0];\n                                            if (ClientChecker.check(ClientChecker.ClientType.Nagram)) {\n                                                messagesObject = param.args[5];\n                                            }\n\n                                            if (messagesObject != null) {\n                                                MessagesStorage messagesStorage = new MessagesStorage(messagesStorageObject);\n\n                                                TLRPC.messages_Messages messages = new TLRPC.messages_Messages(messagesObject);\n\n                                                int count = messages.getMessages().size();\n\n                                                BaseController baseController = new BaseController(messagesStorageObject);\n                                                UserConfig userConfig = baseController.getUserConfig();\n                                                SQLiteDatabase sqLiteDatabase = messagesStorage.getDatabase();\n                                                for (int a = 0; a < count; a++) {\n\n                                                    TLRPC.Message message = new TLRPC.Message(messages.getMessages().get(a));\n\n                                                    int id = message.getID();\n                                                    SQLiteCursor cursor = sqLiteDatabase.queryFinalized(String.format(Locale.US, \"SELECT mid, data, ttl, mention, read_state, send_state, custom_params FROM messages_v2 WHERE mid = %d AND uid = %d\", id, MessageObject.getDialogId(message)));\n\n                                                    if (cursor.next()) {\n                                                        NativeByteBuffer data = cursor.byteBufferValue(1);\n\n                                                        if (data.nativeByteBuffer != null) {\n\n                                                            TLRPC.Message oldMessage = TLRPC.Message.TLdeserialize(data, data.readInt32(false), false);\n\n                                                            oldMessage.readAttachPath(data, userConfig.getClientUserId());\n                                                            data.reuse();\n                                                            if (oldMessage.getMessage() != null && message.getMessage() != null) {\n                                                                if (oldMessage.getFrom_id() != null && (!oldMessage.getMessage().equals(message.getMessage()))) {\n                                                                    if (getDialogId(message.getFrom_id()) != 0) {\n                                                                        messageDatabase.addMessage(getDialogId(message.getFrom_id()), oldMessage.getID(), oldMessage.getMessage());\n                                                                    }\n                                                                }\n                                                            }\n                                                        }\n                                                    }\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }));\n                }\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n\n    private static long getDialogId(TLRPC.Peer peer) {\n        long user_id = peer.getUser_id();\n        long chat_id = peer.getChat_id();\n        long channel_id = peer.getChannel_id();\n        long dialogId = 0;\n\n        if (user_id != 0) {\n            dialogId = user_id;\n        } else if (chat_id != 0) {\n            dialogId = chat_id;\n        } else if (channel_id != 0) {\n            dialogId = channel_id;\n        }\n        return dialogId;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/SecretMediaSave.java",
    "content": "package com.my.televip.features;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.ContextWrapper;\nimport android.view.View;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.messenger.MessageObject;\nimport com.my.televip.virtuals.tgnet.TLRPC;\nimport com.my.televip.virtuals.ui.Cells.ChatMessageCell;\nimport com.my.televip.virtuals.ui.PhotoViewer;\nimport com.my.televip.virtuals.ui.SecretMediaViewer;\n\nimport java.io.File;\n\npublic class SecretMediaSave {\n\n    public static boolean isEnable = false;\n\n    public static long id;\n    public static File pathImage;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                if (ClassLoad.getClass(ClassNames.MESSAGE_OBJECT) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), AutomationResolver.resolve(\"MessageObject\", \"isSecret\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            if (ConfigManager.secretMediaSave.isEnable()) param.setResult(false);\n                        }\n                    });\n                }\n                if (ClassLoad.getClass(ClassNames.CHAT_MESSAGE_CELL_DELEGATE) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_MESSAGE_CELL_DELEGATE), AutomationResolver.resolve(\"ChatActivity$ChatMessageCellDelegate\", \"didPressImage\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"didPressImage\", new Class[]{ClassLoad.getClass(ClassNames.CHAT_MESSAGE_CELL), float.class, float.class, boolean.class}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            try {\n                                if (ConfigManager.secretMediaSave.isEnable() && param.args[0] != null) {\n                                    ChatMessageCell messageCell = new ChatMessageCell(param.args[0]);\n                                    if (messageCell.getChatMessageCell() != null) {\n                                        MessageObject messageObject = messageCell.getMessageObject();\n                                        if (messageObject.getMessageObject() != null) {\n                                            TLRPC.Message message = messageObject.getMessageOwner();\n                                            if (message.getTtl() > 0) message.setTtl(0);\n                                        }\n                                        bindPhotoViewerToActivity(messageCell);\n                                    }\n                                }\n                            } catch (Throwable e) {\n                                Logger.e(e);\n                            }\n                        }\n                    }));\n                }\n\n                if (ClassLoad.getClass(ClassNames.FILE_LOADER) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.FILE_LOADER), AutomationResolver.resolve(\"FileLoader\", \"getPathToMessage\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"getPathToMessage\", new Class[]{ClassLoad.getClass(ClassNames.TL_MESSAGE)}), new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            try {\n                                if (ConfigManager.secretMediaSave.isEnable() && param.args[0] != null && pathImage != null) {\n                                    TLRPC.Message message = new TLRPC.Message(param.args[0]);\n                                    if (message.getID() == id) {\n                                        param.setResult(pathImage);\n                                    }\n                                }\n                            } catch (Throwable e) {\n                                Logger.e(e);\n                            }\n                        }\n                    }));\n                }\n\n\n                if (ConfigManager.secretMediaSave.isEnable()) SecretMediaViewer.openMedia();\n            }\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n    }\n\n    private static void bindPhotoViewerToActivity(ChatMessageCell cell) {\n        try {\n            if (!(cell.getChatMessageCell() instanceof View)) return;\n            View view = (View) cell.getChatMessageCell();\n            Context context = view.getContext();\n            Activity activity = extractActivityFromContext(context);\n            if (activity == null) return;\n\n            PhotoViewer.getInstance().setParentActivity(activity);\n        } catch (Throwable ignored) {}\n    }\n\n    private static Activity extractActivityFromContext(Context context) {\n        while (context instanceof ContextWrapper) {\n            if (context instanceof Activity) return (Activity) context;\n            context = ((ContextWrapper) context).getBaseContext();\n        }\n        return null;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/ShowDeletedMessages.java",
    "content": "package com.my.televip.features;\n\nimport android.os.Handler;\nimport android.os.HandlerThread;\nimport android.os.Looper;\nimport android.os.Process;\nimport android.text.TextUtils;\nimport android.util.SparseArray;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.Utils;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.structs.DeletedMessageInfo;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.messenger.MessageObject;\nimport com.my.televip.virtuals.messenger.NotificationCenter;\nimport com.my.televip.virtuals.messenger.UserConfig;\nimport com.my.televip.virtuals.tgnet.TLRPC;\nimport com.my.televip.virtuals.ui.Cells.ChatMessageCell;\n\nimport java.lang.reflect.Method;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.concurrent.CopyOnWriteArrayList;\nimport java.util.concurrent.CopyOnWriteArraySet;\n\nimport de.robv.android.xposed.XposedBridge;\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ShowDeletedMessages {\n    private static final Handler storage = new Handler(makeLooper(\"Storage\"));\n\n    private static final CopyOnWriteArraySet<DeletedMessageInfo> deletedMessageInfos = new CopyOnWriteArraySet<>();\n    private static final CopyOnWriteArraySet<DeletedMessageInfo> shouldDeletedMessageInfo = new CopyOnWriteArraySet<>();\n    private static final CopyOnWriteArraySet<DeletedMessageInfo> shouldDeletedMessageInfo2 = new CopyOnWriteArraySet<>();\n\n    public static final int FLAG_DELETED = 1 << 31;\n\n    private static boolean isDeleteMessage = false;\n\n    public static final boolean DEBUG_MODE = false;\n\n    public static boolean isEnable = false;\n\n        public static Looper makeLooper(String str) {\n        HandlerThread handlerThread = new HandlerThread(\"TeleVip - \" + str, Process.THREAD_PRIORITY_DISPLAY);\n        handlerThread.start();\n        return handlerThread.getLooper();\n    }\n\n    public static void markMessagesDeleted(Object thisMessagesStorage, final long dialogId, ArrayList<Integer> delMsg) {\n            try {\n                deletedMessageInfos.add(new DeletedMessageInfo(UserConfig.getSelectedAccount(), dialogId, delMsg));\n                storage.post(() -> {\n                    Object db = XposedHelpers.callMethod(thisMessagesStorage, AutomationResolver.resolve(\"MessagesStorage\", \"getDatabase\", AutomationResolver.ResolverType.Method));\n                    String query = \"SELECT data,mid,uid \" +\n                            \"FROM messages_v2 \" +\n                            \"WHERE \" + (dialogId == 0 ? \"is_channel\" : \"uid\") + \" = \" + dialogId + \" AND mid IN (\" + TextUtils.join(\",\", delMsg) + \");\";\n\n                    String update = \"UPDATE messages_v2 SET data = ? WHERE uid = ? AND mid = ?\";\n                    Object cursor = XposedHelpers.callMethod(db, AutomationResolver.resolve(\"SQLiteDatabase\", \"queryFinalized\", AutomationResolver.ResolverType.Method), new Class<?>[]{String.class, Object[].class}, query, new Object[]{});\n                    Object state = XposedHelpers.callMethod(db, AutomationResolver.resolve(\"SQLiteDatabase\", \"executeFast\", AutomationResolver.ResolverType.Method), new Class<?>[]{String.class}, update);\n\n                    while ((boolean) XposedHelpers.callMethod(cursor, AutomationResolver.resolve(\"SQLiteCursor\", \"next\", AutomationResolver.ResolverType.Method))) {\n                        Object data = XposedHelpers.callMethod(cursor, AutomationResolver.resolve(\"SQLiteCursor\", \"byteBufferValue\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class}, 0);\n                        int mid = (int) XposedHelpers.callMethod(cursor, AutomationResolver.resolve(\"SQLiteCursor\", \"intValue\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class}, 1);\n                        long lastDialogId = (long) XposedHelpers.callMethod(cursor, AutomationResolver.resolve(\"SQLiteCursor\", \"longValue\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class}, 2);\n\n                        XposedHelpers.callMethod(data, \"position\", new Class<?>[]{int.class}, 4);\n                        int flags = (int) XposedHelpers.callMethod(data, \"readInt32\", new Class<?>[]{boolean.class}, true);\n                        flags |= FLAG_DELETED;\n                        XposedHelpers.callMethod(data, \"position\", new Class<?>[]{int.class}, 4);\n                        XposedHelpers.callMethod(data, \"writeInt32\", new Class<?>[]{int.class}, flags);\n                        XposedHelpers.callMethod(data, \"position\", new Class<?>[]{int.class}, 0);\n\n                        XposedHelpers.callMethod(state, AutomationResolver.resolve(\"SQLitePreparedStatement\", \"requery\", AutomationResolver.ResolverType.Method));\n                        XposedHelpers.callMethod(state, AutomationResolver.resolve(\"SQLitePreparedStatement\", \"bindByteBuffer\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class, data.getClass()}, 1, data);\n                        XposedHelpers.callMethod(state, AutomationResolver.resolve(\"SQLitePreparedStatement\", \"bindLong\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class, long.class}, 2, lastDialogId);\n                        XposedHelpers.callMethod(state, AutomationResolver.resolve(\"SQLitePreparedStatement\", \"bindInteger\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class, int.class}, 3, mid);\n                        XposedHelpers.callMethod(state, AutomationResolver.resolve(\"SQLitePreparedStatement\", \"step\", AutomationResolver.ResolverType.Method));\n\n                        XposedHelpers.callMethod(data, \"reuse\");\n                    }\n                    XposedHelpers.callMethod(cursor, AutomationResolver.resolve(\"SQLiteCursor\", \"dispose\", AutomationResolver.ResolverType.Method));\n                    XposedHelpers.callMethod(state, AutomationResolver.resolve(\"SQLitePreparedStatement\", \"dispose\", AutomationResolver.ResolverType.Method));\n                });\n            } catch (Throwable e){\n                Logger.e(e);\n            }\n    }\n\n    public static void markMessagesDeletedForController(Object thisMessagesController, long dialogId, ArrayList<Integer> delMsg) {\n        markMessagesDeleted(XposedHelpers.callMethod(thisMessagesController, \"getMessagesStorage\"), dialogId, delMsg);\n    }\n\n    private static DeletedMessageInfo isShouldDeletedMessage(long channelID, int messageId) {\n        for (DeletedMessageInfo deletedMessagesId : shouldDeletedMessageInfo)\n            if (deletedMessagesId.getSelectedAccount() == UserConfig.getSelectedAccount() && deletedMessagesId.getChannelID() == channelID && deletedMessagesId.getMessageIds().contains(messageId))\n                return deletedMessagesId;\n        return null;\n    }\n\n    private static DeletedMessageInfo isDeletedMessage(long channelID, int messageId) {\n        for (DeletedMessageInfo deletedMessagesId : deletedMessageInfos)\n            if (deletedMessagesId.getSelectedAccount() == UserConfig.getSelectedAccount() && deletedMessagesId.getChannelID() == channelID && deletedMessagesId.getMessageIds().contains(messageId))\n                return deletedMessagesId;\n        return null;\n    }\n\n    private static DeletedMessageInfo isShouldDeletedMessage2(long channelID, int messageId) {\n        for (DeletedMessageInfo deletedMessagesId : shouldDeletedMessageInfo2)\n            if (deletedMessagesId.getSelectedAccount() == UserConfig.getSelectedAccount() && deletedMessagesId.getChannelID() == channelID && deletedMessagesId.getMessageIds().contains(messageId))\n                return deletedMessagesId;\n        return null;\n    }\n\n    private static void addShouldDeletedMessage(long channelID, Integer messageId) {\n            try {\n                boolean needInit = true;\n                DeletedMessageInfo info = null;\n                for (DeletedMessageInfo deletedMessagesId : shouldDeletedMessageInfo) {\n                    if (deletedMessagesId.getSelectedAccount() == UserConfig.getSelectedAccount() && deletedMessagesId.getChannelID() == channelID) {\n                        info = deletedMessagesId;\n                        needInit = false;\n                        break;\n                    }\n                }\n                if (needInit)\n                    shouldDeletedMessageInfo.add(new DeletedMessageInfo(UserConfig.getSelectedAccount(), channelID, messageId));\n                else {\n                    if (!info.getMessageIds().contains(messageId)) // No duplication\n                        info.insertMessageId(messageId);\n                }\n            } catch (Throwable e){\n                Logger.e(e);\n            }\n    }\n\n    private static void addShouldDeletedMessage2(long channelID, Integer messageId) {\n            try {\n                boolean needInit = true;\n                DeletedMessageInfo info = null;\n                for (DeletedMessageInfo deletedMessagesId : shouldDeletedMessageInfo2) {\n                    if (deletedMessagesId.getSelectedAccount() == UserConfig.getSelectedAccount() && deletedMessagesId.getChannelID() == channelID) {\n                        info = deletedMessagesId;\n                        needInit = false;\n                        break;\n                    }\n                }\n                if (needInit)\n                    shouldDeletedMessageInfo2.add(new DeletedMessageInfo(UserConfig.getSelectedAccount(), channelID, messageId));\n                else {\n                    if (!info.getMessageIds().contains(messageId)) // No duplication\n                        info.insertMessageId(messageId);\n                }\n            } catch (Throwable e){\n                Logger.e(e);\n            }\n    }\n\n\n    public static void init()\n    {\n        try {\n            if (ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER) != null) {\n                Method[] messagesControllerMethods = ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER).getDeclaredMethods();\n                List<String> methodNames = new ArrayList<>();\n\n                for (Method method : messagesControllerMethods)\n                    if (method.getParameterCount() == 5 && method.getParameterTypes()[0] == ArrayList.class && method.getParameterTypes()[1] == ArrayList.class && method.getParameterTypes()[2] == ArrayList.class && method.getParameterTypes()[3] == boolean.class && method.getParameterTypes()[4] == int.class)\n                        methodNames.add(method.getName());\n\n                if (methodNames.size() != 1)\n                    Logger.w(\"Failed to hook processUpdateArray! Reason: \" + (methodNames.isEmpty() ? \"No method found\" : \"Multiple methods found\") + \", \" + Utils.issue);\n                else {\n                    String methodName = methodNames.get(0);\n\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), methodName, ArrayList.class, ArrayList.class, ArrayList.class, boolean.class, int.class, new AbstractMethodHook() {\n                        @Override\n                        protected void beforeMethod(MethodHookParam param) {\n                            try {\n\n                                CopyOnWriteArrayList<Object> updates = new CopyOnWriteArrayList<>(Utils.castList(param.args[0], Object.class));\n                                if (!updates.isEmpty()) {\n                                    ArrayList<Object> newUpdates = new ArrayList<>();\n\n                                    for (Object item : updates) {\n                                        if (!item.getClass().equals(ClassLoad.getClass(ClassNames.TL_UPDATE_DELETE_CHANNEL_MESSAGES)) && !item.getClass().equals(ClassLoad.getClass(ClassNames.TL_UPDATE_DELETE_MESSAGES)))\n                                            newUpdates.add(item);\n\n\n                                        if (item.getClass().equals(ClassLoad.getClass(ClassNames.TL_UPDATE_DELETE_CHANNEL_MESSAGES))) {\n                                            TLRPC.TL_updateDeleteChannelMessages channelMessages = new TLRPC.TL_updateDeleteChannelMessages(item);\n\n                                            Object dialogMessage = XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve(\"MessagesController\", \"dialogMessage\", AutomationResolver.ResolverType.Field));\n\n                                            ArrayList<Object> dialogMessages = (ArrayList<Object>) XposedHelpers.callMethod(dialogMessage, AutomationResolver.resolve(\"LongSparseArray\", \"get\", AutomationResolver.ResolverType.Method), new Class<?>[]{int.class}, -channelMessages.getChannelID());\n                                            if (dialogMessages != null) {\n                                                for (final Object msgObj : dialogMessages) {\n                                                    TLRPC.Message owner = new MessageObject(msgObj).getMessageOwner();\n                                                    if (channelMessages.getMessages().contains(owner.getID())) {\n                                                        owner.setFlags(owner.getFlags() | FLAG_DELETED);\n                                                    }\n                                                }\n                                            }\n\n                                            markMessagesDeletedForController(param.thisObject, -channelMessages.getChannelID(), channelMessages.getMessages());\n                                        }\n                                        if (item.getClass().equals(ClassLoad.getClass(ClassNames.TL_UPDATE_DELETE_MESSAGES))) {\n\n                                            ArrayList<Integer> messages = new TLRPC.TL_updateDeleteMessages(item).getMessages();\n                                            SparseArray<Object> dialogMessages = (SparseArray<Object>) XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve(\"MessagesController\", \"dialogMessagesByIds\", AutomationResolver.ResolverType.Field));\n                                            for (int id : messages) {\n                                                Object msgObj = dialogMessages.get(id);\n                                                if (msgObj == null) {\n                                                    break;\n                                                } else {\n                                                    TLRPC.Message owner = new MessageObject(msgObj).getMessageOwner();\n                                                    owner.setFlags(owner.getFlags() | FLAG_DELETED);\n                                                }\n                                            }\n                                            markMessagesDeletedForController(param.thisObject, DeletedMessageInfo.NOT_CHANNEL, messages);\n                                        }\n\n                                        if (DEBUG_MODE && (item.getClass().equals(ClassLoad.getClass(ClassNames.TL_UPDATE_DELETE_MESSAGES)) || item.getClass().equals(ClassLoad.getClass(ClassNames.TL_UPDATE_DELETE_CHANNEL_MESSAGES))))\n                                            Logger.w(\"Protected message! event: \" + item.getClass());\n                                    }\n                                    param.args[0] = newUpdates;\n                                }\n\n                            } catch (Throwable throwable) {\n                                Logger.e(throwable);\n                            }\n                        }\n                    });\n                }\n            }\n\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n    }\n\n\n    public static void initProcessing() {\n            try {\n                if (!isEnable) {\n                    isEnable = true;\n\n                    if (ClassLoad.getClass(ClassNames.MESSAGES_STORAGE) != null) {\n\n                        HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGES_STORAGE), AutomationResolver.resolve(\"MessagesStorage\", \"markMessagesAsDeletedInternal\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"markMessagesAsDeletedInternal\", new Class[]{long.class, ArrayList.class, boolean.class, int.class, int.class}), new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                long dialogId = (long) param.args[0];\n                                if (ChatMessageCell.currentMessageObject != null && (System.currentTimeMillis() - ChatMessageCell.lastVisibleTime) < 4000) {\n                                    long objectId = ChatMessageCell.currentMessageObject.getDialogId();\n                                    if (objectId == dialogId)\n                                        return;\n                                }\n\n                                ArrayList<Integer> deletedMessages = new ArrayList<>();\n\n                                ArrayList<Integer> original = Utils.castList(param.args[1], Integer.class);\n\n                                if (original.isEmpty())\n                                    return;\n\n                                long channel_id = (long) param.args[0];\n                                if (channel_id > 0)\n                                    channel_id = 0;\n\n                                for (Integer msgId : original) {\n                                    DeletedMessageInfo shouldDeletedMessage = isShouldDeletedMessage(channel_id, msgId);\n                                    DeletedMessageInfo shouldDeletedMessage2 = isShouldDeletedMessage2(channel_id, msgId);\n                                    if (shouldDeletedMessage2 != null || isDeletedMessage(channel_id, msgId) == null) {\n                                        deletedMessages.add(msgId);\n                                        if (shouldDeletedMessage != null)\n                                            shouldDeletedMessageInfo.remove(shouldDeletedMessage);\n                                        if (shouldDeletedMessage2 != null)\n                                            shouldDeletedMessageInfo2.remove(shouldDeletedMessage2);\n                                    }\n                                }\n\n                                ArrayList<Integer> fork = new ArrayList<>(original);\n                                fork.removeAll(deletedMessages);\n                                if (!fork.isEmpty())\n                                    markMessagesDeleted(param.thisObject, channel_id, fork);\n\n                                if (deletedMessages.isEmpty())\n                                    param.setResult(null);\n                                else {\n\n                                    ((ArrayList<Integer>) param.args[1]).clear();\n\n                                    ((ArrayList<Integer>) param.args[1]).addAll(deletedMessages);\n                                }\n                            }\n                        }));\n\n                        HMethod.hookMethod(ClassLoad.getClass(ClassNames.MESSAGES_STORAGE), AutomationResolver.resolve(\"MessagesStorage\", \"updateDialogsWithDeletedMessagesInternal\", AutomationResolver.ResolverType.Method), long.class, long.class, ArrayList.class, ArrayList.class, new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                if (ConfigManager.showDeletedMessages.isEnable()) {\n                                    long dialogId = (long) param.args[0];\n                                    if (ChatMessageCell.currentMessageObject != null && (System.currentTimeMillis() - ChatMessageCell.lastVisibleTime) < 4000) {\n                                        long objectId = ChatMessageCell.currentMessageObject.getDialogId();\n                                        if (objectId == dialogId)\n                                            return;\n                                    }\n\n                                    long channelID = -((long) param.args[1]);\n                                    if (channelID > 0)\n                                        channelID = 0;\n\n                                    ArrayList<Integer> deletedMessages = new ArrayList<>();\n\n                                    Object msgIds = param.args[2];\n                                    if (msgIds == null)\n                                        return;\n\n                                    ArrayList<Integer> original = Utils.castList(msgIds, Integer.class);\n\n                                    if (original.isEmpty())\n                                        return;\n\n                                    for (Integer msgId : original)\n                                        if (isShouldDeletedMessage(channelID, msgId) == null)\n                                            if (isDeletedMessage(channelID, msgId) != null)\n                                                addShouldDeletedMessage(channelID, msgId);\n                                            else\n                                                deletedMessages.remove(msgId);\n                                        else if (isShouldDeletedMessage2(channelID, msgId) == null)\n                                            if (isDeletedMessage(channelID, msgId) != null)\n                                                addShouldDeletedMessage2(channelID, msgId);\n                                            else\n                                                deletedMessages.remove(msgId);\n                                        else\n                                            deletedMessages.add(msgId);\n\n                                    ArrayList<Integer> fork = new ArrayList<>(original);\n                                    fork.removeAll(deletedMessages);\n                                    if (!fork.isEmpty())\n                                        markMessagesDeleted(param.thisObject, channelID, fork);\n\n                                    if (deletedMessages.isEmpty())\n                                        param.setResult(null);\n                                    else {\n\n                                        ((ArrayList<Integer>) param.args[2]).clear();\n\n                                        ((ArrayList<Integer>) param.args[2]).addAll(deletedMessages);\n                                    }\n                                }\n                            }\n                        });\n\n                        Method updateDialogsWithDeletedMessagesMethod = null;\n                        for (Method method : ClassLoad.getClass(ClassNames.MESSAGES_STORAGE).getDeclaredMethods()) {\n                            if (method.getName().equals(AutomationResolver.resolve(\"MessagesStorage\", \"updateDialogsWithDeletedMessages\", AutomationResolver.ResolverType.Method)) && Objects.equals(method.getParameterTypes()[2], ArrayList.class)) {\n                                updateDialogsWithDeletedMessagesMethod = method;\n                                break;\n                            }\n                        }\n\n                        if (updateDialogsWithDeletedMessagesMethod == null) {\n                            Logger.w(\"Failed to hook updateDialogsWithDeletedMessages! Reason: No method found, \" + Utils.issue);\n                            return;\n                        }\n\n                        XposedBridge.hookMethod(updateDialogsWithDeletedMessagesMethod, new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                if (ConfigManager.showDeletedMessages.isEnable()) {\n                                    long dialogId = (long) param.args[0];\n                                    if (ChatMessageCell.currentMessageObject != null && (System.currentTimeMillis() - ChatMessageCell.lastVisibleTime) < 4000) {\n                                        long objectId = ChatMessageCell.currentMessageObject.getDialogId();\n                                        if (objectId == dialogId)\n                                            return;\n                                    }\n\n                                    long channelID = -((long) param.args[1]);\n                                    if (channelID > 0)\n                                        channelID = 0;\n\n                                    ArrayList<Integer> deletedMessages = new ArrayList<>();\n\n                                    Object msgIds = param.args[2];\n                                    if (msgIds == null)\n                                        return;\n\n                                    ArrayList<Integer> original = Utils.castList(msgIds, Integer.class);\n\n                                    if (original.isEmpty())\n                                        return;\n\n                                    for (Integer msgId : original) {\n                                        if (isShouldDeletedMessage(channelID, msgId) == null)\n                                            if (isDeletedMessage(channelID, msgId) != null)\n                                                addShouldDeletedMessage(channelID, msgId);\n                                            else\n                                                deletedMessages.remove(msgId);\n                                        else if (isShouldDeletedMessage2(channelID, msgId) == null)\n                                            if (isDeletedMessage(channelID, msgId) != null)\n                                                addShouldDeletedMessage2(channelID, msgId);\n                                            else\n                                                deletedMessages.remove(msgId);\n                                        else\n                                            deletedMessages.add(msgId);\n                                    }\n\n                                    ArrayList<Integer> fork = new ArrayList<>(original);\n                                    fork.removeAll(deletedMessages);\n                                    if (!fork.isEmpty())\n                                        markMessagesDeleted(param.thisObject, channelID, fork);\n\n                                    if (deletedMessages.isEmpty())\n                                        param.setResult(null);\n                                    else {\n\n                                        ((ArrayList<Integer>) param.args[2]).clear();\n\n                                        ((ArrayList<Integer>) param.args[2]).addAll(deletedMessages);\n                                    }\n                                }\n                            }\n                        });\n\n                        HMethod.hookMethod(\n                                ClassLoad.getClass(ClassNames.MESSAGES_STORAGE),\n                                AutomationResolver.resolve(\"MessagesStorage\", \"markMessagesAsDeleted\", AutomationResolver.ResolverType.Method),\n                                AutomationResolver.merge(AutomationResolver.resolveObject(\"markMessagesAsDeleted\", new Class[]{long.class, java.util.ArrayList.class, boolean.class, boolean.class, int.class, int.class}),\n                                        new AbstractMethodHook() {\n                                            @Override\n                                            protected void beforeMethod(MethodHookParam param) {\n                                                if (!isDeleteMessage) {\n                                                    param.setResult(null);\n                                                }\n                                            }\n                                        }\n                                ));\n                    }\n\n                    if (ClassLoad.getClass(ClassNames.NOTIFICATIONS_CONTROLLER) != null) {\n                        Method removeDeletedMessagesFromNotifications = null;\n                        for (Method method : ClassLoad.getClass(ClassNames.NOTIFICATIONS_CONTROLLER).getDeclaredMethods())\n                            if (method.getName().equals(AutomationResolver.resolve(\"NotificationsController\", \"removeDeletedMessagesFromNotifications\", AutomationResolver.ResolverType.Method)))\n                                removeDeletedMessagesFromNotifications = method;\n\n                        if (removeDeletedMessagesFromNotifications == null)\n                            Logger.w(\"Failed to hook removeDeletedMessagesFromNotifications! Reason: No method found, \" + Utils.issue);\n                        else\n                            XposedBridge.hookMethod(removeDeletedMessagesFromNotifications, new AbstractMethodHook() {\n                                @Override\n                                protected void beforeMethod(MethodHookParam param) {\n                                    if (ConfigManager.showDeletedMessages.isEnable())\n                                        param.setResult(null);\n                                }\n                            });\n                    }\n\n                    if (ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER) != null) {\n\n\n                        HMethod.hookMethod(\n                                ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER),\n                                AutomationResolver.resolve(\"MessagesController\", \"deleteMessages\", AutomationResolver.ResolverType.Method),\n                                AutomationResolver.merge(AutomationResolver.resolveObject(\"deleteMessages\", new Class[]{java.util.ArrayList.class,\n                                                java.util.ArrayList.class,\n                                                ClassLoad.getClass(ClassNames.TLRPC_ENCRYPTED_CHAT),\n                                                long.class,\n                                                boolean.class,\n                                                int.class,\n                                                boolean.class,\n                                                long.class,\n                                                ClassLoad.getClass(ClassNames.TL_OBJECT),\n                                                int.class,\n                                                boolean.class,\n                                                int.class}),\n                                        new AbstractMethodHook() {\n                                            @Override\n                                            protected void beforeMethod(MethodHookParam param) {\n                                                isDeleteMessage = true;\n                                            }\n                                        }\n                                ));\n                    }\n\n                    if (ClassLoad.getClass(ClassNames.NOTIFICATION_CENTER) != null) {\n                        HMethod.hookMethod(ClassLoad.getClass(ClassNames.NOTIFICATION_CENTER), AutomationResolver.resolve(\"NotificationCenter\", \"postNotificationName\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"postNotificationName\", new Class[]{int.class, Object[].class}), new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                if (!isDeleteMessage) {\n                                    int id = (int) param.args[0];\n                                    if (id == NotificationCenter.getMessagesDeleted()) {\n                                        param.setResult(null);\n                                    }\n                                }\n                            }\n\n                            @Override\n                            protected void afterMethod(MethodHookParam param) {\n                                isDeleteMessage = false;\n                            }\n                        }));\n                    }\n\n                    ShowDeletedMessages.init();\n                    ShowDeletedMessages.initAutoDownload();\n                }\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n\n    }\n\n    public static void initAutoDownload() {\n\n        if (ClassLoad.getClass(ClassNames.DOWNLOAD_CONTROLLER) == null)\n            return;\n\n        HMethod.hookMethod(ClassLoad.getClass(ClassNames.DOWNLOAD_CONTROLLER), AutomationResolver.resolve(\"DownloadController\", \"canDownloadMedia\", AutomationResolver.ResolverType.Method), ClassLoad.getClass(ClassNames.TL_MESSAGE), new AbstractMethodHook() {\n            @Override\n            protected void beforeMethod(MethodHookParam param) {\n                TLRPC.Message message = new TLRPC.Message(param.args[0]);\n                if ((message.getFlags() & FLAG_DELETED) != 0)\n                    param.setResult(0);\n            }\n        });\n\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/TelePremium.java",
    "content": "package com.my.televip.features;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.Utils;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\n\nimport de.robv.android.xposed.XC_MethodHook;\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class TelePremium {\n\n    public static boolean isEnable = false;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.USER_CONFIG) != null) {\n\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.USER_CONFIG), AutomationResolver.resolve(\"UserConfig\", \"isPremium\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                        @Override\n                        public void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                            if (ConfigManager.telegramPremium.isEnable()) param.setResult(true);\n                        }\n                    });\n                }\n                if (ClientChecker.check(ClientChecker.ClientType.iMe) || ClientChecker.check(ClientChecker.ClientType.iMeWeb)) {\n                    Class<?> ForkPremiumPreferencClass = XposedHelpers.findClassIfExists(\"com.iMe.storage.data.locale.prefs.impl.ForkPremiumPreference\", Utils.classLoader);\n                    if (ForkPremiumPreferencClass != null) {\n                        HMethod.hookMethod(ForkPremiumPreferencClass, \"isPremium\", new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n                                if (ConfigManager.telegramPremium.isEnable())\n                                    param.setResult(true);\n                            }\n                        });\n                    }\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/otherFeatures/ChatHook.java",
    "content": "package com.my.televip.features.otherFeatures;\n\nimport android.content.Context;\nimport android.text.InputType;\nimport android.widget.EditText;\nimport android.widget.LinearLayout;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.ActionBar.ActionBarMenuItem;\nimport com.my.televip.virtuals.ActionBar.AlertDialog;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.ui.ChatActivity;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ChatHook {\n\n    private static boolean initialized = false;\n\n    public static void init(Context context, String className) {\n        if (initialized || className == null || ClientChecker.check(ClientChecker.ClientType.Nagram)) return;\n\n        Class<?> clazz = ClassLoad.getClass(className);\n        if (clazz == null) FeatureStateManager.reset(context);\n\n        initialized = true;\n\n        HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_ACTIVITY), AutomationResolver.resolve(\"ChatActivity\", \"createView\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"createView\", new Class[]{Context.class}), new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(MethodHookParam param) {\n                ChatActivity chatActivity = new ChatActivity(param.thisObject);\n\n                ActionBarMenuItem headerItem = chatActivity.getHeaderItem();\n                if (headerItem.getActionBarMenuItem() != null) {\n\n                    int drawableResource = XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.DRAWABLE), \"msg_go_up\");\n\n                    if (!ClientChecker.check(ClientChecker.ClientType.iMe) && !ClientChecker.check(ClientChecker.ClientType.iMeWeb) && !ClientChecker.check(ClientChecker.ClientType.TelegramPlus) && !ClientChecker.check(ClientChecker.ClientType.XPlus) && !ClientChecker.check(ClientChecker.ClientType.forkgram) && !ClientChecker.check(ClientChecker.ClientType.forkgramBeta)) {\n                        headerItem.lazilyAddSubItem(8353847, drawableResource, Translator.get(Keys.ToTheBeginning));\n                    }\n                    drawableResource = XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.DRAWABLE), \"player_new_order\");\n\n                    headerItem.lazilyAddSubItem(8353848, drawableResource, Translator.get(Keys.ToTheMessage));\n\n                }\n\n            }\n        }));\n\n        HMethod.hookMethod(clazz, \"onItemClick\", int.class, new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(MethodHookParam param) {\n                try {\n                    int id = (int) param.args[0];\n\n                    final Object thisClass = XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve(\"ChatActivity\", \"this$0\", AutomationResolver.ResolverType.Field));\n                    ChatActivity chat = new ChatActivity(thisClass);\n\n                    if (id == 8353847) {\n                        chat.scrollToMessageId(1, 0, true, 0, true, 0);\n                    } else if (id == 8353848) {\n\n                        AlertDialog dialog = new AlertDialog(context);\n                        dialog.setTitle(Translator.get(Keys.InputMessageId));\n\n                        EditText input = new EditText(context);\n                        input.setInputType(InputType.TYPE_CLASS_NUMBER);\n                        if (Theme.isLight()) {\n                            input.setTextColor(0xFF000000);\n                            input.setHintTextColor(0xFF424242);\n                        } else {\n                            input.setTextColor(0xFFFFFFFF);\n                            input.setHintTextColor(0xFFBDBDBD);\n                        }\n                        input.setTextSize(18);\n                        input.setPadding(20, 20, 20, 20);\n\n                        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n                                LinearLayout.LayoutParams.MATCH_PARENT,\n                                LinearLayout.LayoutParams.WRAP_CONTENT\n                        );\n                        params.setMargins(20, 20, 20, 20);\n                        input.setLayoutParams(params);\n\n                        LinearLayout layout = new LinearLayout(context);\n                        layout.setOrientation(LinearLayout.VERTICAL);\n                        layout.addView(input);\n\n                        dialog.setView(layout);\n\n                        dialog.setPositiveButton(Translator.get(Keys.Done), AlertDialog.click(() -> {\n                            String text = input.getText().toString().trim();\n                            if (!text.isEmpty()) {\n                                int msgId = Integer.parseInt(text);\n                                chat.scrollToMessageId(msgId, 0, true, 0, true, 0);\n                            }\n                        }));\n\n                        dialog.show();\n                    }\n                } catch (Throwable t) {\n                    Logger.e(t);\n                }\n            }\n        });\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/otherFeatures/CopyNameHook.java",
    "content": "package com.my.televip.features.otherFeatures;\n\nimport android.content.ClipData;\nimport android.content.ClipboardManager;\nimport android.content.Context;\nimport android.widget.Toast;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.ActionBar.SimpleTextView;\nimport com.my.televip.virtuals.ui.ProfileActivity;\n\npublic class CopyNameHook {\n\n    public static void init(Context context) {\n        try {\n            if (ClassLoad.getClass(ClassNames.PROFILE_ACTIVITY) != null) {\n\n                HMethod.hookMethod(ClassLoad.getClass(ClassNames.PROFILE_ACTIVITY), AutomationResolver.resolve(\"ProfileActivity\", \"createView\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"createView\", new Class[]{Context.class}), new AbstractMethodHook() {\n                    @Override\n                    protected void afterMethod(MethodHookParam param) {\n                        final ProfileActivity profileActivity = new ProfileActivity(param.thisObject);\n\n                        Object[] nameTextViewArray = profileActivity.getNameTextView();\n\n                        if (nameTextViewArray != null && nameTextViewArray.length > 1) {\n\n                            SimpleTextView simpleTextView = new SimpleTextView(nameTextViewArray[1]);\n\n                            if (simpleTextView.getSimpleTextView() != null) {\n                                simpleTextView.getSimpleTextView().setOnClickListener(v -> {\n                                    if (simpleTextView.getText() != null) {\n                                        String name = Translator.get(Keys.Copied, simpleTextView.getText());\n                                        ((ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText(\"clipboard\", simpleTextView.getText()));\n                                        Toast.makeText(context, name, Toast.LENGTH_LONG).show();\n                                    }\n                                });\n                            }\n                        }\n                    }\n                }));\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/otherFeatures/FeatureInitializer.java",
    "content": "package com.my.televip.features.otherFeatures;\n\nimport android.content.Context;\n\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Utils;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class FeatureInitializer {\n\n    public static void init(Context context) {\n        if (ClientChecker.check(ClientChecker.ClientType.TelegramPlus)) return;\n\n        try {\n            if (!FeatureStateManager.isChatEnabled() || !FeatureStateManager.isProfileEnabled()) {\n\n                Class<?> actionBarClass = XposedHelpers.findClassIfExists(\n                        AutomationResolver.resolve(\"org.telegram.ui.ActionBar.ActionBar\"),\n                        Utils.classLoader\n                );\n\n                HMethod.hookMethod(\n                        actionBarClass,\n                        AutomationResolver.resolve(\"ActionBar\", \"setActionBarMenuOnItemClick\", AutomationResolver.ResolverType.Method),\n                        new AbstractMethodHook() {\n                            @Override\n                            protected void beforeMethod(MethodHookParam param) {\n\n                                Object clazz = param.args[0];\n\n                                if (clazz == null) return;\n\n                                String name = clazz.getClass().getName();\n\n                                if (name.contains(\"ChatActivity\") && !FeatureStateManager.isChatEnabled()) {\n                                    FeatureStateManager.saveChat(name);\n                                    ChatHook.init(context, name);\n                                }\n\n                                if (name.contains(\"ProfileActivity\") && !FeatureStateManager.isProfileEnabled()) {\n                                    FeatureStateManager.saveProfile(name);\n                                    ProfileHook.init(context, name);\n                                }\n                            }\n                        });\n\n            } else {\n                ChatHook.init(context, FeatureStateManager.getChatClass());\n                ProfileHook.init(context, FeatureStateManager.getProfileClass());\n            }\n\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/otherFeatures/FeatureStateManager.java",
    "content": "package com.my.televip.features.otherFeatures;\n\n\nimport android.content.Context;\n\nimport com.my.televip.Configs.ConfigPreferences;\n\npublic class FeatureStateManager {\n\n    public static final String KEY_CHAT = \"ChatOnItemClick\";\n    public static final String KEY_CHAT_BOOL = \"ChatOnItemClick_boolean\";\n\n    public static final String KEY_PROFILE = \"ProfileOnItemClick\";\n    public static final String KEY_PROFILE_BOOL = \"ProfileOnItemClick_boolean\";\n\n    public static boolean isChatEnabled() {\n        return ConfigPreferences.getBoolean(KEY_CHAT_BOOL);\n    }\n\n    public static boolean isProfileEnabled() {\n        return ConfigPreferences.getBoolean(KEY_PROFILE_BOOL);\n    }\n\n    public static String getChatClass() {\n        return ConfigPreferences.getString(KEY_CHAT);\n    }\n\n    public static String getProfileClass() {\n        return ConfigPreferences.getString(KEY_PROFILE);\n    }\n\n    public static void saveChat(String className) {\n        ConfigPreferences.putBoolean(KEY_CHAT_BOOL, true);\n        ConfigPreferences.putString(KEY_CHAT, className);\n    }\n\n    public static void saveProfile(String className) {\n        ConfigPreferences.putBoolean(KEY_PROFILE_BOOL, true);\n        ConfigPreferences.putString(KEY_PROFILE, className);\n    }\n\n    public static void reset(Context context) {\n        ConfigPreferences.remove(KEY_CHAT);\n        ConfigPreferences.remove(KEY_CHAT_BOOL);\n        ConfigPreferences.remove(KEY_PROFILE);\n        ConfigPreferences.remove(KEY_PROFILE_BOOL);\n        FeatureInitializer.init(context);\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/features/otherFeatures/ProfileHook.java",
    "content": "package com.my.televip.features.otherFeatures;\n\nimport android.content.ClipData;\nimport android.content.ClipboardManager;\nimport android.content.Context;\nimport android.widget.Toast;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.ActionBar.ActionBarMenuItem;\nimport com.my.televip.virtuals.ui.ProfileActivity;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ProfileHook {\n\n    private static boolean initialized = false;\n\n    public static void init(Context context, String className) {\n        if (initialized || className == null) return;\n\n        Class<?> clazz = ClassLoad.getClass(className);\n        if (clazz == null) FeatureStateManager.reset(context);\n\n        initialized = true;\n\n        HMethod.hookMethod(ClassLoad.getClass(ClassNames.PROFILE_ACTIVITY), AutomationResolver.resolve(\"ProfileActivity\", \"createActionBarMenu\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"createActionBarMenu\", new Class[]{boolean.class}), new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(MethodHookParam param) {\n                ProfileActivity profileActivity = new ProfileActivity(param.thisObject);\n\n                ActionBarMenuItem otherItem = profileActivity.getOtherItem();\n\n                if (otherItem.getActionBarMenuItem() != null) {\n\n                    int drawableResource = 0x7f0806d3;\n\n                    if (!ClientChecker.check(ClientChecker.ClientType.Nagram) && !ClientChecker.check(ClientChecker.ClientType.Momogram)) {\n                        drawableResource = XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.DRAWABLE), \"msg_filled_menu_users\");\n                    }\n\n                    if (getID(profileActivity) > 1) {\n                        otherItem.addSubItem(8353847, drawableResource, String.valueOf(getID(profileActivity)));\n                    }\n                }\n            }\n        }));\n\n        HMethod.hookMethod(clazz, \"onItemClick\", int.class, new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(MethodHookParam param) {\n\n                int id = (int) param.args[0];\n\n                if (id == 8353847) {\n                    final Object thisClass = XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve(\"ProfileActivity\", \"this$0\", AutomationResolver.ResolverType.Field));\n                    ProfileActivity profile = new ProfileActivity(thisClass);\n\n                    ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);\n                    cm.setPrimaryClip(ClipData.newPlainText(\"id\", String.valueOf(getID(profile))));\n\n                    Toast.makeText(context, String.valueOf(getID(profile)), Toast.LENGTH_LONG).show();\n                }\n            }\n        });\n    }\n\n    private static long getID(ProfileActivity profile) {\n        if (profile.getUserId() > 1) {\n            return profile.getUserId();\n        } else {\n            return profile.getChatId();\n        }\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/hooks/HMethod.java",
    "content": "package com.my.televip.hooks;\n\nimport com.my.televip.logging.Logger;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class HMethod {\n\n    public static void hookMethod(Class<?> cls, String name, Object... args) {\n        try {\n            if (cls != null) {\n                XposedHelpers.findAndHookMethod(cls, name, args);\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n\n    public static void hookMethod(Class<?> cls, String[] names, Object... args) {\n        try {\n            if (cls != null) {\n                for (String name : names) {\n                    XposedHelpers.findAndHookMethod(cls, name, args);\n                }\n            }\n        } catch (Throwable t) {\n            Logger.e(t);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/language/Keys.java",
    "content": "package com.my.televip.language;\n\npublic class Keys {\n\n    public static final String ToTheBeginning = \"ToTheBeginning\";\n    public static final String ToTheMessage = \"ToTheMessage\";\n    public static final String InputMessageId = \"InputMessageId\";\n    public static final String Done = \"Done\";\n    public static final String Cancel = \"Cancel\";\n    public static final String GhostMode = \"GhostMode\";\n    public static final String ByMustafa = \"ByMustafa\";\n    public static final String HideSeen = \"HideSeen\";\n    public static final String HideStoryView = \"HideStoryView\";\n    public static final String HideTyping = \"HideTyping\";\n    public static final String TelegramPremium = \"TelegramPremium\";\n    public static final String RemovesContentSaving = \"RemovesContentSaving\";\n    public static final String EnableSavingStories = \"EnableSavingStories\";\n    public static final String GhostModeSettings = \"GhostModeSettings\";\n    public static final String DeveloperChannel = \"DeveloperChannel\";\n    public static final String HideOnline = \"HideOnline\";\n    public static final String PreventMedia = \"PreventMedia\";\n    public static final String HidePhone = \"HidePhone\";\n    public static final String ShowDeletedMessages = \"ShowDeletedMessages\";\n    public static final String Deleted = \"Deleted\";\n    public static final String Copied = \"Copied\";\n    public static final String UserOffline = \"UserOffline\";\n    public static final String DisableStories = \"DisableStories\";\n    public static final String HideUpdateApp = \"HideUpdateApp\";\n    public static final String JoinTeleVip = \"JoinTeleVip\";\n    public static final String Join = \"Join\";\n    public static final String DontShowAgain = \"DontShowAgain\";\n    public static final String RestartApp = \"RestartApp\";\n    public static final String RestartRequired = \"RestartRequired\";\n    public static final String DisableNumberRounding = \"DisableNumberRounding\";\n    public static final String EditsHistory = \"EditsHistory\";\n    public static final String SaveEditsHistory = \"SaveEditsHistory\";\n    public static final String StoriesSettings = \"StoriesSettings\";\n    public static final String MessagesSettings = \"MessagesSettings\";\n    public static final String MediaSettings = \"MediaSettings\";\n    public static final String OtherFeaturesSettings = \"OtherFeaturesSettings\";\n    public static final String FixTLError = \"FixTLError\";\n    public static final String ShowMessageID = \"ShowMessageID\";\n    public static final String DownloadSpeed = \"DownloadSpeed\";\n    public static final String ConnectionsSettings = \"ConnectionsSettings\";\n    public static final String Message = \"Message\";\n    public static final String Edited = \"Edited\";\n    public static final String MarkReadAfterSend = \"MarkReadAfterSend\";\n    public static final String OfflineVisibilityInfo = \"OfflineVisibilityInfo\";\n    public static final String HidePinnedMessages = \"HidePinnedMessages\";\n    public static final String DisableChannelSwipeBack = \"DisableChannelSwipeBack\";\n    public static final String DisableProfileSwipeBack = \"DisableProfileSwipeBack\";\n    public static final String UiSettings = \"UiSettings\";\n    public static final String SecretMediaSave = \"SecretMediaSave\";\n    public static final String HideProxySponsor = \"HideProxySponsor\";\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/language/Translator.java",
    "content": "package com.my.televip.language;\n\nimport com.my.televip.Utils;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.messenger.LocaleController;\n\nimport org.json.JSONObject;\n\nimport java.io.InputStream;\nimport java.nio.charset.StandardCharsets;\nimport java.util.Enumeration;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.zip.ZipEntry;\nimport java.util.zip.ZipFile;\n\npublic class Translator {\n\n    private static final Map<String, JSONObject> langMap = new HashMap<>();\n\n    private static LocaleController localeController;\n\n    public static void init() {\n        try {\n            loadAllLanguages();\n\n            localeController = new LocaleController();\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    private static void loadAllLanguages() {\n        try (ZipFile zipFile = new ZipFile(Utils.modulePath)) {\n\n            Enumeration<? extends ZipEntry> entries = zipFile.entries();\n\n            while (entries.hasMoreElements()) {\n                ZipEntry entry = entries.nextElement();\n\n                String name = entry.getName();\n\n                if (name.startsWith(\"assets/lang/\") && name.endsWith(\".json\")) {\n\n                    String langCode = name.substring(\n                            name.lastIndexOf(\"/\") + 1,\n                            name.lastIndexOf(\".\")\n                    );\n\n                    InputStream is = zipFile.getInputStream(entry);\n                    String json = readFully(is);\n                    is.close();\n\n                    langMap.put(langCode, new JSONObject(json));\n                }\n            }\n\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    private static String readFully(InputStream is) throws Exception {\n        byte[] buffer = new byte[4096];\n        int bytesRead;\n        StringBuilder sb = new StringBuilder();\n\n        while ((bytesRead = is.read(buffer)) != -1) {\n            sb.append(new String(buffer, 0, bytesRead, StandardCharsets.UTF_8));\n        }\n\n        return sb.toString();\n    }\n\n    public static String get(String key) {\n        try {\n            if (localeController.getCurrentLocale() != null) {\n                String lang = localeController.getCurrentLocale().getLanguage();\n                JSONObject langJson = langMap.get(lang);\n\n                if (langJson != null && langJson.has(key)) {\n                    return langJson.optString(key);\n                }\n                JSONObject enJson = langMap.get(\"en\");\n                String text;\n                if (enJson != null && enJson.has(key)) {\n                    text = enJson.optString(key);\n                } else {\n                    text = key;\n                }\n\n                return text;\n            }\n\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n\n        return key;\n    }\n\n    public static String get(String key, Object... args) {\n        try {\n            if (localeController.getCurrentLocale() != null) {\n                String lang = localeController.getCurrentLocale().getLanguage();\n\n                String text = null;\n\n                JSONObject langJson = langMap.get(lang);\n\n                if (langJson != null && langJson.has(key)) {\n                    text = langJson.optString(key);\n                }\n\n                if (text == null) {\n                    JSONObject enJson = langMap.get(\"en\");\n                    if (enJson != null && enJson.has(key)) {\n                        text = enJson.optString(key);\n                    } else {\n                        text = key;\n                    }\n                }\n\n                if (args != null && args.length > 0) {\n                    return String.format(text, args);\n                }\n\n                return text;\n            }\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n\n        return key;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/logging/Logger.java",
    "content": "package com.my.televip.logging;\n\nimport static com.my.televip.Utils.pkgName;\n\nimport android.content.pm.PackageInfo;\nimport android.content.pm.PackageManager;\nimport android.os.Build;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.struct.ResolverRegistry;\n\nimport de.robv.android.xposed.XposedBridge;\n\npublic class Logger {\n\n    public static void w(String text)\n    {\n        XposedBridge.log(\"[TeleVip] [Warning] pkgName: \"+ pkgName + \" \" + text);\n    }\n\n    public static void l(String text)\n    {\n        XposedBridge.log(\"[TeleVip] pkgName: \"+ pkgName +\" \" + text);\n    }\n\n    public static void e(Throwable throwable) {\n        try {\n            StringBuilder log = new StringBuilder();\n\n            log.append(\"[TeleVip] [Error] pkgName: \").append(pkgName).append(\" \").append(throwable).append(\"\\n\");\n            log.append(\"appName = \").append(ResolverRegistry.getResolverClass().getSimpleName()).append(\"\\n\");\n\n            try {\n                PackageManager pm = ClassLoad.getApplicationContext().getPackageManager();\n                PackageInfo info = pm.getPackageInfo(ClassLoad.getApplicationContext().getPackageName(), 0);\n                String versionName = info.versionName;\n                int versionCode = info.versionCode;\n\n                log.append(\"versionName: \").append(versionName).append(\"\\n\");\n                log.append(\"versionCode: \").append(versionCode).append(\"\\n\");\n            } catch (Throwable e) {\n                log.append(\"versionName/versionCode: error retrieving\\n\");\n            }\n\n            log.append(\"OS Version: \").append(Build.VERSION.RELEASE).append(\"\\n\");\n            log.append(\"SDK: \").append(Build.VERSION.SDK_INT).append(\"\\n\");\n            log.append(\"Manufacturer: \").append(Build.MANUFACTURER).append(\"\\n\");\n            log.append(\"Model: \").append(Build.MODEL).append(\"\\n\");\n\n            for (StackTraceElement element : throwable.getStackTrace()) {\n                log.append(\"[TeleVip] at \").append(element.toString()).append(\"\\n\");\n            }\n\n            XposedBridge.log(log.toString());\n        } catch (Throwable g) {}\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/obfuscate/AutomationResolver.java",
    "content": "package com.my.televip.obfuscate;\n\n\nimport com.my.televip.obfuscate.struct.ResolverRegistry;\n\nimport de.robv.android.xposed.XC_MethodHook;\n\n\npublic class AutomationResolver {\n\n    public static ResolverRegistry resolverRegistry = new ResolverRegistry(ResolverRegistry.getResolverClass());\n\n    public static String resolve(String className)\n    {\n        if (resolverRegistry.hasClass(className)) {\n            return resolverRegistry.resolveClass(className);\n        }\n\n        return className;\n    }\n\n    public static Class<?>[] resolveObject(String name, Class<?>[] classes) {\n\n        if (resolverRegistry.hasParameter(name)) {\n            return resolverRegistry.resolveParameter(name);\n        }\n\n        return classes;\n    }\n\n    public static String resolve(String className, String name, ResolverType type) {\n\n        if (type == ResolverType.Field && resolverRegistry.hasField(className, name)) {\n            return resolverRegistry.resolveField(className, name);\n        }\n        if (type == ResolverType.Method && resolverRegistry.hasMethod(className, name)) {\n            return resolverRegistry.resolveMethod(className, name);\n        }\n\n        name = name.replace(\"storyEntitiesAllowed2\", \"storyEntitiesAllowed\");\n        name = name.replace(\"hasStories2\", \"hasStories\");\n\n        return name;\n    }\n\n\n    public static Object[] merge(Class<?>[] classes, XC_MethodHook hook)\n    {\n        if (classes != null) {\n            Object[] result = new Object[classes.length + 1];\n            System.arraycopy(classes, 0, result, 0, classes.length);\n            result[classes.length] = hook;\n            return result;\n        }\n        return null;\n    }\n\n    public enum ResolverType\n    {\n        Field,\n        Method\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/obfuscate/struct/ClassInfo.java",
    "content": "package com.my.televip.obfuscate.struct;\n\npublic class ClassInfo {\n    private final String original;\n    private final String resolved;\n\n    public ClassInfo(String original, String resolved)\n    {\n        this.original = original;\n        this.resolved = resolved;\n    }\n\n    public String getOriginal() {\n        return this.original;\n    }\n\n    public String getResolved() {\n        return this.resolved;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/obfuscate/struct/FieldInfo.java",
    "content": "package com.my.televip.obfuscate.struct;\n\npublic class FieldInfo {\n    private final String className;\n    private final String original;\n    private final String resolved;\n\n    public FieldInfo(String className, String original, String resolved)\n    {\n        this.className = className;\n        this.original = original;\n        this.resolved = resolved;\n    }\n\n    public String getClassName() {\n        return this.className;\n    }\n\n    public String getOriginal() {\n        return this.original;\n    }\n\n    public String getResolved() {\n        return this.resolved;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/obfuscate/struct/MethodInfo.java",
    "content": "package com.my.televip.obfuscate.struct;\n\npublic class MethodInfo {\n    private final String className;\n    private final String original;\n    private final String resolved;\n\n    public MethodInfo(String className, String original, String resolved)\n    {\n        this.className = className;\n        this.original = original;\n        this.resolved = resolved;\n    }\n\n    public String getClassName() {\n        return this.className;\n    }\n\n    public String getOriginal() {\n        return this.original;\n    }\n\n    public String getResolved() {\n        return this.resolved;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/obfuscate/struct/ResolverRegistry.java",
    "content": "package com.my.televip.obfuscate.struct;\n\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Utils;\n\npublic class ResolverRegistry {\n\n    Class<?> finalField;\n    Class<?> finalMethod;\n    Class<?> finalParameter;\n    Class<?> finalClass;\n    Class<?> clazz;\n\n    public ResolverRegistry(Class<?> clazz){\n        this.clazz = clazz;\n        try {\n            Class<?> fieldResolverClass = null;\n            Class<?> methodResolverClass = null;\n            Class<?> parameterResolverClass = null;\n            Class<?> classResolverClass = null;\n            for (Class<?> inner : clazz.getDeclaredClasses()) {\n                if (inner.getSimpleName().equals(\"FieldResolver\")) fieldResolverClass = inner;\n                if (inner.getSimpleName().equals(\"MethodResolver\")) methodResolverClass = inner;\n                if (inner.getSimpleName().equals(\"ParameterResolver\")) parameterResolverClass = inner;\n                if (inner.getSimpleName().equals(\"ClassResolver\")) classResolverClass = inner;\n            }\n\n            finalField = fieldResolverClass;\n            finalMethod = methodResolverClass;\n            finalParameter = parameterResolverClass;\n            finalClass = classResolverClass;\n\n        } catch (Throwable ignored) {}\n    }\n\n    public boolean hasClass(String className){\n        try {\n            return (boolean)finalClass.getMethod(\"has\", String.class).invoke(null, className);\n        } catch (Throwable e){\n            return false;\n        }\n    }\n\n    public String resolveClass(String className){\n        try {\n            return (String) finalClass.getMethod(\"resolve\", String.class).invoke(null, className);\n        } catch (Throwable e){\n            return null;\n        }\n    }\n\n    public boolean hasField(String className, String name){\n        try {\n            return (boolean)finalField.getMethod(\"has\", String.class,String.class).invoke(null, className ,name);\n        } catch (Throwable e){\n            return false;\n        }\n    }\n\n    public String resolveField(String className, String name){\n        try {\n            return (String) finalField.getMethod(\"resolve\", String.class,String.class).invoke(null, className ,name);\n        } catch (Throwable e){\n            return null;\n        }\n    }\n\n    public boolean hasMethod(String className, String name){\n        try {\n            return (boolean)finalMethod.getMethod(\"has\", String.class,String.class).invoke(null, className ,name);\n        } catch (Throwable e){\n            return false;\n        }\n    }\n\n    public String resolveMethod(String className, String name){\n        try {\n            return (String) finalMethod.getMethod(\"resolve\", String.class,String.class).invoke(null, className ,name);\n        } catch (Throwable e){\n            return null;\n        }\n    }\n\n    public boolean hasParameter(String name){\n        try {\n            return (boolean)finalParameter.getMethod(\"has\", String.class).invoke(null, name);\n        } catch (Throwable e){\n            return false;\n        }\n    }\n\n    public Class<?>[] resolveParameter(String name){\n        try {\n            return (Class<?>[]) finalParameter.getMethod(\"resolve\", String.class).invoke(null, name);\n        } catch (Throwable e){\n            return null;\n        }\n    }\n\n    public void loadParameter(){\n        try {\n            clazz.getMethod(\"loadParameter\").invoke(null);\n        } catch (Throwable ignored){}\n    }\n\n    public static Class<?> getResolverClass() {\n        ClientChecker.ClientType clientType = ClientChecker.ClientType.fromPackage(Utils.pkgName);\n        if (clientType == null) return null;\n        return clientType.getResolverClass();\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/settings/SettingsManager.java",
    "content": "package com.my.televip.settings;\n\nimport com.my.televip.Utils;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.settings.controller.SettingsController;\nimport com.my.televip.settings.hook.SettingsHook;\nimport com.my.televip.settings.ui.SettingsActivity;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SettingsManager {\n\n    public static void init(SettingsController settingsController) {\n\n        SettingsActivity.init(settingsController);\n\n        Class<?> SettingsActivityClass = XposedHelpers.findClassIfExists(\n                AutomationResolver.resolve(\"org.telegram.ui.SettingsActivity\"),\n                Utils.classLoader\n        );\n\n        Class<?> SettingsActivity$SettingCell$FactoryClass = XposedHelpers.findClassIfExists(\n                AutomationResolver.resolve(\"org.telegram.ui.SettingsActivity$SettingCell$Factory\"),\n                Utils.classLoader\n        );\n\n        SettingsHook settings = new SettingsHook();\n        if (SettingsActivityClass != null && SettingsActivity$SettingCell$FactoryClass != null) {\n            settings.newSettings(SettingsActivityClass, SettingsActivity$SettingCell$FactoryClass, settingsController);\n        } else {\n            settings.oldSettings(settingsController);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/settings/controller/SettingsController.java",
    "content": "package com.my.televip.settings.controller;\n\nimport android.content.Context;\nimport android.view.View;\nimport android.widget.FrameLayout;\n\nimport com.my.televip.Configs.ConfigPreferences;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.settings.ui.SettingsActivity;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.ActionBar.AlertDialog;\nimport com.my.televip.virtuals.messenger.browser.Browser;\nimport com.my.televip.virtuals.ui.LaunchActivity;\n\npublic class SettingsController {\n\n    public FrameLayout settingsView;\n    private final Context context;\n\n    public SettingsController(Context context) {\n        this.context = context;\n    }\n\n    public void openView(){\n        try {\n            if (settingsView == null) {\n                settingsView = new FrameLayout(context);\n            }\n\n            settingsView.removeAllViews();\n            SettingsActivity settingsActivity = new SettingsActivity(context);\n            showDialog();\n\n            settingsView.addView(settingsActivity.createView(this));\n\n            show(settingsView);\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    private void showDialog() {\n        try {\n\n            if (!ConfigPreferences.getBoolean(\"DSA\")) {\n                AlertDialog alertDialog = new AlertDialog(context);\n\n                alertDialog.setTitle(Translator.get(Keys.GhostMode));\n                alertDialog.setMessage(Translator.get(Keys.JoinTeleVip));\n\n                alertDialog.setPositiveButton(Translator.get(Keys.Join), AlertDialog.click(() -> {\n                    Browser.openUrl(context, \"https://t.me/t_l0_e\");\n                    hide();\n                }));\n\n                alertDialog.setNegativeButton(Translator.get(Keys.Cancel), null);\n                alertDialog.setNeutralButton(Translator.get(Keys.DontShowAgain), AlertDialog.click(() -> ConfigPreferences.putBoolean(\"DSA\", true)));\n                alertDialog.show();\n            }\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n    public void show(View target) {\n        LaunchActivity launchActivity = new LaunchActivity(context);\n        if (target.getParent() == null) {\n            launchActivity.frameLayout.addView(target);\n        }\n\n        for (int i = 0; i < launchActivity.frameLayout.getChildCount(); i++) {\n            View child = launchActivity.frameLayout.getChildAt(i);\n            child.setVisibility(child == target ? View.VISIBLE : View.GONE);\n        }\n\n        target.bringToFront();\n    }\n\n    public void hide() {\n        LaunchActivity launchActivity = new LaunchActivity(settingsView.getContext());\n        for (int i = 0; i < launchActivity.frameLayout.getChildCount(); i++) {\n            View child = launchActivity.frameLayout.getChildAt(i);\n            child.setVisibility(child == settingsView ? View.GONE : View.VISIBLE);\n        }\n\n        if (settingsView != null && settingsView.getParent() != null) {\n            launchActivity.frameLayout.removeView(settingsView);\n        }\n        SettingsActivity.isSettings = false;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/settings/hook/SettingsHook.java",
    "content": "package com.my.televip.settings.hook;\n\n\nimport android.view.View;\nimport android.widget.ImageView;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.ClientChecker;\nimport com.my.televip.Drawable.GhostDrawable;\nimport com.my.televip.Utils;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.settings.controller.SettingsController;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.Adapters.DrawerLayoutAdapter;\nimport com.my.televip.virtuals.SettingsIconResolver;\n\nimport java.lang.reflect.Constructor;\nimport java.lang.reflect.Method;\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport de.robv.android.xposed.XposedBridge;\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SettingsHook {\n\n    public int id_item_add = -1;\n    private Constructor<?> itemConstructor;\n\n    public void newSettings(Class<?> SettingsActivityClass, Class<?> SettingsActivity$SettingCell$FactoryClass, SettingsController settingsController){\n\n        AbstractMethodHook fillItemsHook = new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(final MethodHookParam param) {\n                ArrayList<Object> arrayList = (ArrayList<Object>) param.args[0];\n                if (arrayList != null) {\n\n                    int color1 = 0xFFF46F6F;\n                    int color2 = 0xFFDF5555;\n\n                    Object uItem = XposedHelpers.callStaticMethod(SettingsActivity$SettingCell$FactoryClass, AutomationResolver.resolve(\"SettingCell$Factory\",\"of\", AutomationResolver.ResolverType.Method), 8353847,\n                            color1,\n                            color2,\n                            8353847,\n                            Translator.get(Keys.GhostMode),\n                            Translator.get(Keys.ByMustafa));\n                    if (id_item_add == -1) {\n                        for (int i = 0; i < arrayList.size(); i++) {\n                            Object obj = arrayList.get(i);\n                            int id_item = XposedHelpers.getIntField(obj, AutomationResolver.resolve(\"UItem\",\"id\", AutomationResolver.ResolverType.Field));\n                            if (id_item > 0) {\n                                arrayList.add(i, uItem);\n                                id_item_add = i;\n                                break;\n                            }\n                        }\n                    } else {\n                        arrayList.add(id_item_add, uItem);\n                    }\n\n                }\n            }\n        };\n\n        Class<?> SettingsActivity$SettingCellClass = XposedHelpers.findClassIfExists(\n                AutomationResolver.resolve(\"org.telegram.ui.SettingsActivity$SettingCell\"),\n                Utils.classLoader\n        );\n\n        GhostDrawable ghostDrawable = new GhostDrawable();\n\n        HMethod.hookMethod(SettingsActivity$SettingCellClass, AutomationResolver.resolve(\"SettingsActivity$SettingCell\",\"set\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"set\", new Class[]{int.class, int.class, int.class, CharSequence.class, CharSequence.class, CharSequence.class}), new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(MethodHookParam param) {\n                int id = (int) param.args[2];\n                if (id == 8353847) {\n                    ImageView iconView = (ImageView) XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve(\"SettingsActivity$SettingCell\", \"iconView\", AutomationResolver.ResolverType.Field));\n                    iconView.setImageDrawable(ghostDrawable);\n                }\n            }\n        }));\n\n        Class<?> UniversalAdapterClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.Components.UniversalAdapter\"), Utils.classLoader);\n\n        HMethod.hookMethod(SettingsActivityClass, AutomationResolver.resolve(\"SettingsActivity\", \"fillItems\", AutomationResolver.ResolverType.Method),\n                AutomationResolver.merge(AutomationResolver.resolveObject(\"fillItems\",  new Class[]{java.util.ArrayList.class, UniversalAdapterClass}), fillItemsHook));\n\n        AbstractMethodHook onClickHook = new AbstractMethodHook() {\n            @Override\n            protected void afterMethod(final MethodHookParam param) {\n                Object uItem = param.args[0];\n                if (uItem != null){\n                    int id = XposedHelpers.getIntField(uItem, AutomationResolver.resolve(\"UItem\",\"id\", AutomationResolver.ResolverType.Field));\n                    if (id == 8353847) {\n                        settingsController.openView();\n                    }\n                }\n            }\n        };\n\n        Class<?> UItemClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.Components.UItem\"), Utils.classLoader);\n\n        HMethod.hookMethod(\n                SettingsActivityClass,\n                AutomationResolver.resolve(\"SettingsActivity\", \"onClick\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"onClick\", new Class[]{UItemClass, View.class, int.class, float.class, float.class}), onClickHook));\n    }\n\n    public void oldSettings(SettingsController settingsController){\n        final Class<?> itemClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.Adapters.DrawerLayoutAdapter$Item\"), Utils.classLoader);\n\n        if (itemClass != null) {\n            HMethod.hookMethod(\n                    ClassLoad.getClass(ClassNames.DRAWER_LAYOUT_ADAPTER),\n                    AutomationResolver.resolve(\"DrawerLayoutAdapter\", \"resetItems\", AutomationResolver.ResolverType.Method),\n                    new AbstractMethodHook() {\n                        @Override\n                        protected void afterMethod(MethodHookParam param) throws Throwable {\n\n                            DrawerLayoutAdapter drawerLayoutAdapter = new DrawerLayoutAdapter(param.thisObject);\n\n                            ArrayList<?> items = drawerLayoutAdapter.getItems();\n\n                            if (itemConstructor == null) {\n                                itemConstructor = itemClass.getDeclaredConstructor(AutomationResolver.resolveObject(\"item\", new Class[]{int.class, CharSequence.class, int.class}));\n                                itemConstructor.setAccessible(true);\n                            }\n\n                            Object newItem = itemConstructor.newInstance(8353847, Translator.get(Keys.GhostMode), SettingsIconResolver.getIconSettings());\n\n                            if (items instanceof ArrayList<?>) {\n                                ArrayList<Object> typedItems = (ArrayList<Object>) items;\n                                if (!ClientChecker.check(ClientChecker.ClientType.Telegraph)) {\n                                    typedItems.add(newItem);\n                                } else {\n                                    typedItems.add(0, newItem);\n                                }\n                            }\n                        }\n                    }\n            );\n\n            AbstractMethodHook onCreateHook = new AbstractMethodHook() {\n                @Override\n                protected void afterMethod(final MethodHookParam param) {\n\n                    Object Launch = param.thisObject;\n\n                    Object drawerLayoutAdapter = XposedHelpers.getObjectField(Launch, AutomationResolver.resolve(\"LaunchActivity\", \"drawerLayoutAdapter\", AutomationResolver.ResolverType.Field));\n                    if (drawerLayoutAdapter != null) {\n                        Object args = param.args[1];\n\n                        int id = (int) XposedHelpers.callMethod(drawerLayoutAdapter, AutomationResolver.resolve(\"DrawerLayoutAdapter\", \"getId\", AutomationResolver.ResolverType.Method), args);\n                        if (id == 8353847) {\n\n                            Object drawerLayoutContainer = XposedHelpers.getObjectField(Launch, AutomationResolver.resolve(\"LaunchActivity\", \"drawerLayoutContainer\", AutomationResolver.ResolverType.Field));\n                            if (drawerLayoutContainer != null) {\n                                XposedHelpers.callMethod(drawerLayoutContainer, AutomationResolver.resolve(\"DrawerLayoutContainer\", \"closeDrawer\", AutomationResolver.ResolverType.Method));\n                            }\n\n                            settingsController.openView();\n                        }\n\n                    }\n                }\n            };\n\n            if (ClassLoad.getClass(ClassNames.LAUNCH_ACTIVITY) != null) {\n\n                Method onCreateMethod = null;\n                for (Method method : ClassLoad.getClass(ClassNames.LAUNCH_ACTIVITY).getDeclaredMethods()) {\n                    if (Arrays.equals(method.getParameterTypes(), AutomationResolver.resolveObject(\"onCreateMethod\", new Class[]{android.view.View.class, int.class, float.class, float.class}))) {\n                        onCreateMethod = method;\n                        break;\n                    }\n                }\n\n                if (onCreateMethod == null) {\n                    Logger.w(\"Failed to hook onCreateMethod! Reason: No method found, \" + Utils.issue);\n                    return;\n                }\n\n                XposedBridge.hookMethod(onCreateMethod, onCreateHook);\n            }\n        }\n\n    }\n}\n\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/settings/ui/SettingsActivity.java",
    "content": "package com.my.televip.settings.ui;\n\n\nimport android.content.Context;\nimport android.view.View;\nimport android.widget.LinearLayout;\n\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.Drawable.ArrowDrawable;\nimport com.my.televip.audio;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.dex.DexInjector;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.settings.controller.SettingsController;\nimport com.my.televip.ui.toolBar.MainToolBar;\nimport com.my.televip.virtuals.TeleVip.Bridge.Bridge;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.ui.Components.RecyclerListView;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SettingsActivity {\n\n    public static boolean isSettings;\n\n    private final Context context;\n\n    public RecyclerListView listView;\n    private LinearLayout layout;\n\n\n    public View createView(SettingsController settingsController) {\n        try {\n            if (SettingsAdapter.items != null && !SettingsAdapter.items.isEmpty())\n                SettingsAdapter.items.clear();\n            SettingsAdapter.items = ConfigManager.getItems(context);\n\n            layout = new LinearLayout(context);\n\n            layout.setOrientation(LinearLayout.VERTICAL);\n            layout.setBackgroundColor(Theme.getBackgroundGrayColor());\n\n            MainToolBar toolbar = new MainToolBar(context);\n\n            toolbar.setColorTitle(Theme.getTextToolBarColor());\n            toolbar.setRippleColor(Theme.getToolBarRippleColor());\n            toolbar.setTextTitle(Translator.get(Keys.GhostMode));\n\n            ArrowDrawable arrow = new ArrowDrawable();\n            toolbar.setImageDrawable(arrow);\n            toolbar.getImage().setOnClickListener(v -> settingsController.hide());\n\n            layout.addView(toolbar);\n\n            listView = new RecyclerListView(context);\n\n            Object adapter = XposedHelpers.newInstance(\n                    ClassLoad.getClass(ClassNames.SETTINGS_ADAPTER_LIST_ADAPTER, DexInjector.classLoader),\n                    context);\n\n            listView.setAdapter(adapter);\n\n            listView.setBackgroundColor(Theme.getBackgroundWhiteOrBlueColor());\n\n            listView.setVerticalScrollBarEnabled(false);\n            listView.setLayoutManager(Bridge.getLayoutManager(context));\n\n            LinearLayout.LayoutParams recyclerParams = new LinearLayout.LayoutParams(\n                    LinearLayout.LayoutParams.MATCH_PARENT,\n                    0,\n                    1f\n            );\n            recyclerParams.setMargins(10, 10, 10, 0);\n\n            layout.addView(listView.getRecyclerListView(), recyclerParams);\n\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n\n        return layout;\n    }\n\n    public SettingsActivity(Context context) {\n        this.context = context;\n        isSettings = true;\n    }\n\n    public static void init(SettingsController settingsController) {\n        audio.init();\n        try {\n            HMethod.hookMethod(ClassLoad.getClass(ClassNames.LAUNCH_ACTIVITY), \"onBackPressed\", new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(MethodHookParam param) {\n                    if (isSettings) {\n                        settingsController.hide();\n                        settingsController.settingsView = null;\n                        param.setResult(null);\n                    }\n                }\n            });\n\n            HMethod.hookMethod(ClassLoad.getClass(ClassNames.ANDROID_UTILITIES), AutomationResolver.resolve(\"AndroidUtilities\", \"isTablet\", AutomationResolver.ResolverType.Method), new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(MethodHookParam param) {\n                    if (isSettings) {\n                        param.setResult(true);\n                    }\n                }\n            });\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/settings/ui/SettingsAdapter.java",
    "content": "package com.my.televip.settings.ui;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.text.TextUtils;\nimport android.view.View;\nimport android.widget.TextView;\n\nimport com.my.televip.Configs.ConfigItem;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.Utils;\nimport com.my.televip.audio;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.settings.controller.SettingsController;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.androidx.ViewHolder;\nimport com.my.televip.virtuals.messenger.browser.Browser;\nimport com.my.televip.virtuals.ui.Cells.HeaderCell;\nimport com.my.televip.virtuals.ui.Cells.TextCheckCell;\nimport com.my.televip.virtuals.ui.Cells.TextInfoCell;\nimport com.my.televip.virtuals.ui.Cells.TextSettingsCell;\n\nimport java.util.List;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SettingsAdapter {\n\n    public static List<ConfigItem> items;\n\n    private static boolean isLongText = false;\n\n\n    public static int getRow(int position) { return items.get(position).getType(); }\n\n    public static int getRowCount() {\n        return items.size();\n    }\n\n    public static void onBindViewHolder(Context context, Object holder, SettingsController settingsController, int position, int viewType) {\n        ConfigItem item = items.get(position);\n\n        switch (viewType) {\n            case ConfigItem.HEADER:\n                HeaderCellHolder headerCell = new HeaderCellHolder(holder);\n                headerCell.cell.setText(Translator.get(item.getKey()));\n                break;\n\n            case ConfigItem.SWITCH:\n                TextCheckCellHolder textCheck = new TextCheckCellHolder(holder);\n                if (item.getText() != null) {\n                    textCheck.cell.setTextAndValueAndCheck(\n                            Translator.get(item.getKey()),\n                            item.getText(),\n                            item.isEnable(),\n                            true,\n                            false\n                    );\n                } else {\n                    textCheck.cell.setTextAndCheck(\n                            Translator.get(item.getKey()),\n                            item.isEnable(),\n                            false\n                    );\n                }\n                textCheck.cell.getTextView().setLines(0);\n                textCheck.cell.getTextView().setMaxLines(0);\n                textCheck.cell.getTextView().setSingleLine(false);\n                textCheck.cell.getTextView().setEllipsize(null);\n                break;\n            case ConfigItem.BUTTON:\n                TextSettingsCellHolder settingsCell = new TextSettingsCellHolder(holder);\n                if (item.getKey().equals(Keys.DeveloperChannel)) {\n                    settingsCell.cell.setText(Translator.get(Keys.DeveloperChannel), false);\n                } else if (item.getKey().equals(Keys.RestartApp)) {\n                    settingsCell.cell.setText(Translator.get(Keys.RestartApp), false);\n                }\n                settingsCell.cell.getTextView().setTextColor(Theme.getTextBlueColor());\n                break;\n            case ConfigItem.DIVIDER:\n                ShadowSectionCellHolder shadowSectionCell = new ShadowSectionCellHolder(holder);\n                shadowSectionCell.cell.setBackgroundColor((Theme.getBackgroundGrayColor()));\n                break;\n            case ConfigItem.INFO:\n                TextInfoCellHolder textInfoCell = new TextInfoCellHolder(holder);\n                TextView textView = textInfoCell.text.getTextView();\n                if (item.getKey().equals(Keys.OfflineVisibilityInfo)) {\n                    textView.setMaxLines(2);\n                    textView.setEllipsize(TextUtils.TruncateAt.END);\n                    textView.setText(Translator.get(Keys.OfflineVisibilityInfo));\n                    if (textView.getMaxLines() == 2) {\n                        isLongText = false;\n                    }\n                    textView.setOnClickListener(v -> {\n                        if (!isLongText) {\n                            textView.setMaxLines(Integer.MAX_VALUE);\n                            textView.setEllipsize(null);\n                            isLongText = true;\n                        } else {\n                            textView.setMaxLines(2);\n                            textView.setEllipsize(TextUtils.TruncateAt.END);\n                            textView.setText(Translator.get(Keys.OfflineVisibilityInfo));\n                            isLongText = false;\n                        }\n                    });\n                }\n                break;\n        }\n        ViewHolder viewHolder = new ViewHolder(holder);\n\n        viewHolder.getItemView().setOnLongClickListener(v -> {\n\n            if (audio.playing) {\n                audio.stop();\n            } else {\n                audio.start();\n            }\n\n            return true;\n        });\n\n        viewHolder.getItemView().setOnClickListener(v -> {\n            int pos = viewHolder.getAdapterPosition();\n            ConfigItem featureItem = items.get(pos);\n\n            if (viewType == ConfigItem.SWITCH) {\n                TextCheckCellHolder textCheck = new TextCheckCellHolder(holder);\n                boolean checked = !textCheck.cell.isChecked();\n                textCheck.cell.setChecked(checked);\n                if (featureItem != null) {\n                    featureItem.setEnable(checked);\n                    ConfigManager.load(context);\n                    featureItem.run();\n                }\n            } else if (viewType == ConfigItem.BUTTON) {\n                if (featureItem.getKey().equals(Keys.DeveloperChannel)) {\n                    Browser.openUrl(context, \"https://t.me/t_l0_e\");\n                    settingsController.hide();\n                } else if (featureItem.getKey().equals(Keys.RestartApp)) {\n                    Intent intent = context\n                            .getPackageManager()\n                            .getLaunchIntentForPackage(Utils.pkgName);\n\n                    if (intent != null) {\n                        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n                        context.startActivity(intent);\n                    }\n\n                    ((Activity)context).finishAffinity();\n                    android.os.Process.killProcess(android.os.Process.myPid());\n                }\n            }\n        });\n\n    }\n\n    public static class HeaderCellHolder {\n        HeaderCell cell;\n\n        public HeaderCellHolder(Object obj) {\n            cell = new HeaderCell(XposedHelpers.getObjectField(obj, \"headerCell\"));\n        }\n    }\n\n    public static class TextCheckCellHolder {\n        TextCheckCell cell;\n\n        public TextCheckCellHolder(Object obj) {\n            cell = new TextCheckCell(XposedHelpers.getObjectField(obj, \"textCheckCell\"));\n        }\n    }\n\n    public static class TextSettingsCellHolder {\n        TextSettingsCell cell;\n\n        public TextSettingsCellHolder(Object obj) {\n            cell = new TextSettingsCell(XposedHelpers.getObjectField(obj, \"textSettingsCell\"));\n        }\n    }\n\n    public static class ShadowSectionCellHolder {\n        View cell;\n\n        public ShadowSectionCellHolder(Object obj) {\n            cell = (View) XposedHelpers.getObjectField(obj, \"view\");\n        }\n    }\n\n    public static class TextInfoCellHolder {\n        TextInfoCell text;\n\n        public TextInfoCellHolder(Object obj) {\n            text = (TextInfoCell) XposedHelpers.getObjectField(obj, \"view\");\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/structs/DeletedMessageInfo.java",
    "content": "package com.my.televip.structs;\n\nimport java.util.ArrayList;\n\npublic class DeletedMessageInfo {\n    public static final long NOT_CHANNEL = 0;\n\n    private final int selectedAccount;\n    private final long channelID;\n    private final ArrayList<Integer> messageIds;\n\n    public DeletedMessageInfo(int selectedAccount, long channelID, ArrayList<Integer> messageIds)\n    {\n        this.selectedAccount = selectedAccount;\n        this.channelID = channelID;\n        this.messageIds = messageIds;\n    }\n\n    public DeletedMessageInfo(int selectedAccount, long channelID, int messageId)\n    {\n        this.selectedAccount = selectedAccount;\n        this.channelID = channelID;\n        this.messageIds = new ArrayList<>();\n        this.messageIds.add(messageId);\n    }\n\n    public int getSelectedAccount() {\n        return this.selectedAccount;\n    }\n\n    public long getChannelID()\n    {\n        return this.channelID;\n    }\n\n\n    public ArrayList<Integer> getMessageIds() {\n        return this.messageIds;\n    }\n\n    public void insertMessageId(Integer messageId) {\n        this.messageIds.add(messageId);\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/my/televip/ui/toolBar/MainToolBar.java",
    "content": "package com.my.televip.ui.toolBar;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.content.res.ColorStateList;\nimport android.graphics.Typeface;\nimport android.graphics.drawable.Drawable;\nimport android.text.TextUtils;\nimport android.view.Gravity;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\n\nimport com.my.televip.application.AndroidUtilities;\nimport com.my.televip.virtuals.Theme;\n\npublic class MainToolBar extends LinearLayout {\n\n    private final Context context;\n    private TextView title;\n    private ImageView image;\n\n    public MainToolBar(Context context){\n        super(context);\n        this.context = context;\n        createToolbar();\n    }\n\n    private int getStatusBarHeight(Context context) {\n        int result = 0;\n        @SuppressLint({\"InternalInsetResource\", \"DiscouragedApi\"}) int resourceId = context.getResources()\n                .getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n        if (resourceId > 0) {\n            result = context.getResources().getDimensionPixelSize(resourceId);\n        }\n        return result;\n    }\n\n    public void createToolbar(){\n        int statusBar = getStatusBarHeight(context);\n\n        this.setOrientation(LinearLayout.HORIZONTAL);\n        this.setLayoutParams(new LinearLayout.LayoutParams(\n                LinearLayout.LayoutParams.MATCH_PARENT,\n                AndroidUtilities.dp(56) + statusBar));\n\n        this.setBackgroundColor(Theme.getToolBarColor());\n\n        this.setFitsSystemWindows(false);\n        this.setGravity(Gravity.BOTTOM | Gravity.CENTER_VERTICAL);\n\n        this.setPadding(\n                AndroidUtilities.dp(8),\n                statusBar,   // أهم سطر\n                AndroidUtilities.dp(16),\n                0\n        );\n\n        image = new ImageView(context);\n\n        LinearLayout.LayoutParams iconParams =\n                new LinearLayout.LayoutParams(\n                        AndroidUtilities.dp(40),\n                        AndroidUtilities.dp(40)\n                );\n\n        iconParams.gravity = Gravity.CENTER_VERTICAL;\n        image.setLayoutParams(iconParams);\n\n        image.setPadding(\n                AndroidUtilities.dp(8),\n                AndroidUtilities.dp(8),\n                AndroidUtilities.dp(8),\n                AndroidUtilities.dp(8)\n        );\n\n        image.setScaleType(ImageView.ScaleType.FIT_CENTER);\n\n\n        title = new TextView(context);\n        title.setTextSize(18);\n        title.setTypeface(Typeface.DEFAULT_BOLD);\n        title.setSingleLine(true);\n        title.setEllipsize(TextUtils.TruncateAt.END);\n\n        LinearLayout.LayoutParams titleParams =\n                new LinearLayout.LayoutParams(\n                        0,\n                        LayoutParams.WRAP_CONTENT,\n                        1f\n                );\n\n        titleParams.gravity = Gravity.CENTER_VERTICAL;\n        titleParams.setMargins(AndroidUtilities.dp(8), 0, 0, 0);\n        title.setLayoutParams(titleParams);\n\n        this.addView(image);\n        this.addView(title);\n    }\n\n    public void setTextTitle(CharSequence title) {\n        this.title.setText(title);\n    }\n\n    public void setColorTitle(int colorTitle) {\n        this.title.setTextColor(colorTitle);\n    }\n\n    public void setImageDrawable(Drawable drawable){\n        this.image.setImageDrawable(drawable);\n    }\n\n    public void setRippleColor(int color) {\n        Drawable rippleDrawable = new android.graphics.drawable.RippleDrawable(\n                ColorStateList.valueOf(color),\n                null,\n                null\n        );\n        image.setBackground(rippleDrawable);\n    }\n\n    public ImageView getImage(){\n        return this.image;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ActionBar/ActionBarMenuItem.java",
    "content": "package com.my.televip.virtuals.ActionBar;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ActionBarMenuItem {\n\n    Object actionBarMenuItem;\n\n    public ActionBarMenuItem(Object obj){\n        actionBarMenuItem = obj;\n    }\n\n    public void lazilyAddSubItem(int id, int resId, String name){\n        XposedHelpers.callMethod(actionBarMenuItem, AutomationResolver.resolve(\"ActionBarMenuItem\", \"lazilyAddSubItem\", AutomationResolver.ResolverType.Method), id, resId, name);\n    }\n    public void addSubItem(int id, int resId, String name){\n        XposedHelpers.callMethod(actionBarMenuItem, AutomationResolver.resolve(\"ActionBarMenuItem\", \"addSubItem\", AutomationResolver.ResolverType.Method), id, resId, name);\n    }\n\n    public Object getActionBarMenuItem(){\n        return  actionBarMenuItem;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ActionBar/AlertDialog.java",
    "content": "package com.my.televip.virtuals.ActionBar;\n\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.view.View;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Utils;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.lang.reflect.Proxy;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class AlertDialog {\n\n\n    @FunctionalInterface\n    public interface OnClick {\n        void onClick();\n    }\n\n    public static Object click(OnClick lambda) {\n        Class<?> listenerClass = ClassLoad.getClass(ClassNames.ALERT_DIALOG_BUTTON_CLICK);\n        if (listenerClass != null) {\n            return Proxy.newProxyInstance(\n                    Utils.classLoader,\n                    new Class[]{listenerClass},\n                    (proxy, method, args) -> {\n                        if (method.getName().equals(AutomationResolver.resolve(\"AlertDialog$OnButtonClickListener\", \"onClick\", AutomationResolver.ResolverType.Method))) {\n                            lambda.onClick();\n                        }\n                        return null;\n                    }\n            );\n        } else {\n            return (DialogInterface.OnClickListener) (dialog, which) -> lambda.onClick();\n        }\n    }\n\n    Object alertDialog;\n\n    public AlertDialog(Context context) {\n        alertDialog = XposedHelpers.newInstance(ClassLoad.getClass(ClassNames.ALERT_DIALOG_BUILDER), context);\n    }\n\n    public void setTitle(CharSequence title) {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"setTitle\", AutomationResolver.ResolverType.Method), title);\n    }\n\n    public void setView(View view) {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"setView\", AutomationResolver.ResolverType.Method), view);\n    }\n\n    public void setMessage(CharSequence message) {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"setMessage\", AutomationResolver.ResolverType.Method), message);\n    }\n\n    public void setPositiveButton(CharSequence text, Object obj) {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"setPositiveButton\", AutomationResolver.ResolverType.Method),\n                text, obj\n        );\n    }\n\n    public void setNegativeButton(CharSequence text, Object obj) {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"setNegativeButton\", AutomationResolver.ResolverType.Method),\n                text, obj\n        );\n    }\n\n    public void setNeutralButton(CharSequence text, Object obj) {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"setNeutralButton\", AutomationResolver.ResolverType.Method),\n                text, obj\n        );\n    }\n\n    public void show() {\n        XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve(\"AlertDialog\", \"show\", AutomationResolver.ResolverType.Method));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ActionBar/SimpleTextView.java",
    "content": "package com.my.televip.virtuals.ActionBar;\n\nimport android.view.View;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SimpleTextView {\n\n    Object simpleTextView;\n\n    public SimpleTextView(Object textview){\n        simpleTextView = textview;\n    }\n\n    public CharSequence getText(){\n        return (CharSequence) XposedHelpers.getObjectField(simpleTextView, AutomationResolver.resolve(\"SimpleTextView\", \"text\", AutomationResolver.ResolverType.Field));\n    }\n\n    public void setText(CharSequence text){\n        XposedHelpers.callMethod(simpleTextView, AutomationResolver.resolve(\"SimpleTextView\", \"setText\", AutomationResolver.ResolverType.Method), text);\n    }\n\n    public View getSimpleTextView(){\n        return (View) simpleTextView;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/Adapters/DrawerLayoutAdapter.java",
    "content": "package com.my.televip.virtuals.Adapters;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.util.ArrayList;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class DrawerLayoutAdapter {\n\n    private final Object drawerLayout;\n\n    public DrawerLayoutAdapter(Object obj){\n        drawerLayout = obj;\n    }\n\n    public ArrayList<?> getItems(){\n        return (ArrayList<?>) XposedHelpers.getObjectField(drawerLayout, AutomationResolver.resolve(\"DrawerLayoutAdapter\", \"items\", AutomationResolver.ResolverType.Field));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ChatMessageCellDefault.java",
    "content": "package com.my.televip.virtuals;\n\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ChatMessageCellDefault {\n    protected final Object instance;\n\n    protected ChatMessageCellDefault(Object instance)\n    {\n        this.instance = instance;\n    }\n\n    public int getTimeTextWidth()\n    {\n        return XposedHelpers.getIntField(this.instance, AutomationResolver.resolve(\"ChatMessageCell\", \"timeTextWidth\", AutomationResolver.ResolverType.Field));\n    }\n\n    public int getTimeWidth()\n    {\n        return XposedHelpers.getIntField(this.instance, AutomationResolver.resolve(\"ChatMessageCell\", \"timeWidth\", AutomationResolver.ResolverType.Field));\n    }\n\n    public void setTimeTextWidth(int width)\n    {\n        try\n        {\n            XposedHelpers.setIntField(this.instance, AutomationResolver.resolve(\"ChatMessageCell\", \"timeTextWidth\", AutomationResolver.ResolverType.Field), width);\n        }\n        catch (Throwable e)\n        {\n            Logger.e(e);\n        }\n    }\n\n    public void setTimeWidth(int width)\n    {\n        try\n        {\n            XposedHelpers.setIntField(this.instance, AutomationResolver.resolve(\"ChatMessageCell\", \"timeWidth\", AutomationResolver.ResolverType.Field), width);\n        }\n        catch (Throwable e)\n        {\n            Logger.e(e);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/OfficialChatMessageCell.java",
    "content": "package com.my.televip.virtuals;\n\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class OfficialChatMessageCell extends ChatMessageCellDefault {\n    public OfficialChatMessageCell(Object instance) {\n        super(instance);\n    }\n\n    public CharSequence getCurrentTimeString()\n    {\n        return (CharSequence) XposedHelpers.getObjectField(this.instance, AutomationResolver.resolve(\"ChatMessageCell\", \"currentTimeString\", AutomationResolver.ResolverType.Field));\n    }\n\n    public void setCurrentTimeString(CharSequence currentTimeString)\n    {\n        try\n        {\n            XposedHelpers.setObjectField(this.instance, AutomationResolver.resolve(\"ChatMessageCell\", \"currentTimeString\", AutomationResolver.ResolverType.Field), currentTimeString);\n            /*Field currentTimeStringField = FieldUtils.getFieldOfClass(this.instance, \"currentTimeString\");\n            if (currentTimeStringField != null)\n                currentTimeStringField.set(this.instance, currentTimeString);\n            else\n                throw new NullPointerException(\"Not found currentTimeString in \" + this.instance.getClass().getName());*/\n        }\n        catch (Throwable e)\n        {\n            Logger.e(e);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/SQLite/SQLiteCursor.java",
    "content": "package com.my.televip.virtuals.SQLite;\n\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.tgnet.NativeByteBuffer;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SQLiteCursor {\n\n    Object sqLiteCursor;\n\n    public SQLiteCursor(Object obj){\n        sqLiteCursor = obj;\n    }\n\n    public boolean next(){\n        return (boolean) XposedHelpers.callMethod(sqLiteCursor, AutomationResolver.resolve(\"SQLiteCursor\", \"next\", AutomationResolver.ResolverType.Method));\n    }\n\n    public int intValue(int columnIndex) {\n        return (int) XposedHelpers.callMethod(sqLiteCursor, AutomationResolver.resolve(\"SQLiteCursor\", \"intValue\", AutomationResolver.ResolverType.Method), columnIndex);\n    }\n    public void dispose() {\n        XposedHelpers.callMethod(sqLiteCursor, AutomationResolver.resolve(\"SQLiteCursor\", \"dispose\", AutomationResolver.ResolverType.Method));\n    }\n\n    public NativeByteBuffer byteBufferValue(int columnIndex){\n        return new NativeByteBuffer(XposedHelpers.callMethod(sqLiteCursor, AutomationResolver.resolve(\"SQLiteCursor\", \"byteBufferValue\", AutomationResolver.ResolverType.Method), columnIndex));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/SQLite/SQLiteDatabase.java",
    "content": "package com.my.televip.virtuals.SQLite;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SQLiteDatabase {\n\n    Object sqLiteDatabase;\n\n    public SQLiteDatabase(Object obj){ sqLiteDatabase = obj; }\n\n    public SQLiteCursor queryFinalized(String s){\n        return new SQLiteCursor(XposedHelpers.callMethod(sqLiteDatabase, AutomationResolver.resolve(\"SQLiteDatabase\", \"queryFinalized\", AutomationResolver.ResolverType.Method), s, new Object[0]));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/SettingsIconResolver.java",
    "content": "package com.my.televip.virtuals;\n\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class SettingsIconResolver {\n\n    private static Integer cachedIcon = null;\n\n    public static int getIconSettings() {\n        if (ClassLoad.getClass(ClassNames.DRAWABLE) == null) {\n            return 0;\n        }\n        if (cachedIcon != null) return cachedIcon;\n\n        String[] names = {\n                \"msg_settings\",\n                \"msg_settings_old\",\n                \"msg_settings_ny\",\n                \"msg_settings_14\",\n                \"msg_settings_hw\"\n        };\n\n        for (String name : names) {\n            try {\n                int drawableResource = XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.DRAWABLE), name);\n                if (drawableResource != 0) {\n                    cachedIcon = drawableResource;\n                    return drawableResource;\n                }\n            } catch (Throwable ignored) {}\n        }\n\n        return 0;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/TeleVip/Bridge/Bridge.java",
    "content": "package com.my.televip.virtuals.TeleVip.Bridge;\n\n\nimport android.content.Context;\nimport android.util.TypedValue;\nimport android.view.View;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.dex.DexInjector;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.settings.ui.SettingsAdapter;\nimport com.my.televip.settings.controller.SettingsController;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.ui.Cells.HeaderCell;\nimport com.my.televip.virtuals.ui.Cells.ShadowSectionCell;\nimport com.my.televip.virtuals.ui.Cells.TextCheckCell;\nimport com.my.televip.virtuals.ui.Cells.TextInfoCell;\nimport com.my.televip.virtuals.ui.Cells.TextSettingsCell;\n\nimport de.robv.android.xposed.XC_MethodHook;\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class Bridge {\n\n    public static Object getLayoutManager(Context context){\n        return XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.SETTINGS_ADAPTER, DexInjector.classLoader), \"getLayoutManager\", context);\n    }\n\n    public static void init(Context context, SettingsController settingsController){\n        try {\n            Class<?> bridgeClass = XposedHelpers.findClassIfExists(\"com.televip.SettingsAdapter.Bridge\", DexInjector.classLoader);\n            Class<?> textCheckCellClass = XposedHelpers.findClassIfExists(\"com.televip.SettingsAdapter.SettingsAdapter$TextCheckCellHolder\", DexInjector.classLoader);\n            Class<?> textSettingsCellClass = XposedHelpers.findClassIfExists(\"com.televip.SettingsAdapter.SettingsAdapter$TextSettingsCellHolder\", DexInjector.classLoader);\n            Class<?> headerCellClass = XposedHelpers.findClassIfExists(\"com.televip.SettingsAdapter.SettingsAdapter$HeaderCellHolder\", DexInjector.classLoader);\n            Class<?> shadowSectionCellClass = XposedHelpers.findClassIfExists(\"com.televip.SettingsAdapter.SettingsAdapter$ShadowSectionCellHolder\", DexInjector.classLoader);\n            Class<?> textInfoCellClass = XposedHelpers.findClassIfExists(\"com.televip.SettingsAdapter.SettingsAdapter$TextInfoCellHolder\", DexInjector.classLoader);\n\n            HMethod.hookMethod(bridgeClass, \"getRow\", int.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    param.setResult(SettingsAdapter.getRow((int) param.args[0]));\n                }\n            });\n\n            HMethod.hookMethod(bridgeClass, \"log\", String.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    Logger.l((String) param.args[0]);\n                }\n            });\n\n            HMethod.hookMethod(bridgeClass, \"getRowCount\", new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    param.setResult(SettingsAdapter.getRowCount());\n                }\n            });\n            \n            HMethod.hookMethod(bridgeClass, \"onBindViewHolder\", Object.class, int.class, int.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                   SettingsAdapter.onBindViewHolder(context, param.args[0], settingsController, (int) param.args[1], (int) param.args[2]);\n                }\n            });\n\n\n            TypedValue outValue = new TypedValue();\n            context.getTheme().resolveAttribute(\n                    android.R.attr.selectableItemBackground,\n                    outValue,\n                    true\n            );\n            \n            XposedHelpers.findAndHookConstructor(textCheckCellClass, View.class, Object.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    TextCheckCell textCheckCell = new TextCheckCell(context);\n                    textCheckCell.getView().setBackgroundColor(Theme.getBackgroundWhiteOrBlueColor());\n\n                    textCheckCell.getView().setBackgroundResource(outValue.resourceId);\n                    textCheckCell.getView().setClickable(true);\n                    textCheckCell.getView().setFocusable(true);\n                    param.args[0] = textCheckCell.getView();\n                    param.args[1] = textCheckCell.textCell;\n                }\n            });\n\n            XposedHelpers.findAndHookConstructor(textSettingsCellClass, View.class, Object.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    TextSettingsCell textSettingsCell = new TextSettingsCell(context);\n                    textSettingsCell.getView().setBackgroundColor(Theme.getBackgroundWhiteOrBlueColor());\n                    textSettingsCell.getView().setBackgroundResource(outValue.resourceId);\n                    textSettingsCell.getView().setClickable(true);\n                    textSettingsCell.getView().setFocusable(true);\n                    param.args[0] = textSettingsCell.getView();\n                    param.args[1] = textSettingsCell.textSettingsCell;\n                }\n            });\n\n            XposedHelpers.findAndHookConstructor(headerCellClass, View.class, Object.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    HeaderCell header = new HeaderCell(context);\n                    header.getView().setBackgroundColor(Theme.getBackgroundWhiteOrBlueColor());\n                    param.args[0] = header.getView();\n                    param.args[1] = header.headerCell;\n                }\n            });\n\n            XposedHelpers.findAndHookConstructor(shadowSectionCellClass, View.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    param.args[0] = new ShadowSectionCell(context).getView();\n                }\n            });\n\n            XposedHelpers.findAndHookConstructor(textInfoCellClass, View.class, new AbstractMethodHook() {\n                @Override\n                protected void beforeMethod(XC_MethodHook.MethodHookParam param) {\n                    TextInfoCell textInfoCell = new TextInfoCell(context);\n                    textInfoCell.setBackgroundColor(Theme.getBackgroundGrayColor());\n                    param.args[0] = textInfoCell;\n                }\n            });\n\n        } catch (Throwable e){\n            Logger.e(e);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/Theme.java",
    "content": "package com.my.televip.virtuals;\n\nimport android.graphics.Color;\nimport android.text.TextPaint;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Utils;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\n\nimport java.lang.reflect.Field;\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class Theme {\n\n    public static TextPaint getTextPaint(ClassLoader classLoader)\n    {\n        Class<?> theme = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.ActionBar.Theme\"), classLoader);\n        List<Field> fields = new ArrayList<>();\n        for (Field declaredField : theme.getDeclaredFields())\n            if (declaredField.getName().equals(AutomationResolver.resolve(\"Theme\", \"chat_timePaint\", AutomationResolver.ResolverType.Field)))\n                fields.add(declaredField);\n\n        if (!fields.isEmpty()) {\n            try\n            {\n                Field textPaintField = null;\n                for (Field field : fields) {\n                    if (field.getType().equals(TextPaint.class))\n                    {\n                        textPaintField = field;\n                    }\n                }\n                if (textPaintField != null)\n                    return (TextPaint) textPaintField.get(null);\n                else {\n                    for (Field field : fields) {\n                        if (field.getType().getName().contains(\"TextPaint\"))\n                        {\n                            textPaintField = field;\n                        }\n                    }\n                    if (textPaintField != null)\n                        return (TextPaint) textPaintField.get(null);\n                    else\n                        Logger.w(\"Not found chat_timePaint field in Theme, \" + Utils.issue);\n                }\n            }\n            catch (IllegalAccessException e)\n            {\n                Logger.e(e);\n            }\n        }\n        else\n            Logger.w(\"Not found chat_timePaint field in Theme, \" + Utils.issue);\n\n        return null;\n    }\n\n    public static boolean isLight(){\n        return !((boolean)XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.THEME), AutomationResolver.resolve(\"Theme\", \"isCurrentThemeDark\", AutomationResolver.ResolverType.Method)));\n    }\n\n    public static int getBackgroundGrayColor(){\n        return isLight() ? Color.rgb(241, 241, 243) : Color.rgb(21, 30, 39);\n    }\n\n    public static int getBackgroundWhiteOrBlueColor(){\n        return isLight() ? Color.WHITE : Color.rgb(29, 39, 51);\n    }\n\n    public static int getToolBarColor(){\n        return isLight() ? Color.WHITE : Color.rgb(36, 45, 57);\n    }\n\n    public static int getToolBarRippleColor(){\n        return isLight() ? 0x20000000 : 0x20FFFFFF;\n    }\n\n    public static int getTextToolBarColor(){\n        return isLight() ? Color.BLACK : Color.WHITE;\n    }\n    public static int getTextColor(){\n        return isLight() ? Color.BLACK : Color.WHITE;\n    }\n\n    public static int getTextBlueColor(){\n        return isLight() ? Color.rgb(100, 164, 221) : Color.rgb(112, 184, 221);\n    }\n    public static int getTextGrayColor(){\n        return isLight() ? Color.rgb(128, 128, 128) : Color.rgb(103,115,128);\n    }\n\n    public static int getArrowDrawableColor(){\n        return isLight() ? Color.BLACK : Color.WHITE;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/androidx/ViewHolder.java",
    "content": "package com.my.televip.virtuals.androidx;\n\nimport android.view.View;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ViewHolder {\n\n    Object viewHolder;\n\n    public ViewHolder(Object view){\n        viewHolder = view;\n    }\n\n    public View getItemView(){\n        return (View) XposedHelpers.getObjectField(viewHolder, \"itemView\");\n    }\n    public int getAdapterPosition(){\n        return (int)XposedHelpers.callMethod(viewHolder, \"getAdapterPosition\");\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/BaseController.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class BaseController {\n\n    Object baseController;\n\n    public BaseController(Object obj){baseController = obj;}\n\n    public UserConfig getUserConfig(){\n        return new UserConfig(XposedHelpers.callMethod(baseController, AutomationResolver.resolve(\"BaseController\", \"getUserConfig\", AutomationResolver.ResolverType.Method)));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/DispatchQueue.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class DispatchQueue {\n\n    Object dispatchQueue;\n\n    public DispatchQueue(Object obj){\n        dispatchQueue = obj;\n    }\n\n    public void postRunnable(Runnable runnable) {\n        XposedHelpers.callMethod(dispatchQueue, AutomationResolver.resolve(\"DispatchQueue\", \"postRunnable\", AutomationResolver.ResolverType.Method), runnable);\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/FileLoadOperation.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class FileLoadOperation {\n\n    private final Object fileOperation;\n\n    public FileLoadOperation(Object fileOperation){ this.fileOperation = fileOperation; }\n\n    public void setDownloadChunkSizeBig(int v){\n        XposedHelpers.setIntField(fileOperation, AutomationResolver.resolve(\"FileLoadOperation\", \"downloadChunkSizeBig\", AutomationResolver.ResolverType.Field), v);\n    }\n\n    public void setMaxDownloadRequests(int v){\n        XposedHelpers.setIntField(fileOperation, AutomationResolver.resolve(\"FileLoadOperation\", \"maxDownloadRequests\", AutomationResolver.ResolverType.Field), v);\n    }\n\n    public void setMaxDownloadRequestsBig(int v){\n        XposedHelpers.setIntField(fileOperation, AutomationResolver.resolve(\"FileLoadOperation\", \"maxDownloadRequestsBig\", AutomationResolver.ResolverType.Field), v);\n    }\n\n    public void setMaxCdnParts(int v){\n        XposedHelpers.setIntField(fileOperation, AutomationResolver.resolve(\"FileLoadOperation\", \"maxCdnParts\", AutomationResolver.ResolverType.Field), v);\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/FileLoader.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.io.File;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class FileLoader {\n\n    Object fileLoader;\n\n    public FileLoader(Object fileLoader){\n        this.fileLoader = fileLoader;\n    }\n\n    public File getLocalFile(ImageLocation location) {\n        return (File) XposedHelpers.callMethod(fileLoader, AutomationResolver.resolve(\"FileLoader\", \"getLocalFile\", AutomationResolver.ResolverType.Method), location.imageLocation);\n    }\n\n    public static FileLoader getInstance(int num) {\n        return new FileLoader(XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.FILE_LOADER), AutomationResolver.resolve(\"FileLoader\", \"getInstance\", AutomationResolver.ResolverType.Method), num));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/ImageLocation.java",
    "content": "package com.my.televip.virtuals.messenger;\n\npublic class ImageLocation {\n\n    public Object imageLocation;\n\n    public ImageLocation(Object image){\n        imageLocation = image;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/ImageReceiver.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ImageReceiver {\n\n    public Object imageReceiver;\n\n    public ImageReceiver(Object imageReceiver){\n        this.imageReceiver = imageReceiver;\n    }\n\n    public ImageLocation getImageLocation() {\n        return new ImageLocation(XposedHelpers.callMethod(imageReceiver, AutomationResolver.resolve(\"ImageReceiver\", \"getImageLocation\", AutomationResolver.ResolverType.Method)));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/LocaleController.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.util.Locale;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class LocaleController {\n\n    Object localeController;\n\n    public LocaleController(){\n        localeController = XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.LOCALE_CONTROLLER), AutomationResolver.resolve(\"LocaleController\", \"getInstance\", AutomationResolver.ResolverType.Method));\n    }\n\n    public Locale getCurrentLocale() {\n        return (Locale) XposedHelpers.getObjectField(localeController, AutomationResolver.resolve(\"LocaleController\", \"currentLocale\", AutomationResolver.ResolverType.Field));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/MessageObject.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class MessageObject {\n\n    static Object messageObject;\n\n    public MessageObject(Object obj){\n        messageObject = obj;\n    }\n\n    public TLRPC.Message getMessageOwner(){\n        return new TLRPC.Message(XposedHelpers.getObjectField(messageObject, AutomationResolver.resolve(\"MessageObject\",\"messageOwner\", AutomationResolver.ResolverType.Field)));\n    }\n\n    public long getDialogId() {\n        return (long) XposedHelpers.callMethod(messageObject, AutomationResolver.resolve(\"MessageObject\", \"getDialogId\", AutomationResolver.ResolverType.Method));\n    }\n\n    public static long getDialogId(TLRPC.Message message) {\n        return (long) XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), AutomationResolver.resolve(\"MessageObject\", \"getDialogId\", AutomationResolver.ResolverType.Method), message.message);\n    }\n\n    public Object getMessageObject(){\n        return messageObject;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/MessagesController.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport android.content.SharedPreferences;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class MessagesController {\n    final Object messagesController;\n\n    public MessagesController(Object instance)\n    {\n        this.messagesController = instance;\n    }\n\n    public void processNewDifferenceParams(int seq, int pts, int date, int pts_count) {\n        XposedHelpers.callMethod(messagesController, AutomationResolver.resolve(\"MessagesController\", \"processNewDifferenceParams\", AutomationResolver.ResolverType.Method), seq, pts, date, pts_count);\n    }\n\n    public void processNewDifferenceParams(int pts, int date, int pts_count) {\n        //Nagram\n        XposedHelpers.callMethod(messagesController, \"processNewDifferenceParams\", pts, date, pts_count);\n    }\n\n    public static Object getInputChannel(TLRPC.InputPeer peer) {\n        return XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), AutomationResolver.resolve(\"MessagesController\", \"getInputChannel\", AutomationResolver.ResolverType.Method), peer.inputPeer);\n    }\n\n    public static SharedPreferences getGlobalMainSettings() {\n        return (SharedPreferences) XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), AutomationResolver.resolve(\"MessagesController\", \"getGlobalMainSettings\", AutomationResolver.ResolverType.Method));\n    }\n\n\n    public static Object getInputChannel(long id) {\n        return XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), AutomationResolver.resolve(\"MessagesController\", \"getInputChannel\", AutomationResolver.ResolverType.Method), id);\n    }\n\n    public static MessagesController getInstance(int num){\n        return new MessagesController(XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.MESSAGES_CONTROLLER), AutomationResolver.resolve(\"MessagesController\", \"getInstance\", AutomationResolver.ResolverType.Method), num));\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/MessagesStorage.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.SQLite.SQLiteDatabase;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class MessagesStorage {\n\n    Object messagesStorage;\n\n    public MessagesStorage(Object obj) {\n        messagesStorage = obj;\n    }\n\n    public SQLiteDatabase getDatabase() {\n\n        return new SQLiteDatabase(XposedHelpers.getObjectField(messagesStorage, AutomationResolver.resolve(\"MessagesStorage\", \"database\", AutomationResolver.ResolverType.Field)));\n    }\n\n    public DispatchQueue getStorageQueue() {\n\n        return new DispatchQueue(XposedHelpers.callMethod(messagesStorage, AutomationResolver.resolve(\"MessagesStorage\", \"getStorageQueue\", AutomationResolver.ResolverType.Method)));\n    }\n\n    public static MessagesStorage getInstance(int num) {\n        return new MessagesStorage(XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.MESSAGES_STORAGE), AutomationResolver.resolve(\"MessagesStorage\", \"getInstance\", AutomationResolver.ResolverType.Method), num));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/NotificationCenter.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class NotificationCenter {\n\n\n    private static int messagesDeleted = -1;\n    private static int tlSchemeParseException = -1;\n\n\n    public static int getMessagesDeleted() {\n        if (messagesDeleted == -1) {\n            messagesDeleted = XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.NOTIFICATION_CENTER), AutomationResolver.resolve(\"NotificationCenter\", \"messagesDeleted\", AutomationResolver.ResolverType.Field));\n        }\n        return messagesDeleted;\n    }\n\n    public static int getTlSchemeParseException() {\n        if (tlSchemeParseException == -1) {\n            tlSchemeParseException = XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.NOTIFICATION_CENTER), AutomationResolver.resolve(\"NotificationCenter\", \"tlSchemeParseException\", AutomationResolver.ResolverType.Field));\n        }\n        return tlSchemeParseException;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/UserConfig.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class UserConfig {\n\n    Object userConfig;\n\n    public UserConfig(Object obl){\n        userConfig = obl;\n    }\n\n    public static int getSelectedAccount() {\n        String selectedAccountField = AutomationResolver.resolve(\"UserConfig\", \"selectedAccount\", AutomationResolver.ResolverType.Field);\n        return XposedHelpers.getStaticIntField(ClassLoad.getClass(ClassNames.USER_CONFIG), selectedAccountField);\n    }\n\n    public long getClientUserId(){\n        return XposedHelpers.getLongField(userConfig, AutomationResolver.resolve(\"UserConfig\" , \"clientUserId\", AutomationResolver.ResolverType.Field));\n    }\n\n    public TLRPC.User getCurrentUser(){\n        return new TLRPC.User(XposedHelpers.callMethod(userConfig, AutomationResolver.resolve(\"UserConfig\" , \"getCurrentUser\", AutomationResolver.ResolverType.Method)));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/Utilities.java",
    "content": "package com.my.televip.virtuals.messenger;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class Utilities {\n\n    public static DispatchQueue getStageQueue(){\n        return new DispatchQueue(XposedHelpers.getStaticObjectField(ClassLoad.getClass(ClassNames.UTILITIES), AutomationResolver.resolve(\"Utilities\", \"stageQueue\", AutomationResolver.ResolverType.Field)));\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/messenger/browser/Browser.java",
    "content": "package com.my.televip.virtuals.messenger.browser;\n\nimport android.content.Context;\n\nimport com.my.televip.Utils;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class Browser {\n\n    public static void openUrl(Context context, String url){\n        XposedHelpers.callStaticMethod(\n                XposedHelpers.findClass(AutomationResolver.resolve(\"org.telegram.messenger.browser.Browser\"), Utils.classLoader),\n                AutomationResolver.resolve(\"Browser\", \"openUrl\", AutomationResolver.ResolverType.Method), context, url\n        );\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/tgnet/ConnectionsManager.java",
    "content": "package com.my.televip.virtuals.tgnet;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ConnectionsManager {\n    final Object connectionsManager;\n\n    public ConnectionsManager(Object instance)\n    {\n        this.connectionsManager = instance;\n    }\n\n    public void sendRequest(Object object, Object completionBlock) {\n        XposedHelpers.callMethod(connectionsManager, AutomationResolver.resolve(\"ConnectionsManager\", \"sendRequest\", AutomationResolver.ResolverType.Method), object, completionBlock);\n    }\n\n    public static ConnectionsManager getInstance(int num){\n        return new ConnectionsManager(XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.CONNECTIONS_MANAGER), AutomationResolver.resolve(\"ConnectionsManager\", \"getInstance\", AutomationResolver.ResolverType.Method), num));\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/tgnet/NativeByteBuffer.java",
    "content": "package com.my.televip.virtuals.tgnet;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class NativeByteBuffer {\n\n    public final Object nativeByteBuffer;\n\n    public NativeByteBuffer(Object obj){\n        nativeByteBuffer = obj;\n    }\n\n    public void reuse(){\n        XposedHelpers.callMethod(nativeByteBuffer, AutomationResolver.resolve(\"NativeByteBuffer\", \"reuse\", AutomationResolver.ResolverType.Method));\n    }\n\n    public int readInt32(boolean exception) {\n        return (int) XposedHelpers.callMethod(nativeByteBuffer, AutomationResolver.resolve(\"NativeByteBuffer\",\"readInt32\", AutomationResolver.ResolverType.Method), exception);\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/tgnet/RequestDelegate.java",
    "content": "package com.my.televip.virtuals.tgnet;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Utils;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport java.lang.reflect.Proxy;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class RequestDelegate {\n\n    public Object requestDelegate;\n\n    public RequestDelegate(Object obj){\n        requestDelegate = obj;\n    }\n\n    public void run(Object response, Object error){\n        XposedHelpers.callMethod(requestDelegate, AutomationResolver.resolve(\"RequestDelegate\", \"run\", AutomationResolver.ResolverType.Method), response, error);\n    }\n\n\n    @FunctionalInterface\n    public interface requestDelegate {\n        void run(Object response, Object error);\n    }\n\n    public static Object run(requestDelegate lambda) {\n        Class<?> requestDelegateClass = ClassLoad.getClass(ClassNames.REQUEST_DELEGATE);\n        if (requestDelegateClass != null) {\n            return Proxy.newProxyInstance(\n                    Utils.classLoader,\n                    new Class[]{requestDelegateClass},\n                    (proxy, method, args) -> {\n                        if (method.getParameterCount() == 2 && method.getParameterTypes()[0] == ClassLoad.getClass(ClassNames.TL_OBJECT)) {\n                            lambda.run(args[0], args[1]);\n                        }\n                        return null;\n                    }\n            );\n        }\n        return null;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/tgnet/TLRPC.java",
    "content": "package com.my.televip.virtuals.tgnet;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Utils;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\n\nimport java.util.ArrayList;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class TLRPC {\n    public static class Peer {\n        private final Object peer;\n\n        public Peer(Object peer) {\n            this.peer = peer;\n        }\n        public long getUser_id(){\n            return XposedHelpers.getLongField(peer,\"user_id\");\n        }\n        public long getChat_id(){\n            return XposedHelpers.getLongField(peer,\"chat_id\");\n        }\n        public long getChannel_id(){\n            return XposedHelpers.getLongField(peer,\"channel_id\");\n        }\n    }\n\n    public static class User {\n        Object user;\n\n        public User(Object user) {\n            this.user = user;\n        }\n\n        public String getPhone() {\n            return (String) XposedHelpers.getObjectField(user, AutomationResolver.resolve(\"User\", \"phone\", AutomationResolver.ResolverType.Field));\n        }\n\n        public void setPhone(String phone){\n            XposedHelpers.setObjectField(user, AutomationResolver.resolve(\"User\", \"phone\", AutomationResolver.ResolverType.Field), phone);\n        }\n\n        public Object getUser(){\n            return user;\n        }\n\n    }\n\n    public static class Message {\n        public final Object message;\n        private int id;\n        public Message(Object message) {\n            this.message = message;\n        }\n        public int getID(){\n            if (id == 0){\n                id = XposedHelpers.getIntField(message, \"id\");\n            }\n            return id;\n        }\n\n        public String getMessage(){\n            return (String) XposedHelpers.getObjectField(message, \"message\");\n        }\n\n        public Peer getFrom_id(){\n            return new TLRPC.Peer(XposedHelpers.getObjectField(message, \"from_id\"));\n        }\n\n        public int getFlags(){\n            return XposedHelpers.getIntField(message,\"flags\");\n        }\n        public void setFlags(int flags){\n            XposedHelpers.setIntField(message, \"flags\", flags);\n        }\n\n        public int getTtl(){\n            return XposedHelpers.getIntField(message,\"ttl\");\n        }\n        public void setTtl(Object ttl){\n            XposedHelpers.setObjectField(message, \"ttl\", ttl);\n        }\n\n        public static Message TLdeserialize(NativeByteBuffer stream, int constructor, boolean exception){\n            return new Message(XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.TL_MESSAGE), AutomationResolver.resolve(\"TLRPC$Message\", \"TLdeserialize\", AutomationResolver.ResolverType.Method), stream.nativeByteBuffer, constructor, exception));\n        }\n\n        public void readAttachPath(NativeByteBuffer stream, long currentUserId){\n            XposedHelpers.callMethod(message, AutomationResolver.resolve(\"TLRPC$Message\", \"readAttachPath\", AutomationResolver.ResolverType.Method), stream.nativeByteBuffer, currentUserId);\n        }\n    }\n    public static class InputPeer {\n        public final Object inputPeer;\n        public InputPeer(Object message) {\n            this.inputPeer = message;\n        }\n        public long getUser_id(){\n            return XposedHelpers.getLongField(inputPeer,\"user_id\");\n        }\n        public long getChat_id(){\n            return XposedHelpers.getLongField(inputPeer,\"chat_id\");\n        }\n        public long getChannel_id(){\n            return XposedHelpers.getLongField(inputPeer,\"channel_id\");\n        }\n\n    }\n\n    public static class messages_Messages {\n        Object messages_Messages;\n\n        public messages_Messages(Object messages) {\n            messages_Messages = messages;\n        }\n        public ArrayList<Object> getMessages(){\n            return (ArrayList<Object>) XposedHelpers.getObjectField(messages_Messages, AutomationResolver.resolve(\"TLRPC$messages_Messages\", \"messages\", AutomationResolver.ResolverType.Field));\n        }\n    }\n\n    public static class TL_updateDeleteChannelMessages {\n        private final Object instance;\n\n        public TL_updateDeleteChannelMessages(Object instance)\n        {\n            this.instance = instance;\n        }\n\n        public long getChannelID()\n        {\n            try\n            {\n                return XposedHelpers.getLongField(this.instance, \"channel_id\");\n            }\n            catch (Throwable e)\n            {\n                Logger.e(e);\n            }\n            return Long.MIN_VALUE;\n        }\n\n        public ArrayList<Integer> getMessages()\n        {\n            try\n            {\n\n                return Utils.castList(XposedHelpers.getObjectField(this.instance, \"messages\"), Integer.class);\n            }\n            catch (Throwable e)\n            {\n                Logger.e(e);\n            }\n            return null;\n        }\n    }\n\n    public static class TL_updateDeleteMessages {\n        private final Object instance;\n\n        public TL_updateDeleteMessages(Object instance)\n        {\n            this.instance = instance;\n        }\n\n        public ArrayList<Integer> getMessages()\n        {\n            try\n            {\n\n                return Utils.castList(XposedHelpers.getObjectField(this.instance, \"messages\"), Integer.class);\n            }\n            catch (Throwable e)\n            {\n                Logger.e(e);\n            }\n            return null;\n        }\n    }\n\n    public static class TL_messages_affectedMessages {\n        final Object instance;\n\n        public TL_messages_affectedMessages()\n        {\n            this.instance = XposedHelpers.newInstance(ClassLoad.getClass(ClassNames.TL_MESSAGES_AFFECTED));\n        }\n        public TL_messages_affectedMessages(Object instance)\n        {\n            this.instance = instance;\n        }\n\n        public int getPts(){\n            return XposedHelpers.getIntField(instance, \"pts\");\n        }\n\n        public int getPtsCount(){\n            return XposedHelpers.getIntField(instance, \"pts_count\");\n        }\n        public void setPts(int pts){\n            XposedHelpers.setIntField(instance, \"pts\", pts);\n        }\n\n        public void setPtsCount(int pts_count){\n            XposedHelpers.setIntField(instance, \"pts_count\", pts_count);\n        }\n\n        public Object getTL_messages_affectedMessages(){\n            return instance;\n        }\n\n    }\n\n    public static class TL_channels_readHistory {\n        final Object instance;\n\n        public TL_channels_readHistory()\n        {\n            this.instance = XposedHelpers.newInstance(ClassLoad.getClass(ClassNames.TL_CHANNELS_READ_HISTORY));\n        }\n        public TL_channels_readHistory(Object instance)\n        {\n            this.instance = instance;\n        }\n\n        public void setChannel(Object channel){\n            XposedHelpers.setObjectField(instance, \"channel\", channel);\n        }\n\n        public void setMax_id(int max_id){\n            XposedHelpers.setIntField(instance, \"max_id\", max_id);\n        }\n\n        public Object getTL_channels_readHistory(){\n            return instance;\n        }\n    }\n\n    public static class TL_messages_readHistory {\n        final Object instance;\n\n        public TL_messages_readHistory()\n        {\n            this.instance = XposedHelpers.newInstance(ClassLoad.getClass(ClassNames.TL_MESSAGES_READ_HISTORY));\n        }\n\n        public TL_messages_readHistory(Object instance)\n        {\n            this.instance = instance;\n        }\n\n        public void setPeer(InputPeer peer){\n            XposedHelpers.setObjectField(instance, \"peer\", peer.inputPeer);\n        }\n\n        public void setMax_id(int max_id){\n            XposedHelpers.setIntField(instance, \"max_id\", max_id);\n        }\n\n        public Object getTL_messages_readHistory(){\n            return instance;\n        }\n\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/BaseFragment.java",
    "content": "package com.my.televip.virtuals.ui;\n\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.messenger.UserConfig;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class BaseFragment {\n\n    Object baseFragment;\n\n    public BaseFragment(Object obj){\n        baseFragment = obj;\n    }\n\n    public UserConfig getUserConfig(){\n        return new UserConfig(XposedHelpers.callMethod(baseFragment, AutomationResolver.resolve(\"BaseFragment\", \"getUserConfig\", AutomationResolver.ResolverType.Method)));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Cells/ChatMessageCell.java",
    "content": "package com.my.televip.virtuals.ui.Cells;\n\nimport android.graphics.Color;\nimport android.text.SpannableStringBuilder;\nimport android.text.Spanned;\nimport android.text.TextPaint;\nimport android.text.style.ForegroundColorSpan;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.Utils;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.features.ShowDeletedMessages;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.language.Keys;\nimport com.my.televip.language.Translator;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.OfficialChatMessageCell;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.messenger.MessageObject;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ChatMessageCell {\n\n    public static boolean isEnable = false;\n    public static MessageObject currentMessageObject;\n    public static long lastVisibleTime = -1;\n\n    public static void init() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n                if (ClassLoad.getClass(ClassNames.CHAT_MESSAGE_CELL) != null) {\n                    HMethod.hookMethod(ClassLoad.getClass(ClassNames.CHAT_MESSAGE_CELL), AutomationResolver.resolve(\"ChatMessageCell\", \"measureTime\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"measureTime\", new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT)}), new AbstractMethodHook() {\n                        @Override\n                        protected void afterMethod(MethodHookParam param) {\n                            if (ConfigManager.showDeletedMessages.isEnable() || ConfigManager.showMessageId.isEnable()) {\n                                try {\n                                    currentMessageObject = new MessageObject(XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve(\"ChatMessageCell\", \"currentMessageObject\", AutomationResolver.ResolverType.Field)));\n                                    lastVisibleTime = System.currentTimeMillis();\n                                    Object msgObj = param.args[0];\n                                    if (msgObj == null)\n                                        return;\n                                    MessageObject messageObject = new MessageObject(msgObj);\n                                    TLRPC.Message owner = messageObject.getMessageOwner();\n                                    if (owner == null)\n                                        return;\n                                    int flags = owner.getFlags();\n                                    if (ConfigManager.showMessageId.isEnable()) {\n                                        if (owner.getID() != 0) {\n                                            String textId = \"ID \" + owner.getID();\n                                            setSpannableStringBuilderText(textId, param.thisObject, false);\n                                        }\n                                    }\n\n                                    if ((flags & ShowDeletedMessages.FLAG_DELETED) != 0 & ConfigManager.showDeletedMessages.isEnable()) {\n                                        setSpannableStringBuilderText(Translator.get(Keys.Deleted), param.thisObject, true);\n                                    } else {\n                                        TextPaint paint = Theme.getTextPaint(Utils.classLoader);\n                                        paint.setShadowLayer(0, 0, 0, Color.WHITE);\n                                    }\n                                } catch (Throwable throwable) {\n                                    Logger.e(throwable);\n                                }\n                            }\n                        }\n                    }));\n                }\n            }\n        } catch (Throwable t){\n            Logger.e(t);\n        }\n    }\n\n\n    public static SpannableStringBuilder convertToStringBuilder(CharSequence charSequence) {\n        if (charSequence != null)\n            return charSequence instanceof SpannableStringBuilder ? (SpannableStringBuilder) charSequence : new SpannableStringBuilder(charSequence);\n        else\n            return null;\n    }\n\n    private static void setSpannableStringBuilderText(String text, Object thisObject, boolean color){\n        OfficialChatMessageCell cell = new OfficialChatMessageCell(thisObject);\n        SpannableStringBuilder time = convertToStringBuilder(cell.getCurrentTimeString());\n        if (time == null)\n            return;\n        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(text);\n        if (color)\n            spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.rgb(255, 0, 0)), 0, spannableStringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n        spannableStringBuilder.append(\" \");\n        time.insert(0, spannableStringBuilder);\n        cell.setCurrentTimeString(time);\n        TextPaint paint = Theme.getTextPaint(Utils.classLoader);\n        if (paint != null) {\n            int ceil = (int) Math.ceil(paint.measureText(spannableStringBuilder, 0, spannableStringBuilder.length()));\n            cell.setTimeTextWidth(ceil + cell.getTimeTextWidth());\n            cell.setTimeWidth(ceil + cell.getTimeWidth());\n        }\n    }\n\n    Object chatMessageCell;\n\n    public ChatMessageCell(Object cell){ chatMessageCell = cell; }\n\n    public MessageObject getMessageObject() {\n        return new MessageObject(XposedHelpers.callMethod(chatMessageCell, AutomationResolver.resolve(\"ChatMessageCell\", \"getMessageObject\", AutomationResolver.ResolverType.Method)));\n    }\n\n    public Object getChatMessageCell(){\n        return chatMessageCell;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Cells/HeaderCell.java",
    "content": "package com.my.televip.virtuals.ui.Cells;\n\nimport android.content.Context;\nimport android.view.View;\n\nimport com.my.televip.Utils;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class HeaderCell {\n\n    public Object headerCell;\n\n    public HeaderCell(Context context){\n        Class<?> headerCellClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.Cells.HeaderCell\"), Utils.classLoader);\n        headerCell = XposedHelpers.newInstance(headerCellClass, context);\n    }\n\n    public HeaderCell(Object obj){\n       headerCell = obj;\n    }\n\n    public View getView(){\n        return (View) headerCell;\n    }\n\n    public void setText(CharSequence text){\n        XposedHelpers.callMethod(headerCell, AutomationResolver.resolve(\"HeaderCell\",\"setText\", AutomationResolver.ResolverType.Method), text);\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Cells/ShadowSectionCell.java",
    "content": "package com.my.televip.virtuals.ui.Cells;\n\nimport android.content.Context;\nimport android.view.View;\n\nimport com.my.televip.Utils;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ShadowSectionCell {\n\n    Object shadowSectionCell;\n\n    public ShadowSectionCell(Context context){\n        Class<?> shadowSectionCellClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.Cells.ShadowSectionCell\"), Utils.classLoader);\n        shadowSectionCell = XposedHelpers.newInstance(shadowSectionCellClass, context);\n    }\n\n    public View getView(){\n        return (View) shadowSectionCell;\n    }\n\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Cells/TextCheckCell.java",
    "content": "package com.my.televip.virtuals.ui.Cells;\n\nimport android.content.Context;\nimport android.view.View;\nimport android.widget.TextView;\n\nimport com.my.televip.Utils;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class TextCheckCell {\n\n    public Object textCell;\n\n    public TextCheckCell(Context context){\n        Class<?> textCheckClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve(\"org.telegram.ui.Cells.TextCheckCell\"), Utils.classLoader);\n        textCell = XposedHelpers.newInstance(textCheckClass, context);\n    }\n\n    public TextCheckCell(Object obj){\n        textCell = obj;\n    }\n\n    public void setTextAndValueAndCheck(CharSequence text, String value, boolean checked, boolean multiline, boolean divider){\n        XposedHelpers.callMethod(textCell, AutomationResolver.resolve(\"TextCheckCell\",\"setTextAndValueAndCheck\", AutomationResolver.ResolverType.Method), text, value, checked, multiline,  divider);\n    }\n\n    public void setTextAndCheck(CharSequence text, boolean checked, boolean divider){\n        XposedHelpers.callMethod(textCell, AutomationResolver.resolve(\"TextCheckCell\",\"setTextAndCheck\", AutomationResolver.ResolverType.Method), text, checked,  divider);\n    }\n\n    public void setChecked(boolean checked){\n        XposedHelpers.callMethod(textCell, AutomationResolver.resolve(\"TextCheckCell\",\"setChecked\", AutomationResolver.ResolverType.Method), checked);\n    }\n\n    public boolean isChecked(){\n        return (boolean) XposedHelpers.callMethod(textCell, AutomationResolver.resolve(\"TextCheckCell\",\"isChecked\", AutomationResolver.ResolverType.Method));\n    }\n\n    public TextView getTextView(){\n        return (TextView) XposedHelpers.getObjectField(textCell,AutomationResolver.resolve(\"TextCheckCell\",\"textView\", AutomationResolver.ResolverType.Field));\n    }\n\n    public View getView(){\n        return (View) textCell;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Cells/TextInfoCell.java",
    "content": "package com.my.televip.virtuals.ui.Cells;\n\nimport android.content.Context;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.widget.FrameLayout;\nimport android.widget.TextView;\n\nimport com.my.televip.application.AndroidUtilities;\nimport com.my.televip.virtuals.Theme;\nimport com.my.televip.virtuals.ui.Components.LayoutHelper;\n\npublic class TextInfoCell extends FrameLayout {\n\n    private final TextView textView;\n\n    public TextInfoCell(Context context) {\n        super(context);\n\n        textView = new TextView(context);\n        textView.setTextColor(Theme.getTextGrayColor());\n        textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13);\n        textView.setGravity(Gravity.CENTER);\n        textView.setPadding(0, AndroidUtilities.dp(19), 0, AndroidUtilities.dp(19));\n        addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 17, 0, 17, 0));\n    }\n\n    @Override\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n        super.onMeasure(MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));\n    }\n\n    public TextView getTextView() {\n        return textView;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Cells/TextSettingsCell.java",
    "content": "package com.my.televip.virtuals.ui.Cells;\n\nimport android.content.Context;\nimport android.view.View;\nimport android.widget.TextView;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class TextSettingsCell {\n\n    public Object textSettingsCell;\n\n    public TextSettingsCell(Context context){\n        textSettingsCell = XposedHelpers.newInstance(ClassLoad.getClass(ClassNames.TEXT_SETTINGS_CELL), context);\n    }\n\n    public TextSettingsCell(Object obj){\n        textSettingsCell = obj;\n    }\n\n    public View getView(){\n        return (View) textSettingsCell;\n    }\n\n    public void setText(CharSequence text, boolean divider){\n        XposedHelpers.callMethod(textSettingsCell, AutomationResolver.resolve(\"TextSettingsCell\",\"setText\", AutomationResolver.ResolverType.Method), text, divider);\n    }\n\n    public TextView getTextView(){\n        return (TextView) XposedHelpers.getObjectField(textSettingsCell,AutomationResolver.resolve(\"TextSettingsCell\",\"textView\", AutomationResolver.ResolverType.Field));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/ChatActivity.java",
    "content": "package com.my.televip.virtuals.ui;\n\nimport android.view.View;\n\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.ActionBar.ActionBarMenuItem;\nimport com.my.televip.virtuals.messenger.MessageObject;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ChatActivity {\n\n\n    final Object chatActivity;\n\n    public ChatActivity(Object obj){\n        chatActivity = obj;\n    }\n\n    public MessageObject getSelectedObject(){\n        return new MessageObject(XposedHelpers.getObjectField(chatActivity, AutomationResolver.resolve(\"ChatActivity\",\"selectedObject\", AutomationResolver.ResolverType.Field)));\n    }\n\n    public ActionBarMenuItem getHeaderItem(){\n        return new ActionBarMenuItem(XposedHelpers.getObjectField(chatActivity, AutomationResolver.resolve(\"ChatActivity\", \"headerItem\", AutomationResolver.ResolverType.Field)));\n    }\n    public View getPinnedMessageView(){\n        return (View) XposedHelpers.getObjectField(chatActivity, AutomationResolver.resolve(\"ChatActivity\", \"pinnedMessageView\", AutomationResolver.ResolverType.Field));\n    }\n\n    public void scrollToMessageId(int id, int fromMessageId, boolean select, int loadIndex, boolean forceScroll, int forcePinnedMessageId){\n        XposedHelpers.callMethod(chatActivity, AutomationResolver.resolve(\"ChatActivity\", \"scrollToMessageId\", AutomationResolver.ResolverType.Method), id, fromMessageId, select, loadIndex, forceScroll, forcePinnedMessageId);\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Components/LayoutHelper.java",
    "content": "package com.my.televip.virtuals.ui.Components;\n\nimport android.widget.FrameLayout;\n\nimport com.my.televip.application.AndroidUtilities;\n\npublic class LayoutHelper {\n\n    public static final int MATCH_PARENT = -1;\n    public static final int WRAP_CONTENT = -2;\n\n    private static int getSize(float size) {\n        return (int) (size < 0 ? size : AndroidUtilities.dp(size));\n    }\n\n    public static FrameLayout.LayoutParams createFrame(int width, float height, int gravity, float leftMargin, float topMargin, float rightMargin, float bottomMargin) {\n        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(getSize(width), getSize(height), gravity);\n        layoutParams.setMargins(AndroidUtilities.dp(leftMargin), AndroidUtilities.dp(topMargin), AndroidUtilities.dp(rightMargin), AndroidUtilities.dp(bottomMargin));\n        return layoutParams;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/Components/RecyclerListView.java",
    "content": "package com.my.televip.virtuals.ui.Components;\n\nimport android.content.Context;\nimport android.view.View;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.dex.DexInjector;\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class RecyclerListView {\n\n    public final Object recyclerListView;\n\n    public RecyclerListView(Context context){\n        recyclerListView = XposedHelpers.newInstance(ClassLoad.getClass(ClassNames.SETTINGS_ADAPTER_RECYCLER_LIST_VIEW, DexInjector.classLoader), context);\n    }\n\n    public void setAdapter(Object adapter) {\n        XposedHelpers.callMethod(recyclerListView, AutomationResolver.resolve(\"RecyclerListView\", \"setAdapter\", AutomationResolver.ResolverType.Method), adapter);\n    }\n\n    public void setBackgroundColor(int color) {\n        ((View)recyclerListView).setBackgroundColor(color);\n    }\n\n    public void setVerticalScrollBarEnabled(boolean b) {\n        ((View)recyclerListView).setVerticalScrollBarEnabled(b);\n    }\n\n    public void setLayoutManager(Object layout) {\n        XposedHelpers.callMethod(recyclerListView, AutomationResolver.resolve(\"RecyclerListView\", \"setLayoutManager\", AutomationResolver.ResolverType.Method), layout);\n    }\n\n    public View getRecyclerListView() {\n       return (View) recyclerListView;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/LaunchActivity.java",
    "content": "package com.my.televip.virtuals.ui;\n\nimport android.widget.FrameLayout;\n\nimport com.my.televip.obfuscate.AutomationResolver;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class LaunchActivity {\n\n    Object launchActivity;\n    public FrameLayout frameLayout;\n\n    public LaunchActivity(Object obj){\n       launchActivity = obj;\n       frameLayout = (FrameLayout) XposedHelpers.getObjectField(obj, AutomationResolver.resolve(\"LaunchActivity\",\"frameLayout\", AutomationResolver.ResolverType.Field));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/PhotoViewer.java",
    "content": "package com.my.televip.virtuals.ui;\n\nimport android.app.Activity;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.messenger.ImageReceiver;\nimport com.my.televip.virtuals.messenger.MessageObject;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class PhotoViewer {\n\n    Object photoViewer;\n\n    public PhotoViewer(Object photoViewer){\n        this.photoViewer = photoViewer;\n    }\n\n    public static PhotoViewer getInstance(){\n        return new PhotoViewer(XposedHelpers.callStaticMethod(ClassLoad.getClass(ClassNames.PHOTO_VIEWER), AutomationResolver.resolve(\"PhotoViewer\", \"getInstance\", AutomationResolver.ResolverType.Method)));\n    }\n\n    public void setParentActivity(Activity activity){\n        XposedHelpers.callMethod(photoViewer,  AutomationResolver.resolve(\"PhotoViewer\", \"setParentActivity\", AutomationResolver.ResolverType.Method), activity);\n    }\n\n    public void openPhoto(MessageObject messageObject, long l, long l2, long l3, PhotoViewerProvider provider, boolean b){\n        XposedHelpers.callMethod(photoViewer,  AutomationResolver.resolve(\"PhotoViewer\", \"openPhoto\", AutomationResolver.ResolverType.Method), messageObject.getMessageObject(),l, l2, l3, provider.getPhotoViewerProvider(), b);\n    }\n\n    public static class PhotoViewerProvider {\n        Object photoViewerProvider;\n\n        public PhotoViewerProvider(Object photoViewer) {\n            photoViewerProvider = photoViewer;\n        }\n\n        public PlaceProviderObject getPlaceForPhoto(MessageObject messageObject, Object fileLocation, int index, boolean needPreview, boolean closing) {\n            return new PlaceProviderObject(XposedHelpers.callMethod(photoViewerProvider,  AutomationResolver.resolve(\"PhotoViewer$PhotoViewerProvider\", \"getPlaceForPhoto\", AutomationResolver.ResolverType.Method), messageObject.getMessageObject(), fileLocation, index, needPreview, closing));\n        }\n\n        public Object getPhotoViewerProvider() {\n            return photoViewerProvider;\n        }\n\n    }\n\n    public static class PlaceProviderObject {\n        Object placeProviderObject;\n\n        public PlaceProviderObject(Object placeProvider) {\n            placeProviderObject = placeProvider;\n        }\n\n        public ImageReceiver getImageReceiver() {\n            return new ImageReceiver(XposedHelpers.getObjectField(placeProviderObject,  AutomationResolver.resolve(\"PhotoViewer$PlaceProviderObject\", \"imageReceiver\", AutomationResolver.ResolverType.Field)));\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/ProfileActivity.java",
    "content": "package com.my.televip.virtuals.ui;\n\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.virtuals.ActionBar.ActionBarMenuItem;\n\nimport de.robv.android.xposed.XposedHelpers;\n\npublic class ProfileActivity {\n\n    Object profileActivity;\n\n    public ProfileActivity(Object obj){\n        profileActivity = obj;\n    }\n\n    public long getChatId(){\n        return XposedHelpers.getLongField(profileActivity, AutomationResolver.resolve(\"ProfileActivity\", \"chatId\", AutomationResolver.ResolverType.Field));\n    }\n\n    public long getUserId(){\n        return XposedHelpers.getLongField(profileActivity, AutomationResolver.resolve(\"ProfileActivity\", \"userId\", AutomationResolver.ResolverType.Field));\n    }\n\n    public Object[] getNameTextView(){\n        return  (Object[]) XposedHelpers.getObjectField(profileActivity, AutomationResolver.resolve(\"ProfileActivity\", \"nameTextView\", AutomationResolver.ResolverType.Field));\n    }\n    public Object[] getOnlineTextView(){\n        return  (Object[]) XposedHelpers.getObjectField(profileActivity, AutomationResolver.resolve(\"ProfileActivity\", \"onlineTextView\", AutomationResolver.ResolverType.Field));\n    }\n\n    public ActionBarMenuItem getOtherItem(){\n        return new ActionBarMenuItem(XposedHelpers.getObjectField(profileActivity, AutomationResolver.resolve(\"ProfileActivity\", \"otherItem\", AutomationResolver.ResolverType.Field)));\n    }\n\n    public BaseFragment getBaseFragment(){\n        return new BaseFragment(profileActivity);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/my/televip/virtuals/ui/SecretMediaViewer.java",
    "content": "package com.my.televip.virtuals.ui;\n\nimport com.my.televip.Class.ClassNames;\nimport com.my.televip.Configs.ConfigManager;\nimport com.my.televip.base.AbstractMethodHook;\nimport com.my.televip.features.SecretMediaSave;\nimport com.my.televip.hooks.HMethod;\nimport com.my.televip.Class.ClassLoad;\nimport com.my.televip.obfuscate.AutomationResolver;\nimport com.my.televip.logging.Logger;\nimport com.my.televip.virtuals.messenger.FileLoader;\nimport com.my.televip.virtuals.messenger.MessageObject;\nimport com.my.televip.virtuals.messenger.UserConfig;\nimport com.my.televip.virtuals.tgnet.TLRPC;\n\nimport java.io.File;\n\npublic class SecretMediaViewer {\n\n    private static boolean isEnable = false;\n\n    public static void openMedia() {\n        try {\n            if (!isEnable) {\n                isEnable = true;\n\n                if (ClassLoad.getClass(ClassNames.SECRET_MEDIA_VIEWER) == null) return;\n\n                HMethod.hookMethod(ClassLoad.getClass(ClassNames.SECRET_MEDIA_VIEWER), AutomationResolver.resolve(\"SecretMediaViewer\", \"openMedia\", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject(\"PhotoViewer$PhotoViewerProvider\", new Class[]{ClassLoad.getClass(ClassNames.MESSAGE_OBJECT), ClassLoad.getClass(ClassNames.PHOTO_VIEWER_PROVIDER), java.lang.Runnable.class, java.lang.Runnable.class}), new AbstractMethodHook() {\n                    @Override\n                    protected void beforeMethod(MethodHookParam param) {\n                        if (ConfigManager.preventMedia.isEnable() && !ConfigManager.secretMediaSave.isEnable()) {\n                            param.args[2] = null;\n                            param.args[3] = null;\n\n                            MessageObject messageObject = new MessageObject(param.args[0]);\n                            if (messageObject.getMessageObject() != null) {\n                                TLRPC.Message messageOwner = messageObject.getMessageOwner();\n                                if (messageOwner.message != null) {\n                                    messageOwner.setTtl(0);\n                                }\n                            }\n                        }\n\n                        if (ConfigManager.secretMediaSave.isEnable() && (param.args.length >= 2 || param.args[0] != null)) {\n                            MessageObject messageObject = new MessageObject(param.args[0]);\n                            PhotoViewer.PhotoViewerProvider provider = new PhotoViewer.PhotoViewerProvider(param.args[1]);\n                            final PhotoViewer.PlaceProviderObject object = provider.getPlaceForPhoto(messageObject, null, 0, true, false);\n                            if (object.getImageReceiver().imageReceiver != null) {\n                                FileLoader fileLoader = FileLoader.getInstance(UserConfig.getSelectedAccount());\n                                File image = fileLoader.getLocalFile(object.getImageReceiver().getImageLocation());\n                                if (image != null) {\n                                    SecretMediaSave.pathImage = image;\n                                    SecretMediaSave.id = messageObject.getMessageOwner().getID();\n                                }\n                                PhotoViewer.getInstance().openPhoto(messageObject, messageObject.getDialogId(), 0L, 0L, provider, false);\n                                param.setResult(null);\n                            }\n                        }\n                    }\n                }));\n            }\n        } catch (Throwable e) {\n            Logger.e(e);\n        }\n    }\n\n}"
  },
  {
    "path": "app/src/main/res/drawable/baseline_arrow_back_24.xml",
    "content": "<vector android:autoMirrored=\"true\" android:height=\"24dp\"\n    android:tint=\"#FFFFFF\" android:viewportHeight=\"24\"\n    android:viewportWidth=\"24\" android:width=\"24dp\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <path android:fillColor=\"@android:color/white\" android:pathData=\"M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z\"/>\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:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillColor=\"#3DDC84\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\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    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path android:pathData=\"M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"85.84757\"\n                android:endY=\"92.4963\"\n                android:startX=\"42.9492\"\n                android:startY=\"49.59793\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z\"\n        android:strokeWidth=\"1\"\n        android:strokeColor=\"#00000000\" />\n</vector>"
  },
  {
    "path": "app/src/main/res/drawable/messages.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#8A000000\"\n        android:pathData=\"M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/sync.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#8A000000\"\n        android:pathData=\"M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi/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=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi/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=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string-array name=\"xposedscope\">\n        <item>org.telegram.messenger</item>\n        <item>org.telegram.plus</item>\n        <item>com.tgconnect.android</item>\n        <item>com.iMe.android</item>\n        <item>com.xplus.messenger</item>\n        <item>xyz.nextalone.nagram</item>\n        <item>uz.unnarsx.cherrygram</item>\n        <item>app.nicegram</item>\n        <item>org.telegram.messenger.web</item>\n        <item>org.telegram.messenger.beta</item>\n        <item>org.forkclient.messenger.beta</item>\n        <item>org.forkgram.messenger</item>\n        <item>nu.gpu.nagram</item>\n        <item>com.iMe.android.web</item>\n        <item>ir.ilmili.telegraph</item>\n        <item>ru.dahl.messenger</item>\n        <item>nekox.messenger.broken</item>\n      <!--  <item>momo.gram</item> -->\n    </string-array>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">TeleVip</string>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"Theme.TeleVip\" parent=\"android:Theme.Material.Light.NoActionBar\" />\n</resources>"
  },
  {
    "path": "app/src/main/res/xml/backup_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n   Sample backup rules file; uncomment and customize as necessary.\n   See https://developer.android.com/guide/topics/data/autobackup\n   for details.\n   Note: This file is ignored for devices older that API 31\n   See https://developer.android.com/about/versions/12/backup-restore\n-->\n<full-backup-content>\n    <!--\n   <include domain=\"sharedpref\" path=\".\"/>\n   <exclude domain=\"sharedpref\" path=\"device.xml\"/>\n-->\n</full-backup-content>"
  },
  {
    "path": "app/src/main/res/xml/data_extraction_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n   Sample data extraction rules file; uncomment and customize as necessary.\n   See https://developer.android.com/about/versions/12/backup-restore#xml-changes\n   for details.\n-->\n<data-extraction-rules>\n    <cloud-backup>\n        <!-- TODO: Use <include> and <exclude> to control what is backed up.\n        <include .../>\n        <exclude .../>\n        -->\n    </cloud-backup>\n    <!--\n    <device-transfer>\n        <include .../>\n        <exclude .../>\n    </device-transfer>\n    -->\n</data-extraction-rules>"
  },
  {
    "path": "app/src/test/java/com/my/televip/ExampleUnitTest.java",
    "content": "package com.my.televip;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath libs.gradle\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        maven { url 'https://jitpack.io' }\n        maven { url 'https://api.xposed.info/' }\n    }\n}\n\ntasks.register('clean', Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/libs.versions.toml",
    "content": "[versions]\nagp = \"8.12.1\"\napi = \"82\"\ngradle = \"8.2.2\"\ngson = \"2.13.1\"\njunit = \"4.13.2\"\njunitVersion = \"1.3.0\"\nespressoCore = \"3.7.0\"\nappcompat = \"1.7.1\"\nmaterial = \"1.12.0\"\npreference = \"1.2.1\"\nconstraintlayout = \"2.1.4\"\nlifecycle-livedata-ktx = \"2.6.1\"\nlifecycle-viewmodel-ktx = \"2.6.1\"\nlifecycle-runtime-ktx = \"2.10.0\"\nactivity-compose = \"1.7.0\"\ncompose-bom = \"2023.08.00\"\n\n[libraries]\napi = { module = \"de.robv.android.xposed:api\", version.ref = \"api\" }\ngradle = { module = \"com.android.tools.build:gradle\", version.ref = \"gradle\" }\ngson = { module = \"com.google.code.gson:gson\", version.ref = \"gson\" }\njunit = { group = \"junit\", name = \"junit\", version.ref = \"junit\" }\next-junit = { group = \"androidx.test.ext\", name = \"junit\", version.ref = \"junitVersion\" }\nespresso-core = { group = \"androidx.test.espresso\", name = \"espresso-core\", version.ref = \"espressoCore\" }\nappcompat = { group = \"androidx.appcompat\", name = \"appcompat\", version.ref = \"appcompat\" }\nmaterial = { group = \"com.google.android.material\", name = \"material\", version.ref = \"material\" }\npreference = { module = \"androidx.preference:preference\", version.ref = \"preference\" }\nconstraintlayout = { group = \"androidx.constraintlayout\", name = \"constraintlayout\", version.ref = \"constraintlayout\" }\nlifecycle-livedata-ktx = { group = \"androidx.lifecycle\", name = \"lifecycle-livedata-ktx\", version.ref = \"lifecycle-livedata-ktx\" }\nlifecycle-viewmodel-ktx = { group = \"androidx.lifecycle\", name = \"lifecycle-viewmodel-ktx\", version.ref = \"lifecycle-viewmodel-ktx\" }\nlifecycle-runtime-ktx = { group = \"androidx.lifecycle\", name = \"lifecycle-runtime-ktx\", version.ref = \"lifecycle-runtime-ktx\" }\nactivity-compose = { group = \"androidx.activity\", name = \"activity-compose\", version.ref = \"activity-compose\" }\ncompose-bom = { group = \"androidx.compose\", name = \"compose-bom\", version.ref = \"compose-bom\" }\nui = { group = \"androidx.compose.ui\", name = \"ui\" }\nui-graphics = { group = \"androidx.compose.ui\", name = \"ui-graphics\" }\nui-tooling = { group = \"androidx.compose.ui\", name = \"ui-tooling\" }\nui-tooling-preview = { group = \"androidx.compose.ui\", name = \"ui-tooling-preview\" }\nui-test-manifest = { group = \"androidx.compose.ui\", name = \"ui-test-manifest\" }\nui-test-junit4 = { group = \"androidx.compose.ui\", name = \"ui-test-junit4\" }\nmaterial3 = { group = \"androidx.compose.material3\", name = \"material3\" }\n\n[plugins]\nandroid-application = { id = \"com.android.application\", version.ref = \"agp\" }\n\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed May 14 16:38:25 AST 2025\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.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.\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. For more details, visit\n# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Enables namespacing of each library's R class so that its R class includes only the\n# resources declared in the library itself and none from the library's dependencies,\n# thereby reducing the size of the R class for that library\nandroid.nonTransitiveRClass=true"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or 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 UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$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}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\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\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif [ \"$cygwin\" = \"true\" -o \"$msys\" = \"true\" ] ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=`expr $i + 1`\n    done\n    case $i in\n        0) set -- ;;\n        1) set -- \"$args0\" ;;\n        2) set -- \"$args0\" \"$args1\" ;;\n        3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=`save \"$@\"`\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\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": "rootProject.name = \"TeleVip\"\ninclude ':app'\ninclude ':settingsadapter'\ninclude ':TeleVip'\n"
  },
  {
    "path": "settingsadapter/.gitignore",
    "content": "/build"
  },
  {
    "path": "settingsadapter/build.gradle",
    "content": "plugins {\n    id 'com.android.application'\n}\n\nandroid {\n    namespace 'com.televip.SettingsAdapter'\n    compileSdk 36\n\n    defaultConfig {\n        applicationId \"com.televip.SettingsAdapter\"\n        minSdk 27\n        targetSdk 36\n        versionCode 1\n        versionName \"1.0\"\n\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n}\n\ndependencies {\n    compileOnly libs.appcompat\n    compileOnly libs.material\n}"
  },
  {
    "path": "settingsadapter/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"
  },
  {
    "path": "settingsadapter/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\" >\n</manifest>"
  },
  {
    "path": "settingsadapter/src/main/java/com/televip/SettingsAdapter/Bridge.java",
    "content": "package com.televip.SettingsAdapter;\n\npublic class Bridge {\n\n    public static int getRow(int pos){ return 0; }\n    public static int getRowCount(){ return 0; }\n\n    public static void onBindViewHolder(Object holder, int position, int viewType){}\n\n    public static void log(String log){}\n}\n"
  },
  {
    "path": "settingsadapter/src/main/java/com/televip/SettingsAdapter/SettingsAdapter.java",
    "content": "package com.televip.SettingsAdapter;\n\nimport static com.televip.SettingsAdapter.Bridge.getRow;\nimport static com.televip.SettingsAdapter.Bridge.getRowCount;\n\nimport android.content.Context;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.FrameLayout;\n\nimport androidx.annotation.NonNull;\nimport androidx.recyclerview.widget.LinearLayoutManager;\nimport androidx.recyclerview.widget.RecyclerView;\n\npublic class SettingsAdapter {\n\n    public static LinearLayoutManager getLayoutManager(Context context){\n        return new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false);\n    }\n\n    public static class RecyclerListView extends RecyclerView {\n\n        public RecyclerListView(@NonNull Context context) {\n            super(context);\n        }\n    }\n\n\n        public static class ListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n\n        public Context MContext;\n\n        public ListAdapter(Context context) {\n            MContext = context;\n        }\n\n        @Override\n        public int getItemViewType(int position) {\n            return getRow(position);\n        }\n\n\n        @Override\n        public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {\n\n            int viewType = getItemViewType(position);\n            Bridge.onBindViewHolder(holder, position, viewType);\n        }\n\n        @Override\n        public int getItemCount() {\n            return getRowCount();\n        }\n\n        @NonNull\n        @Override\n        public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n            switch (viewType) {\n\n                case 1:\n                    return new TextCheckCellHolder(new FrameLayout(MContext), null);\n                case 2:\n                    return new TextSettingsCellHolder(new FrameLayout(MContext), null);\n                case 3:\n                    return new ShadowSectionCellHolder(new FrameLayout(MContext));\n                case 4:\n                    return new TextInfoCellHolder(new FrameLayout(MContext));\n                case 0:\n                default:\n                    return new HeaderCellHolder(new FrameLayout(MContext), null);\n            }\n        }\n    }\n\n\n    static class TextCheckCellHolder extends RecyclerView.ViewHolder {\n\n        public Object textCheckCell;\n\n        public TextCheckCellHolder(View view, Object  textCheckCell) {\n            super(view);\n            this.textCheckCell = textCheckCell;\n        }\n    }\n\n    static class HeaderCellHolder extends RecyclerView.ViewHolder {\n\n        public Object headerCell;\n\n        public HeaderCellHolder(View view, Object headerCell) {\n            super (view);\n            this.headerCell = headerCell;\n        }\n    }\n\n    static class TextSettingsCellHolder extends RecyclerView.ViewHolder {\n\n        public Object textSettingsCell;\n\n        public TextSettingsCellHolder(View view, Object textSettingsCell) {\n            super(view);\n            this.textSettingsCell = textSettingsCell;\n        }\n    }\n\n    static class ShadowSectionCellHolder extends RecyclerView.ViewHolder {\n\n        public View view;\n\n        public ShadowSectionCellHolder(View view) {\n            super(view);\n            this.view = view;\n        }\n    }\n    static class TextInfoCellHolder extends RecyclerView.ViewHolder {\n\n        public View view;\n\n        public TextInfoCellHolder(View view) {\n            super(view);\n            this.view = view;\n        }\n    }\n\n}\n"
  },
  {
    "path": "settingsadapter/src/test/java/com/televip/settingsadapter/ExampleUnitTest.java",
    "content": "package com.televip.settingsadapter;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n\n}"
  }
]