[
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.aar\n*.ap_\n*.aab\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n#  Uncomment the following line in case you need and you don't have the release build type files in your app\n# release/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# IntelliJ\n*.iml\n.idea/workspace.xml\n.idea/tasks.xml\n.idea/gradle.xml\n.idea/assetWizardSettings.xml\n.idea/dictionaries\n.idea/libraries\n# Android Studio 3 in .gitignore file.\n.idea/caches\n.idea/modules.xml\n# Comment next line if keeping position of elements in Navigation Editor is relevant for you\n.idea/navEditor.xml\n\n# Keystore files\n# Uncomment the following lines if you do not want to check your keystore files in.\n#*.jks\n#*.keystore\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n.cxx/\n\n# Google Services (e.g. APIs or Firebase)\n# google-services.json\n\n# Freeline\nfreeline.py\nfreeline/\nfreeline_project_description.json\n\n# fastlane\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\nfastlane/readme.md\n\n# Version control\nvcs.xml\n\n# lint\nlint/intermediates/\nlint/generated/\nlint/outputs/\nlint/tmp/\n# lint/reports/\n"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <codeStyleSettings language=\"XML\">\n      <indentOptions>\n        <option name=\"CONTINUATION_INDENT_SIZE\" value=\"4\" />\n      </indentOptions>\n      <arrangement>\n        <rules>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>xmlns:android</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>xmlns:.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>BY_NAME</order>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*:id</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*:name</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>name</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>style</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>BY_NAME</order>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>ANDROID_ATTRIBUTE_ORDER</order>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>.*</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>BY_NAME</order>\n            </rule>\n          </section>\n        </rules>\n      </arrangement>\n    </codeStyleSettings>\n  </code_scheme>\n</component>"
  },
  {
    "path": ".idea/compiler.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <bytecodeTargetLevel target=\"17\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/deploymentTargetSelector.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"deploymentTargetSelector\">\n    <selectionStates>\n      <SelectionState runConfigName=\"app\">\n        <option name=\"selectionMode\" value=\"DROPDOWN\" />\n        <DropdownSelection timestamp=\"2024-10-18T02:44:59.903677600Z\">\n          <Target type=\"DEFAULT_BOOT\">\n            <handle>\n              <DeviceId pluginId=\"PhysicalDevice\" identifier=\"serial=69031710\" />\n            </handle>\n          </Target>\n        </DropdownSelection>\n        <DialogSelection />\n      </SelectionState>\n    </selectionStates>\n  </component>\n</project>"
  },
  {
    "path": ".idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\">\n    <file url=\"PROJECT\" charset=\"UTF-8\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/jarRepositories.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RemoteRepositoriesConfiguration\">\n    <remote-repository>\n      <option name=\"id\" value=\"central\" />\n      <option name=\"name\" value=\"Maven Central repository\" />\n      <option name=\"url\" value=\"https://repo1.maven.org/maven2\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"jboss.community\" />\n      <option name=\"name\" value=\"JBoss Community repository\" />\n      <option name=\"url\" value=\"https://repository.jboss.org/nexus/content/repositories/public/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"BintrayJCenter\" />\n      <option name=\"name\" value=\"BintrayJCenter\" />\n      <option name=\"url\" value=\"https://jcenter.bintray.com/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"maven\" />\n      <option name=\"name\" value=\"maven\" />\n      <option name=\"url\" value=\"http://maven.aliyun.com/nexus/content/groups/public/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"Google\" />\n      <option name=\"name\" value=\"Google\" />\n      <option name=\"url\" value=\"https://dl.google.com/dl/android/maven2/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"maven2\" />\n      <option name=\"name\" value=\"maven2\" />\n      <option name=\"url\" value=\"https://jitpack.io\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"maven3\" />\n      <option name=\"name\" value=\"maven3\" />\n      <option name=\"url\" value=\"https://maven.java.net/content/groups/public/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"MavenRepo\" />\n      <option name=\"name\" value=\"MavenRepo\" />\n      <option name=\"url\" value=\"https://repo.maven.apache.org/maven2/\" />\n    </remote-repository>\n  </component>\n</project>"
  },
  {
    "path": ".idea/kotlinc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"KotlinJpsPluginSettings\">\n    <option name=\"version\" value=\"1.9.0\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/migrations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectMigrations\">\n    <option name=\"MigrateToGradleLocalJavaHome\">\n      <set>\n        <option value=\"$PROJECT_DIR$\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<project version=\"4\">\n  <component name=\"DesignSurface\">\n    <option name=\"filePathToZoomLevelMap\">\n      <map>\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/drawable/svg_back.xml\" value=\"0.118\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/layout/activity_main.xml\" value=\"0.38645833333333335\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/layout/fragment_day.xml\" value=\"0.38645833333333335\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/layout/fragment_mail_conf.xml\" value=\"0.3333333333333333\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/layout/fragment_push.xml\" value=\"0.33\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/layout/fragment_settings.xml\" value=\"0.5\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/layout/permission_fragment.xml\" value=\"0.38645833333333335\" />\n        <entry key=\"..\\:/AndroidProject/AutoDing/app/src/main/res/menu/bottom_nav_menu.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/AndroidProject/AutoDingding/app/src/main/res/layout/activity_history.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/AndroidProject/AutoDingding/app/src/main/res/layout/activity_main.xml\" value=\"0.19947916666666668\" />\n        <entry key=\"..\\:/AndroidProject/AutoDingding/app/src/main/res/layout/fragment_push.xml\" value=\"0.3333333333333333\" />\n        <entry key=\"..\\:/AndroidProject/AutoDingding/app/src/main/res/layout/fragment_settings.xml\" value=\"0.3333333333333333\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/drawable/bottom_text_color.xml\" value=\"0.1855\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/activity_history.xml\" value=\"0.15208333333333332\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/activity_main.xml\" value=\"0.2916666666666667\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/easy_popup.xml\" value=\"0.2916666666666667\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/fragment_day.xml\" value=\"0.32916666666666666\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/fragment_settings.xml\" value=\"0.32916666666666666\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/include_title.xml\" value=\"0.32916666666666666\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/layout/item_easy_popup.xml\" value=\"0.32916666666666666\" />\n        <entry key=\"..\\:/Code/AutoDingding/app/src/main/res/menu/bottom_nav_menu.xml\" value=\"0.32916666666666666\" />\n        <entry key=\"app/src/main/res/drawable/bg_textview.xml\" value=\"0.2005\" />\n        <entry key=\"app/src/main/res/drawable/bg_textview_error.xml\" value=\"0.2005\" />\n        <entry key=\"app/src/main/res/layout/activity_history.xml\" value=\"0.2203125\" />\n        <entry key=\"app/src/main/res/layout/fragment_settings.xml\" value=\"0.2203125\" />\n        <entry key=\"app/src/main/res/layout/item_list.xml\" value=\"0.2203125\" />\n      </map>\n    </option>\n  </component>\n  <component name=\"ExternalStorageConfigurationManager\" enabled=\"true\" />\n  <component name=\"NullableNotNullManager\">\n    <option name=\"myDefaultNullable\" value=\"android.support.annotation.Nullable\" />\n    <option name=\"myDefaultNotNull\" value=\"androidx.annotation.RecentlyNonNull\" />\n    <option name=\"myNullables\">\n      <value>\n        <list size=\"16\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.Nullable\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nullable\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"javax.annotation.CheckForNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.Nullable\" />\n          <item index=\"4\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.Nullable\" />\n          <item index=\"5\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.Nullable\" />\n          <item index=\"6\" class=\"java.lang.String\" itemvalue=\"android.annotation.Nullable\" />\n          <item index=\"7\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.RecentlyNullable\" />\n          <item index=\"8\" class=\"java.lang.String\" itemvalue=\"org.checkerframework.checker.nullness.qual.Nullable\" />\n          <item index=\"9\" class=\"java.lang.String\" itemvalue=\"org.checkerframework.checker.nullness.compatqual.NullableDecl\" />\n          <item index=\"10\" class=\"java.lang.String\" itemvalue=\"org.checkerframework.checker.nullness.compatqual.NullableType\" />\n          <item index=\"11\" class=\"java.lang.String\" itemvalue=\"com.android.annotations.Nullable\" />\n          <item index=\"12\" class=\"java.lang.String\" itemvalue=\"org.eclipse.jdt.annotation.Nullable\" />\n          <item index=\"13\" class=\"java.lang.String\" itemvalue=\"io.reactivex.annotations.Nullable\" />\n          <item index=\"14\" class=\"java.lang.String\" itemvalue=\"io.reactivex.rxjava3.annotations.Nullable\" />\n          <item index=\"15\" class=\"java.lang.String\" itemvalue=\"org.jspecify.nullness.Nullable\" />\n        </list>\n      </value>\n    </option>\n    <option name=\"myNotNulls\">\n      <value>\n        <list size=\"15\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.NotNull\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nonnull\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.NonNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.NonNull\" />\n          <item index=\"4\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.NonNull\" />\n          <item index=\"5\" class=\"java.lang.String\" itemvalue=\"android.annotation.NonNull\" />\n          <item index=\"6\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.RecentlyNonNull\" />\n          <item index=\"7\" class=\"java.lang.String\" itemvalue=\"org.checkerframework.checker.nullness.qual.NonNull\" />\n          <item index=\"8\" class=\"java.lang.String\" itemvalue=\"org.checkerframework.checker.nullness.compatqual.NonNullDecl\" />\n          <item index=\"9\" class=\"java.lang.String\" itemvalue=\"org.checkerframework.checker.nullness.compatqual.NonNullType\" />\n          <item index=\"10\" class=\"java.lang.String\" itemvalue=\"com.android.annotations.NonNull\" />\n          <item index=\"11\" class=\"java.lang.String\" itemvalue=\"org.eclipse.jdt.annotation.NonNull\" />\n          <item index=\"12\" class=\"java.lang.String\" itemvalue=\"io.reactivex.annotations.NonNull\" />\n          <item index=\"13\" class=\"java.lang.String\" itemvalue=\"io.reactivex.rxjava3.annotations.NonNull\" />\n          <item index=\"14\" class=\"java.lang.String\" itemvalue=\"org.jspecify.nullness.NonNull\" />\n        </list>\n      </value>\n    </option>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_17\" default=\"true\" project-jdk-name=\"jbr-17\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "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": "# AutoDing\n+ 目前release中的包名于24年圣诞节下午又又被加入黑名单了，为了不被再一次被加入黑名单，之后将不再提供APK包的更新，但我会详尽列出各位自行打包需要的步骤，请各位自行下载源码修改一个包名并做如下定制打包。\n1. 起一个包名，结构类似com.furry.rimet这种,修改app级build.gradle中applicationId,daoPackage的前缀为自己的（查找替换即可）\n2. 修改app/src/main/AndroidManifest.xml中包名，查找替换即可\n3. 重新进行gradle sync，完成后执行Build————Rebuild Project\n4. 然后去极光推送开发者后台建一个应用，用刚才自己重构的applicationId申请一个推送应用，把appKey,masterSecret保存\n5. 在app级build.gradle配置中的manifestPlaceholders中的JPUSH_APPKEY值换成上一步的appKey\n6. 在代码搜索类AuthInterceptor，替换里面的常量appKey和masterSecret\n7. （可选）打包前也可修改app/src/main/res/values/strings.xml里面的app_name值，即应用名，防止应用名也被屏蔽\n8. 重新打包，然后分别装在两个手机上，配置推送regID，测试是否可发送响应指令\n-------------\n钉钉打卡，包括定时打卡和远程推送打卡,定时打卡功能是根据AutoDingDing项目修改而来，不是此项目重点，此项目主要功能在于实现远程\n打开钉钉，从而完成极速打卡，其主要是用极光推送SDK实现网络指令下发。\n建议用一台闲置的手机放在公司来打卡，另一台手机来推送打卡指令。\n需要一台打卡手机，一台自用手机，都安装上此APP后，把打卡手机的注册ID复制到推送界面推送打卡指令可以远程打开钉钉，完成极速打卡。使用须知：\n1. 请先确认好要打卡的手机通知栏监听已开启，如不开启将无法监听打卡成功的通知。\n2. 要打卡的手机保持连网，wifi或者数据都可，否则怎么收网络指令啊。\n3. 要打卡的手机最好保持打开界面放置灭屏，因为如果应用被切到后台，过上一晚不活跃有可能会被安卓系统杀掉从而不能接收打卡指令。\n4. 调起钉钉实现自动打卡，需要把打卡手机锁屏密码之类的取消掉，屏幕不用常亮，但锁屏手势、指纹、密码这些验证不能有，否则在熄屏状态下应用接收到消息也无法唤醒屏幕。\n5. 部分手机需要授权允许后台打开窗口，先在设置里面测试下能否正常打开钉钉，第一次有些手机会让授权。\n6. 将钉钉软件上下班都设置为“极速打卡”。\n7. 设置好自己的发信和收信邮箱，跳转到“钉钉”打卡成功后会发送一封打卡成功的邮件到你自己设置好的邮箱。\n8. 不要忘了，此应用只能打开钉钉，如果你钉钉没登录、被其他设备踢下线、打开时机不在考勤时间区间里，极速打卡是不会生效的。\n\n+ 请在邮件配置中尽量使用自己的qq邮箱，申请邮箱授权码的方法请上网查询，目前邮箱只支持qq邮箱，因为邮箱服务器和端口在代码里写死了，想用别的邮箱的可以找到这部分代码修改这部分设置\n-------------\n可选建议\n1. 在应用权限设置里设置成允许锁屏显示，能大幅降低打卡唤醒应用时被各种不能取消的锁屏带来的干扰\n2. 在开发者模式中设置充电时不锁定屏幕，然后一直插电保持亮屏，则肯定能保证稳定运行和接收消息，可以把屏幕调到最暗来减少屏幕损耗\n\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "plugins {\n    id 'com.android.application'\n    id 'org.greenrobot.greendao'\n    id 'kotlin-android'\n    id 'kotlin-kapt'\n}\n\nandroid {\n    compileSdk 33\n    defaultConfig {\n        applicationId \"xcom.warof.chosen\"\n        minSdkVersion 23\n        targetSdkVersion 33\n        versionCode 18\n        versionName \"1.1.8\"\n        ndk {\n            //选择要添加的对应 cpu 类型的 .so 库。\n            abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'\n            // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'\n        }\n\n        manifestPlaceholders = [\n                JPUSH_PKGNAME : applicationId,\n                JPUSH_APPKEY : \"f01b8a02b66ea2d632e52e2e\", //JPush 上注册的包名对应的 Appkey.\n                JPUSH_CHANNEL : \"jpush\", //暂时填写默认值即可.\n                VERSION_NAME : versionName,\n                CHANNEL : 'self',\n                DEBUG : true,\n                MEIZU_APPKEY : \"MZ-魅族的APPKEY\",\n                MEIZU_APPID : \"MZ-魅族的APPID\",\n                XIAOMI_APPID : \"MI-小米的APPID\",\n                XIAOMI_APPKEY : \"MI-小米的APPKEY\",\n                OPPO_APPKEY : \"OP-oppo的APPKEY\",\n                OPPO_APPID : \"OP-oppo的APPID\",\n                OPPO_APPSECRET : \"OP-oppo的APPSECRET\",\n                VIVO_APPKEY : \"vivo的APPKEY\",\n                VIVO_APPID : \"vivo的APPID\"\n        ]\n    }\n\n    signingConfigs {\n        sign {\n            storeFile file(\"../sxwdsoft.jks\")\n            storePassword \"sxwdsoft4989\"\n            keyAlias \"sxwdsoft\"\n            keyPassword \"sxwdsoft4989\"\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            // 启用资源压缩，需配合 minifyEnabled=true 使用\n            shrinkResources false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n            signingConfig signingConfigs.sign\n        }\n        debug {\n            debuggable true\n            manifestPlaceholders[\"DEBUG\"] = debuggable\n            minifyEnabled false\n            shrinkResources false\n            signingConfig signingConfigs.sign\n            //禁用PNG压缩。\n            crunchPngs false\n        }\n    }\n    packagingOptions {\n        resources {\n            excludes += ['META-INF/NOTICE.md', 'META-INF/LICENSE.md']\n        }\n    }\n    compileOptions {\n        targetCompatibility JavaVersion.VERSION_17\n        sourceCompatibility JavaVersion.VERSION_17\n    }\n    kotlinOptions {\n        jvmTarget = '17'\n    }\n\n    greendao {\n        schemaVersion 1//数据库版本号\n        targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录\n        daoPackage 'xcom.warof.chosen.greendao'//设置DaoMaster、DaoSession、Dao包名\n    }\n\n    buildFeatures {\n        viewBinding true\n        dataBinding true\n        buildConfig true\n    }\n    namespace 'com.pengxh.autodingding'\n    lint {\n        checkReleaseBuilds false\n    }\n}\n\ntasks.configureEach { task ->\n    if (task.name.matches(\"\\\\w*compile\\\\w*Kotlin\")) {\n        task.dependsOn('greendao')\n    }\n    if (task.name.matches(\"\\\\w*kaptGenerateStubs\\\\w*Kotlin\")) {\n        task.dependsOn('greendao')\n    }\n\n    if (task.name.matches(\"\\\\w*kapt\\\\w*Kotlin\")) {\n        task.dependsOn('greendao')\n    }\n}\n\ndependencies {\n    implementation fileTree(include: ['*.jar'], dir: 'libs')\n    implementation 'androidx.appcompat:appcompat:1.4.0'\n    implementation 'androidx.legacy:legacy-support-v4:1.0.0'\n    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'\n    implementation 'com.google.android.material:material:1.4.0'\n    implementation 'androidx.core:core-ktx:1.8.0'\n    implementation 'com.android.databinding:viewbinding:7.2.2'\n    implementation \"org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4\"\n    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'\n    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'\n    implementation \"androidx.lifecycle:lifecycle-extensions:2.2.0\"\n    implementation \"androidx.lifecycle:lifecycle-common-java8:2.2.0\"\n    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'\n\n    //Google官方授权库\n    implementation 'pub.devrel:easypermissions:3.0.0'\n    implementation 'androidx.recyclerview:recyclerview:1.2.1'\n    implementation 'androidx.cardview:cardview:1.0.0'\n    implementation 'com.google.code.gson:gson:2.8.6'\n    implementation 'com.jzxiang.pickerview:TimePickerDialog:1.0.1'\n    implementation 'com.sun.mail:android-mail:1.6.6'\n    implementation 'com.sun.mail:android-activation:1.6.6'\n    //事件总线\n    implementation 'com.github.liangjingkanji:Channel:1.1.5'\n    //retrofit okhttp\n    implementation \"com.squareup.retrofit2:retrofit:2.9.0\"\n    implementation \"com.squareup.retrofit2:converter-gson:2.9.0\"\n    implementation \"com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2\"\n    //上拉加载下拉刷新\n    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'\n    implementation group: 'net.sourceforge.jexcelapi', name: 'jxl', version: '2.6.12'\n    //沉浸式状态栏。基础依赖包，必须要依赖\n    implementation 'com.gyf.immersionbar:immersionbar:3.0.0'\n    implementation 'com.afollestad.material-dialogs:core:3.2.1'\n    //fragment快速实现\n    implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'\n    //数据库框架\n    implementation 'org.greenrobot:greendao:3.3.0'\n    implementation \"com.blankj:utilcodex:1.30.5\"\n    implementation 'cn.jiguang.sdk:jpush:5.2.2'\n    implementation 'cn.jiguang.sdk:joperate:2.0.2'\n    //无障碍\n    implementation 'com.github.Krosxx:Android-Auto-Api:4.1.2'\n\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "app/src/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    <!--亮屏和解锁-->\n    <uses-permission android:name=\"android.permission.WAKE_LOCK\" />\n    <uses-permission android:name=\"android.permission.DISABLE_KEYGUARD\" />\n    <uses-permission android:name=\"xcom.warof.chosen.permission.JPUSH_MESSAGE\" />\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\n    <uses-permission android:name=\"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS\"/>\n    <queries>\n        <package android:name=\"com.alibaba.android.rimet\"/>\n    </queries>\n\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"\n        android:maxSdkVersion=\"32\" />\n    <uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\" />\n\n\n    <application\n        android:name=\".BaseApplication\"\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/logo\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Theme.AppCompat.Light.NoActionBar\"\n        android:usesCleartextTraffic=\"true\"\n        tools:ignore=\"GoogleAppIndexingWarning\">\n        <activity\n            android:name=\".ui.WelcomeActivity\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity\n            android:name=\".ui.MainActivity\"\n            android:launchMode=\"singleTask\"\n            android:screenOrientation=\"unspecified\" />\n        <activity android:name=\".ui.HistoryRecordActivity\" />\n\n        <service\n            android:name=\".service.NotificationMonitorService\"\n            android:enabled=\"true\"\n            android:exported=\"false\"\n            android:label=\"自动打开通知监听服务\"\n            android:permission=\"android.permission.BIND_NOTIFICATION_LISTENER_SERVICE\">\n            <intent-filter>\n                <action android:name=\"android.service.notification.NotificationListenerService\" />\n            </intent-filter>\n        </service>\n        <service android:name=\".service.PushService\"\n            android:enabled=\"true\"\n            android:exported=\"false\"\n            android:process=\":pushcore\">\n            <intent-filter>\n                <action android:name=\"cn.jiguang.user.service.action\" />\n            </intent-filter>\n        </service>\n        <service android:name=\".service.PushCoreService\"\n            android:enabled=\"true\"\n            android:exported=\"false\">\n            <intent-filter>\n                <action android:name=\"cn.jpush.android.intent.SERVICE_MESSAGE\" />\n                <category android:name=\"xcom.warof.chosen\" />\n            </intent-filter>\n        </service>\n        <service android:name=\".service.BaseAccessibilityService\"\n            android:description=\"@string/base_ser_desc\"\n            android:label=\"@string/base_ser_desc\"\n            android:permission=\"android.permission.BIND_ACCESSIBILITY_SERVICE\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.accessibilityservice.AccessibilityService\"/>\n            </intent-filter>\n            <meta-data android:name=\"android.accessibilityservice\"\n                android:resource=\"@xml/base_accessibility_config\"/>\n        </service>\n        <service\n            android:name=\".service.GestureService\"\n            android:description=\"@string/ges_ser_desc\"\n            android:label=\"@string/ges_ser_desc\"\n            android:permission=\"android.permission.BIND_ACCESSIBILITY_SERVICE\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.accessibilityservice.AccessibilityService\" />\n            </intent-filter>\n            <meta-data\n                android:name=\"android.accessibilityservice\"\n                android:resource=\"@xml/gesture_accessibility_config\" />\n        </service>\n        <receiver android:name=\".BatteryLevelReceiver\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.BATTERY_LOW\"/>\n                <action android:name=\"android.intent.action.BATTERY_OKAY\"/>\n            </intent-filter>\n        </receiver>\n    </application>\n</manifest>"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/AndroidxBaseActivity.java",
    "content": "package com.pengxh.autodingding;\n\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\n\nimport androidx.annotation.Nullable;\nimport androidx.appcompat.app.AppCompatActivity;\nimport androidx.core.content.ContextCompat;\nimport androidx.viewbinding.ViewBinding;\n\nimport com.gyf.immersionbar.ImmersionBar;\nimport com.pengxh.autodingding.utils.StatusBarColorUtil;\n\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.ParameterizedType;\nimport java.lang.reflect.Type;\n\npublic abstract class AndroidxBaseActivity<VB extends ViewBinding> extends AppCompatActivity {\n\n    protected VB viewBinding;\n\n    @Override\n    protected void onCreate(@Nullable Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        Type type = getClass().getGenericSuperclass();\n        if (type == null) {\n            throw new NullPointerException();\n        }\n        Class<?> cls = (Class<?>) ((ParameterizedType) type).getActualTypeArguments()[0];\n        try {\n            Method method = cls.getDeclaredMethod(\"inflate\", LayoutInflater.class);\n            viewBinding = (VB) method.invoke(null, getLayoutInflater());\n            if (viewBinding == null) {\n                throw new NullPointerException();\n            }\n            setContentView(viewBinding.getRoot());\n            StatusBarColorUtil.setColor(this, ContextCompat.getColor(this, R.color.colorAppThemeLight));\n            ImmersionBar.with(this).statusBarDarkFont(false).init();//沉浸式状态栏\n            setupTopBarLayout();\n            initData();\n            initEvent();\n        } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {\n            e.printStackTrace();\n        }\n    }\n\n    /**\n     * 初始化默认数据\n     */\n    protected abstract void initData();\n\n    /**\n     * 特定页面定制沉浸式状态栏\n     */\n    protected abstract void setupTopBarLayout();\n\n    /**\n     * 初始化业务逻辑\n     */\n    protected abstract void initEvent();\n\n    @Override\n    protected void onDestroy() {\n        viewBinding = null;\n        super.onDestroy();\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/AndroidxBaseFragment.java",
    "content": "package com.pengxh.autodingding;\n\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport androidx.viewbinding.ViewBinding;\n\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.ParameterizedType;\nimport java.lang.reflect.Type;\n\npublic abstract class AndroidxBaseFragment<VB extends ViewBinding> extends Fragment {\n\n    protected VB viewBinding;\n\n    @Nullable\n    @Override\n    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n        Type type = getClass().getGenericSuperclass();\n        if (type == null) {\n            throw new NullPointerException();\n        }\n        Class<?> cls = (Class<?>) ((ParameterizedType) type).getActualTypeArguments()[0];\n        try {\n            Method method = cls.getDeclaredMethod(\"inflate\", LayoutInflater.class, ViewGroup.class, boolean.class);\n            viewBinding = (VB) method.invoke(null, getLayoutInflater(), container, false);\n        } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {\n            e.printStackTrace();\n        }\n        if (viewBinding == null) {\n            throw new NullPointerException();\n        }\n        setupTopBarLayout();\n        initData();\n        initEvent();\n        return viewBinding.getRoot();\n    }\n\n    protected abstract void setupTopBarLayout();\n\n    /**\n     * 初始化默认数据\n     */\n    protected abstract void initData();\n\n    /**\n     * 初始化业务逻辑\n     */\n    protected abstract void initEvent();\n\n    @Override\n    public void onDestroyView() {\n        viewBinding = null;\n        super.onDestroyView();\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ApiException.kt",
    "content": "package com.pengxh.autodingding\n\nclass ApiException(val errorMessage: String, val errorCode: Int) :\n    Throwable()"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/BaseApplication.kt",
    "content": "package com.pengxh.autodingding\n\nimport android.app.Application\nimport android.content.Context\nimport cn.jpush.android.api.JPushInterface\nimport cn.vove7.andro_accessibility_api.AccessibilityApi\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.pengxh.autodingding.greendao.DaoMaster\nimport com.pengxh.autodingding.greendao.DaoMaster.DevOpenHelper\nimport com.pengxh.autodingding.greendao.DaoSession\nimport com.pengxh.autodingding.service.BaseAccessibilityService\nimport com.pengxh.autodingding.service.GestureService\nimport com.pengxh.autodingding.utils.Utils\n\nclass BaseApplication : Application() {\n    override fun onCreate() {\n        super.onCreate()\n        application = this\n        Utils.init(this)\n        initDataBase()\n        JPushInterface.setDebugMode(true)\n        JPushInterface.init(this)\n        val strings = HashSet<String>()\n        strings.add(\"main\")\n        JPushInterface.setTags(this, 0, strings)\n        val pushRegId = JPushInterface.getRegistrationID(this)\n        CacheDiskUtils.getInstance().put(\"pushRegId\", pushRegId)\n\n        //辅助服务\n        AccessibilityApi.apply {\n            BASE_SERVICE_CLS = BaseAccessibilityService::class.java\n            GESTURE_SERVICE_CLS = GestureService::class.java\n        }\n    }\n\n    override fun attachBaseContext(base: Context?) {\n        super.attachBaseContext(base)\n        application = this;\n    }\n\n    private fun initDataBase() {\n        val helper = DevOpenHelper(this, \"DingRecord.db\")\n        val db = helper.writableDatabase\n        val daoMaster = DaoMaster(db)\n        daoSession = daoMaster.newSession()\n    }\n\n    companion object {\n        @JvmStatic\n        var daoSession: DaoSession? = null\n            private set\n\n        @Volatile\n        var application: BaseApplication? = null\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/BatteryLevelReceiver.kt",
    "content": "package com.pengxh.autodingding\n\nimport android.content.BroadcastReceiver\nimport android.content.Context\nimport android.content.Intent\nimport android.os.BatteryManager\nimport cn.jpush.android.api.JPushInterface\nimport com.blankj.utilcode.util.ProcessUtils\nimport com.blankj.utilcode.util.ScreenUtils\nimport com.pengxh.autodingding.utils.SendMailUtil\nimport com.pengxh.autodingding.utils.Utils\n\nclass BatteryLevelReceiver : BroadcastReceiver() {\n    override fun onReceive(context: Context, intent: Intent) {\n        val action = intent.action\n        if (Intent.ACTION_BATTERY_LOW == action){\n            val emailAddress = Utils.readEmailAddress()\n            val manager = context.getSystemService(AndroidxBaseActivity.BATTERY_SERVICE) as BatteryManager\n            val curBatteryCurrent = manager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_NOW)\n            val curBattery = manager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)///当前电量百分比\n            val regId = JPushInterface.getRegistrationID(context)\n            val screenLock = ScreenUtils.isScreenLock()\n            val message = \"警告！低电量！注册ID: $regId 是否锁屏：$screenLock \" +\n                    \"当前电流：$curBatteryCurrent mA  当前电量百分比：$curBattery %\"\n            SendMailUtil.send(emailAddress, message)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/actions/Action.kt",
    "content": "package com.pengxh.autodingding.actions\n\nimport android.app.Activity\n\n\nabstract class Action {\n    abstract val name: String\n    abstract suspend fun run(act: Activity)\n\n    override fun toString() = name\n\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/actions/DingSignAction.kt",
    "content": "package com.pengxh.autodingding.actions\n\nimport android.app.Activity\nimport android.graphics.Point\nimport cn.vove7.andro_accessibility_api.requireBaseAccessibility\nimport cn.vove7.auto.core.api.back\nimport cn.vove7.auto.core.api.click\nimport cn.vove7.auto.core.viewfinder.SF\nimport cn.vove7.auto.core.viewfinder.containsText\nimport cn.vove7.auto.core.viewfinder.id\nimport com.blankj.utilcode.util.TimeUtils\nimport com.pengxh.autodingding.utils.Constant\nimport com.pengxh.autodingding.utils.toast\nimport kotlinx.coroutines.delay\n\nclass DingSignAction : Action() {\n    private var result = false\n    var message = StringBuilder()\n    override val name: String\n        get() = \"打开钉钉，手动打卡\"\n\n    override suspend fun run(act: Activity) {\n        requireBaseAccessibility(true)\n\n        toast(\"1秒后启动钉钉\")\n        delay(1000)\n        val targetApp = Constant.DINGDING\n        genLog(\"启动钉钉\")\n        act.startActivity(act.packageManager.getLaunchIntentForPackage(targetApp))\n\n        delay(9000)\n        genLog(\"查找钉钉首页元素\")\n        val messageTab = SF.containsText(\"消息\").findFirst(false)\n\n        toast(if (messageTab != null) \"找到消息按钮\" else \"未找到消息按钮\")\n        if (messageTab != null) {\n            messageTab.tryClick()\n            delay(2000)\n        }\n        val signTab = SF.containsText(\"打卡\").findFirst(false)\n        toast(\"找到${signTab != null}打卡\")\n        genLog(\"查找打卡入口\")\n        if (signTab != null) {\n            val signClick = signTab.tryClick()\n            genLog(\"点击打卡入口\" + if (signClick) \"成功\" else \"失败\")\n            toast(\"8秒后尝试寻找打卡按钮\")\n            delay(8000)\n        }\n        val webPage = SF.id(\"com.alibaba.android.rimet:id/h5_pc_container\").findFirst()\n        genLog(\"查找打卡webView\" + if (webPage != null) \"成功\" else \"失败\")\n        var clickSucceed = false\n        if (webPage != null) {\n            val centerP = webPage.getCenterPoint()\n            for (i in 1..5) {\n                val delta = 70\n                tryClick(Point(centerP.x, centerP.y + i * delta))\n                clickSucceed = SF.containsText(\"成功\")\n                    .findFirst(false) != null\n                if (clickSucceed) {\n                    break\n                }\n            }\n        }\n        genLog(\"点击打卡\" + if (clickSucceed) \"成功\" else \"失败\" + \"，准备查看页面结果\")\n        val succeed = SF.containsText(\"成功\")\n            .findFirst(false) != null\n        toast(\"手动打卡 \" + if (succeed) \"成功\" else \"失败\")\n        genLog(\"页面结果判断打卡\" + if (succeed) \"成功\" else \"失败\" + \",准备回退\")\n        delay(2000)\n        back()\n        genLog(\"回退第一次\")\n        delay(2000)\n        back()\n        result = succeed\n        genLog(\"回退第二次，执行结束，最终执行判定：\" + if (result) \"成功\" else \"失败\")\n    }\n\n    private fun genLog(actionDesc: String) {\n        message.append(actionDesc + \"-----\" + TimeUtils.getNowString() + \"\\n\")\n    }\n\n    private suspend fun tryClick(p: Point) {\n        click(p.x, p.y)\n        val delayTime = 5L\n        genLog(\"点击坐标点${p.x},${p.y},并等待${delayTime}秒\")\n        delay(delayTime * 1000)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/actions/SwipeUnlockAction.kt",
    "content": "package com.pengxh.autodingding.actions\n\nimport android.app.Activity\nimport cn.vove7.auto.core.api.swipe\nimport kotlinx.coroutines.delay\n\nclass SwipeUnlockAction(val orientation: ORIENTATION=ORIENTATION.VERTICAL): Action() {\n    enum class ORIENTATION{\n        HORIZONTAL,VERTICAL,CUSTOM\n    }\n    constructor(startX:Int, startY:Int, endX:Int, endY:Int) : this(ORIENTATION.CUSTOM) {\n        this.startX = startX\n        this.startY = startY\n        this.endX = endX\n        this.endY = endY\n    }\n    var startX= 0\n    var startY = 0\n    var endX = 0\n    var endY = 0\n    override val name: String\n        get() = \"解锁\"\n\n    override suspend fun run(act: Activity) {\n        delay(1000)\n        //从下往上的滑动\n        when (orientation) {\n            ORIENTATION.VERTICAL -> swipe(500, 1200, 500, 400, 800)\n            ORIENTATION.HORIZONTAL -> swipe(100, 900, 600, 900, 800)\n            else -> swipe(startX, startY, endX, endY, 800)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/adapter/FragAdapter.kt",
    "content": "package com.pengxh.autodingding.adapter\n\nimport androidx.fragment.app.Fragment\nimport androidx.fragment.app.FragmentActivity\nimport androidx.viewpager2.adapter.FragmentStateAdapter\n\nclass FragAdapter(fragmentActivity: FragmentActivity,\n                  private val pageList:List<Fragment>) : FragmentStateAdapter(fragmentActivity) {\n    override fun getItemCount(): Int {\n        return pageList.size\n    }\n\n    override fun createFragment(position: Int): Fragment = pageList[position]\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/adapter/HistoryRecordAdapter.kt",
    "content": "package com.pengxh.autodingding.adapter\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.BaseAdapter\nimport android.widget.ImageView\nimport android.widget.TextView\nimport com.pengxh.autodingding.R\nimport com.pengxh.autodingding.bean.HistoryRecordBean\n\nclass HistoryRecordAdapter(mContext: Context?, private val beanList: List<HistoryRecordBean>?) :\n    BaseAdapter() {\n    private val mInflater: LayoutInflater\n\n    init {\n        mInflater = LayoutInflater.from(mContext)\n    }\n\n    override fun getCount(): Int {\n        return beanList?.size ?: 0\n    }\n\n    override fun getItem(position: Int): Any {\n        return beanList!![position]\n    }\n\n    override fun getItemId(position: Int): Long {\n        return position.toLong()\n    }\n\n    override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {\n        var convertView = convertView\n        val holder: HistoryViewHolder\n        if (convertView == null) {\n            convertView = mInflater.inflate(R.layout.item_list, parent)\n            holder = HistoryViewHolder()\n            holder.noticeDate = convertView.findViewById(R.id.noticeDate)\n            holder.noticeMessage = convertView.findViewById(R.id.noticeMessage)\n            holder.tagView = convertView.findViewById(R.id.tagView)\n            convertView.tag = holder\n        } else {\n            holder = convertView.tag as HistoryViewHolder\n        }\n        holder.bindData(beanList!![position])\n        return convertView!!\n    }\n\n    private class HistoryViewHolder {\n        var noticeDate: TextView? = null\n        var noticeMessage: TextView? = null\n        var tagView: ImageView? = null\n        fun bindData(historyBean: HistoryRecordBean) {\n            val message = historyBean.message\n            if (!message.contains(\"成功\")) {\n                tagView!!.setBackgroundResource(R.drawable.bg_textview_error)\n            }\n            noticeMessage!!.text = message\n            noticeDate!!.text = historyBean.date\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/base/ApiResponse.kt",
    "content": "package com.pengxh.autodingding.base\n\ndata class ApiResponse<T>(var errorCode: Int, var errorMsg: String, var data: T) {\n    fun isSucces(): Boolean {\n        return errorCode == 0\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/base/BaseViewModel.kt",
    "content": "package com.pengxh.autodingding.base\n\nimport androidx.lifecycle.MutableLiveData\nimport androidx.lifecycle.ViewModel\nimport androidx.lifecycle.viewModelScope\nimport com.blankj.utilcode.util.LogUtils\nimport com.pengxh.autodingding.ApiException\nimport com.pengxh.autodingding.BuildConfig\nimport kotlinx.coroutines.*\nimport org.json.JSONException\nimport retrofit2.HttpException\nimport java.net.ConnectException\nimport java.net.SocketTimeoutException\nimport java.net.UnknownHostException\n\n\ntypealias VmError =  (e: ApiException) -> Unit\n\nopen class BaseViewModel: ViewModel() {\n    val coroutineExceptionHandler = CoroutineExceptionHandler { coroutineContext, throwable ->\n        throwable.printStackTrace()\n        LogUtils.e(coroutineContext, throwable)\n    }\n\n    /**\n     * 错误信息liveData\n     */\n    val errorLiveData = MutableLiveData<ApiException>()\n\n    /**\n     * 无更多数据\n     */\n    val footLiveDate = MutableLiveData<Boolean>()\n\n    /**\n     * 无数据\n     */\n    val emptyLiveDate = MutableLiveData<Boolean>()\n\n    /**\n     * 处理错误\n     */\n\n    protected fun <T> launch(\n        block:  () -> T\n        , error:VmError? = null) {\n        viewModelScope.launch {\n            runCatching {\n                block()\n            }.onFailure {\n                it.printStackTrace()\n                getApiException(it).apply {\n                    withContext(Dispatchers.Main){\n                        error?.invoke(this@apply)\n                    }\n                }\n            }\n        }\n    }\n\n    protected fun <T> launch(block: suspend () -> T) {\n        viewModelScope.launch {\n            runCatching {\n                block()\n            }.onFailure {\n                if (BuildConfig.DEBUG) {\n                    it.printStackTrace()\n                }\n                getApiException(it).apply {\n                    withContext(Dispatchers.Main){\n                        //统一响应错误信息\n                        errorLiveData.value = this@apply\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * 捕获异常信息\n     */\n    private fun getApiException(e: Throwable): ApiException {\n        return when (e) {\n            is UnknownHostException -> {\n                ApiException(\"网络异常\", -100)\n            }\n            is JSONException -> {//|| e is JsonParseException\n                ApiException(\"数据异常\", -100)\n            }\n            is SocketTimeoutException -> {\n                ApiException(\"连接超时\", -100)\n            }\n            is ConnectException -> {\n                ApiException(\"连接错误\", -100)\n            }\n            is HttpException -> {\n                ApiException(\"http code ${e.code()}\", -100)\n            }\n            is ApiException -> {\n                e\n            }\n            /**\n             * 如果协程还在运行，个别机型退出当前界面时，viewModel会通过抛出CancellationException，\n             * 强行结束协程，与java中InterruptException类似，所以不必理会,只需将toast隐藏即可\n             */\n            is CancellationException -> {\n                ApiException(\"\", -10)\n            }\n            else -> {\n                ApiException(\"未知错误\", -100)\n            }\n        }\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/base/BaseVmFragment.kt",
    "content": "package com.pengxh.autodingding.base\n\nimport android.content.Context\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport androidx.annotation.Keep\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.databinding.DataBindingUtil\nimport androidx.databinding.ViewDataBinding\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.ViewModel\nimport androidx.lifecycle.ViewModelProvider\nimport com.pengxh.autodingding.utils.ParamUtil\n\n\n@Keep\nabstract class BaseVmFragment<BD : ViewDataBinding> : Fragment() {\n\n    /**\n     * 开放给外部使用\n     */\n    lateinit var mContext: Context\n    lateinit var mActivity: AppCompatActivity\n    private var fragmentProvider: ViewModelProvider? = null\n    private var activityProvider: ViewModelProvider? = null\n    protected lateinit var binding: BD\n    private var mBinding: ViewDataBinding? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        //由于同一个fragment对象可能被activity attach多次(比如viewPager+PagerStateAdapter中)\n        //所以fragmentViewModel不能放在onCreateView初始化，否则会产生多个fragmentViewModel\n        initFragmentViewModel()\n    }\n\n    override fun onAttach(context: Context) {\n        super.onAttach(context)\n        mContext = context\n        mActivity = context as AppCompatActivity\n        // 必须要在Activity与Fragment绑定后，因为如果Fragment可能获取的是Activity中ViewModel\n        // 必须在onCreateView之前初始化viewModel，因为onCreateView中需要通过ViewModel与DataBinding绑定\n        initViewModel()\n        ParamUtil.initParam(this)\n    }\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        getLayoutId()?.let {\n            //获取ViewDataBinding\n            binding = DataBindingUtil.inflate(inflater, it, container, false)\n            //将ViewDataBinding生命周期与Fragment绑定\n            binding.lifecycleOwner = viewLifecycleOwner\n            return binding.root\n        }\n        return super.onCreateView(inflater, container, savedInstanceState)\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        init(savedInstanceState)\n        //observe一定要在初始化最后，因为observe会收到黏性事件，随后对ui做处理\n        observe()\n        onClick()\n    }\n\n    /**\n     * 初始化viewModel\n     * 之所以没有设计为抽象，是因为部分简单activity可能不需要viewModel\n     * observe同理\n     */\n    open fun initViewModel() {\n\n    }\n\n    open fun initFragmentViewModel() {\n\n    }\n\n    /**\n     * 注册观察者\n     */\n    open fun observe() {\n\n    }\n\n    /**\n     * 通过activity获取viewModel，跟随activity生命周期\n     */\n    protected fun <T : ViewModel> getActivityViewModel(modelClass: Class<T>): T {\n        if (activityProvider == null) {\n            activityProvider = ViewModelProvider(mActivity)\n        }\n        return activityProvider!![modelClass]\n    }\n\n    /**\n     * 通过fragment获取viewModel，跟随fragment生命周期\n     */\n    protected open fun <T : ViewModel> getFragmentViewModel(modelClass: Class<T>): T {\n        if (fragmentProvider == null) {\n            fragmentProvider = ViewModelProvider(this)\n        }\n        return fragmentProvider!![modelClass]\n    }\n\n    /**\n     * 点击事件\n     */\n    open fun onClick() {\n\n    }\n\n    /**\n     * 初始化View以及事件\n     */\n    open fun initView() {\n\n    }\n\n    /**\n     * 加载数据\n     */\n    open fun loadData() {\n    }\n\n    /**\n     * 获取layout布局\n     */\n    abstract fun getLayoutId(): Int?\n\n    /**\n     * 初始化入口\n     */\n    abstract fun init(savedInstanceState: Bundle?)\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/AndroidNotif.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass AndroidNotif {\n    var title:String? = null\n    var category:String? = \"CATEGORY_REMINDER\"\n    var priority:Int = 1\n    val display_foreground:String = \"1\"\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/BodyMsg.kt",
    "content": "package com.pengxh.autodingding.bean\n\nimport org.json.JSONObject\n\nclass BodyMsg {\n    var msg_content:String = \"\"\n    var title = \"cmd\"\n    var content_type:String? = null\n    var extras:JSONObject? = null\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/HistoryRecordBean.java",
    "content": "package com.pengxh.autodingding.bean;\n\nimport org.greenrobot.greendao.annotation.Entity;\nimport org.greenrobot.greendao.annotation.Generated;\nimport org.greenrobot.greendao.annotation.Id;\n\n@Entity\npublic class HistoryRecordBean {\n    @Id(autoincrement = true)\n    private Long id;//主键ID\n\n    private String uuid;\n    private String date;\n    private String message;\n\n    @Generated(hash = 1681950394)\n    public HistoryRecordBean(Long id, String uuid, String date, String message) {\n        this.id = id;\n        this.uuid = uuid;\n        this.date = date;\n        this.message = message;\n    }\n\n    @Generated(hash = 1791356846)\n    public HistoryRecordBean() {\n    }\n\n    public Long getId() {\n        return this.id;\n    }\n\n    public void setId(Long id) {\n        this.id = id;\n    }\n\n    public String getUuid() {\n        return this.uuid;\n    }\n\n    public void setUuid(String uuid) {\n        this.uuid = uuid;\n    }\n\n    public String getDate() {\n        return this.date;\n    }\n\n    public void setDate(String date) {\n        this.date = date;\n    }\n\n    public String getMessage() {\n        return this.message;\n    }\n\n    public void setMessage(String message) {\n        this.message = message;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/MailInfo.kt",
    "content": "package com.pengxh.autodingding.bean\n\nimport java.io.File\nimport java.util.Properties\n\n/**\n * @author: lttclaw\n * @email: lttclaw@qq.com\n * @description: 邮件相关\n * @date: 2020/1/16 15:40\n */\nclass MailInfo {\n    // 发送邮件的服务器的IP和端口\n    var mailServerHost: String? = null\n    var mailServerPort: String? = null\n\n    // 邮件发送者的地址\n    var fromAddress: String? = null\n\n    // 邮件接收者的地址\n    var toAddress: String? = null\n\n    // 登陆邮件发送服务器的用户名和密码\n    var userName: String? = null\n    var password: String? = null\n\n    // 是否需要身份验证\n    var isValidate = false\n\n    // 邮件主题\n    var subject: String? = null\n\n    // 邮件的文本内容\n    var content: String? = null\n\n    // 邮件的附件\n    var attachFile: File? = null\n\n    // 邮件附件的文件名\n    var attachFileName: String? = null\n    val properties: Properties\n        /**\n         * 获得邮件会话属性\n         */\n        get() {\n            val p = Properties()\n            p[\"mail.smtp.host\"] = mailServerHost\n            p[\"mail.smtp.port\"] = mailServerPort\n            p[\"mail.smtp.ssl.enable\"] = \"true\"\n            p[\"mail.smtp.auth\"] = \"true\"\n            return p\n        }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/PushAudience.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass PushAudience {\n    var registration_id: MutableList<String> = mutableListOf()\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/PushChannel.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass PushChannel {\n    var distribution_customize = \"secondary_push\"\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/PushMessage.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass PushMessage {\n    var platform = \"android\"\n    var audience: PushAudience? = null\n    var notification: PushNotification? = null\n    var message: BodyMsg? = null\n    var options: PushOption? = null\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/PushNotification.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass PushNotification {\n    var alert:String?= null\n    var android:AndroidNotif? = null\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/PushOption.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass PushOption {\n    var third_party_channel:ThirdPartyConf? = ThirdPartyConf()\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/PushResp.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass PushResp {\n    var errorCode = 0\n    var messageCn:String? = null\n\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/ThirdPartyConf.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass ThirdPartyConf {\n    var huawei: PushChannel = PushChannel()\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/Version.kt",
    "content": "package com.pengxh.autodingding.bean\n\ndata class Version(val apkUrl:String, val versionCode: Int, val versionName: String, val description: String, val apkSize: String)"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/Workday.kt",
    "content": "package com.pengxh.autodingding.bean\n\ndata class Workday(val type:Int, val name: String, val date:String, val rest: Int)"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/bean/WorkdayResp.kt",
    "content": "package com.pengxh.autodingding.bean\n\nclass WorkdayResp{\n    val code :Int = 0\n    var workday: Workday? = null\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/greendao/DaoMaster.java",
    "content": "package com.pengxh.autodingding.greendao;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteDatabase.CursorFactory;\nimport android.util.Log;\n\nimport org.greenrobot.greendao.AbstractDaoMaster;\nimport org.greenrobot.greendao.database.StandardDatabase;\nimport org.greenrobot.greendao.database.Database;\nimport org.greenrobot.greendao.database.DatabaseOpenHelper;\nimport org.greenrobot.greendao.identityscope.IdentityScopeType;\n\n\n// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.\n/**\n * Master of DAO (schema version 1): knows all DAOs.\n */\npublic class DaoMaster extends AbstractDaoMaster {\n    public static final int SCHEMA_VERSION = 1;\n\n    /** Creates underlying database table using DAOs. */\n    public static void createAllTables(Database db, boolean ifNotExists) {\n        HistoryRecordBeanDao.createTable(db, ifNotExists);\n    }\n\n    /** Drops underlying database table using DAOs. */\n    public static void dropAllTables(Database db, boolean ifExists) {\n        HistoryRecordBeanDao.dropTable(db, ifExists);\n    }\n\n    /**\n     * WARNING: Drops all table on Upgrade! Use only during development.\n     * Convenience method using a {@link DevOpenHelper}.\n     */\n    public static DaoSession newDevSession(Context context, String name) {\n        Database db = new DevOpenHelper(context, name).getWritableDb();\n        DaoMaster daoMaster = new DaoMaster(db);\n        return daoMaster.newSession();\n    }\n\n    public DaoMaster(SQLiteDatabase db) {\n        this(new StandardDatabase(db));\n    }\n\n    public DaoMaster(Database db) {\n        super(db, SCHEMA_VERSION);\n        registerDaoClass(HistoryRecordBeanDao.class);\n    }\n\n    public DaoSession newSession() {\n        return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);\n    }\n\n    public DaoSession newSession(IdentityScopeType type) {\n        return new DaoSession(db, type, daoConfigMap);\n    }\n\n    /**\n     * Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -\n     */\n    public static abstract class OpenHelper extends DatabaseOpenHelper {\n        public OpenHelper(Context context, String name) {\n            super(context, name, SCHEMA_VERSION);\n        }\n\n        public OpenHelper(Context context, String name, CursorFactory factory) {\n            super(context, name, factory, SCHEMA_VERSION);\n        }\n\n        @Override\n        public void onCreate(Database db) {\n            Log.i(\"greenDAO\", \"Creating tables for schema version \" + SCHEMA_VERSION);\n            createAllTables(db, false);\n        }\n    }\n\n    /** WARNING: Drops all table on Upgrade! Use only during development. */\n    public static class DevOpenHelper extends OpenHelper {\n        public DevOpenHelper(Context context, String name) {\n            super(context, name);\n        }\n\n        public DevOpenHelper(Context context, String name, CursorFactory factory) {\n            super(context, name, factory);\n        }\n\n        @Override\n        public void onUpgrade(Database db, int oldVersion, int newVersion) {\n            Log.i(\"greenDAO\", \"Upgrading schema from version \" + oldVersion + \" to \" + newVersion + \" by dropping all tables\");\n            dropAllTables(db, true);\n            onCreate(db);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/greendao/DaoSession.java",
    "content": "package com.pengxh.autodingding.greendao;\n\nimport java.util.Map;\n\nimport org.greenrobot.greendao.AbstractDao;\nimport org.greenrobot.greendao.AbstractDaoSession;\nimport org.greenrobot.greendao.database.Database;\nimport org.greenrobot.greendao.identityscope.IdentityScopeType;\nimport org.greenrobot.greendao.internal.DaoConfig;\n\nimport com.pengxh.autodingding.bean.HistoryRecordBean;\n\nimport com.pengxh.autodingding.greendao.HistoryRecordBeanDao;\n\n// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.\n\n/**\n * {@inheritDoc}\n * \n * @see org.greenrobot.greendao.AbstractDaoSession\n */\npublic class DaoSession extends AbstractDaoSession {\n\n    private final DaoConfig historyRecordBeanDaoConfig;\n\n    private final HistoryRecordBeanDao historyRecordBeanDao;\n\n    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>\n            daoConfigMap) {\n        super(db);\n\n        historyRecordBeanDaoConfig = daoConfigMap.get(HistoryRecordBeanDao.class).clone();\n        historyRecordBeanDaoConfig.initIdentityScope(type);\n\n        historyRecordBeanDao = new HistoryRecordBeanDao(historyRecordBeanDaoConfig, this);\n\n        registerDao(HistoryRecordBean.class, historyRecordBeanDao);\n    }\n    \n    public void clear() {\n        historyRecordBeanDaoConfig.clearIdentityScope();\n    }\n\n    public HistoryRecordBeanDao getHistoryRecordBeanDao() {\n        return historyRecordBeanDao;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/greendao/HistoryRecordBeanDao.java",
    "content": "package com.pengxh.autodingding.greendao;\n\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteStatement;\n\nimport org.greenrobot.greendao.AbstractDao;\nimport org.greenrobot.greendao.Property;\nimport org.greenrobot.greendao.internal.DaoConfig;\nimport org.greenrobot.greendao.database.Database;\nimport org.greenrobot.greendao.database.DatabaseStatement;\n\nimport com.pengxh.autodingding.bean.HistoryRecordBean;\n\n// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.\n/** \n * DAO for table \"HISTORY_RECORD_BEAN\".\n*/\npublic class HistoryRecordBeanDao extends AbstractDao<HistoryRecordBean, Long> {\n\n    public static final String TABLENAME = \"HISTORY_RECORD_BEAN\";\n\n    /**\n     * Properties of entity HistoryRecordBean.<br/>\n     * Can be used for QueryBuilder and for referencing column names.\n     */\n    public static class Properties {\n        public final static Property Id = new Property(0, Long.class, \"id\", true, \"_id\");\n        public final static Property Uuid = new Property(1, String.class, \"uuid\", false, \"UUID\");\n        public final static Property Date = new Property(2, String.class, \"date\", false, \"DATE\");\n        public final static Property Message = new Property(3, String.class, \"message\", false, \"MESSAGE\");\n    }\n\n\n    public HistoryRecordBeanDao(DaoConfig config) {\n        super(config);\n    }\n    \n    public HistoryRecordBeanDao(DaoConfig config, DaoSession daoSession) {\n        super(config, daoSession);\n    }\n\n    /** Creates the underlying database table. */\n    public static void createTable(Database db, boolean ifNotExists) {\n        String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n        db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"HISTORY_RECORD_BEAN\\\" (\" + //\n                \"\\\"_id\\\" INTEGER PRIMARY KEY AUTOINCREMENT ,\" + // 0: id\n                \"\\\"UUID\\\" TEXT,\" + // 1: uuid\n                \"\\\"DATE\\\" TEXT,\" + // 2: date\n                \"\\\"MESSAGE\\\" TEXT);\"); // 3: message\n    }\n\n    /** Drops the underlying database table. */\n    public static void dropTable(Database db, boolean ifExists) {\n        String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"HISTORY_RECORD_BEAN\\\"\";\n        db.execSQL(sql);\n    }\n\n    @Override\n    protected final void bindValues(DatabaseStatement stmt, HistoryRecordBean entity) {\n        stmt.clearBindings();\n \n        Long id = entity.getId();\n        if (id != null) {\n            stmt.bindLong(1, id);\n        }\n \n        String uuid = entity.getUuid();\n        if (uuid != null) {\n            stmt.bindString(2, uuid);\n        }\n \n        String date = entity.getDate();\n        if (date != null) {\n            stmt.bindString(3, date);\n        }\n \n        String message = entity.getMessage();\n        if (message != null) {\n            stmt.bindString(4, message);\n        }\n    }\n\n    @Override\n    protected final void bindValues(SQLiteStatement stmt, HistoryRecordBean entity) {\n        stmt.clearBindings();\n \n        Long id = entity.getId();\n        if (id != null) {\n            stmt.bindLong(1, id);\n        }\n \n        String uuid = entity.getUuid();\n        if (uuid != null) {\n            stmt.bindString(2, uuid);\n        }\n \n        String date = entity.getDate();\n        if (date != null) {\n            stmt.bindString(3, date);\n        }\n \n        String message = entity.getMessage();\n        if (message != null) {\n            stmt.bindString(4, message);\n        }\n    }\n\n    @Override\n    public Long readKey(Cursor cursor, int offset) {\n        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);\n    }    \n\n    @Override\n    public HistoryRecordBean readEntity(Cursor cursor, int offset) {\n        HistoryRecordBean entity = new HistoryRecordBean( //\n            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id\n            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // uuid\n            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // date\n            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3) // message\n        );\n        return entity;\n    }\n     \n    @Override\n    public void readEntity(Cursor cursor, HistoryRecordBean entity, int offset) {\n        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));\n        entity.setUuid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));\n        entity.setDate(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));\n        entity.setMessage(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));\n     }\n    \n    @Override\n    protected final Long updateKeyAfterInsert(HistoryRecordBean entity, long rowId) {\n        entity.setId(rowId);\n        return rowId;\n    }\n    \n    @Override\n    public Long getKey(HistoryRecordBean entity) {\n        if(entity != null) {\n            return entity.getId();\n        } else {\n            return null;\n        }\n    }\n\n    @Override\n    public boolean hasKey(HistoryRecordBean entity) {\n        return entity.getId() != null;\n    }\n\n    @Override\n    protected final boolean isEntityUpdateable() {\n        return true;\n    }\n    \n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/net/AuthInterceptor.kt",
    "content": "package com.pengxh.autodingding.net\n\nimport com.blankj.utilcode.util.EncodeUtils\nimport com.blankj.utilcode.util.LogUtils\nimport okhttp3.Interceptor\nimport okhttp3.Response\nimport java.io.IOException\n\nobject AuthInterceptor : Interceptor {\n    private const val appKey = \"f01b8a02b66ea2d632e52e2e\"\n    private const val masterSecret = \"5e9ebea1163a6f3e2197f35d\"\n    private const val authString = \"$appKey:$masterSecret\"\n\n    private var token = \"Basic ${EncodeUtils.base64Encode2String(authString.toByteArray())}\"\n        set(value) {\n            field = value\n        }\n\n    override fun intercept(chain: Interceptor.Chain): Response {\n        val origin = chain.request()\n        val builder = origin.newBuilder().addHeader(\"Authorization\", token)\n        val response : Response\n        try {\n            response = chain.proceed(builder.build())\n\n        }catch (e:Exception){\n            e.printStackTrace()\n            throw IOException(e)\n        }\n        return response\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/net/RetrofitManager.kt",
    "content": "package com.pengxh.autodingding.net\n\nimport okhttp3.OkHttpClient\nimport okhttp3.logging.HttpLoggingInterceptor\nimport retrofit2.Retrofit\nimport retrofit2.converter.gson.GsonConverterFactory\nimport java.util.concurrent.TimeUnit\n\nobject RetrofitManager {\n    private const val BASE_URL =\"https://api.jpush.cn\"\n    private const val API_DAY_URL = \"http://timor.tech\"\n    private const val UPDATE_BASE_URL = \"http://smallfurrypaw.top\"\n\n    lateinit var okHttpClient: OkHttpClient\n\n    val retrofitClient: Retrofit\n        get() {\n            return Retrofit.Builder()\n                .baseUrl(BASE_URL)\n                .addConverterFactory(GsonConverterFactory.create())\n                .client(genericOkClient())\n                .build()\n        }\n    val workdayClient: Retrofit\n        get() {\n            return Retrofit.Builder()\n                .baseUrl(API_DAY_URL)\n                .addConverterFactory(GsonConverterFactory.create())\n                .client(generateWorkdayClient())\n                .build()\n        }\n    val updateClient: Retrofit\n        get(){\n            return Retrofit.Builder()\n                .baseUrl(UPDATE_BASE_URL)\n                .addConverterFactory(GsonConverterFactory.create())\n                .client(generateWorkdayClient())\n                .build()\n        }\n    private fun genericOkClient(): OkHttpClient {\n        val httpLoggingInterceptor = HttpLoggingInterceptor()\n        httpLoggingInterceptor.level = HttpLoggingInterceptor.Level.BODY\n\n        return OkHttpClient.Builder()\n            .connectTimeout(5_000L, TimeUnit.MILLISECONDS)\n            .readTimeout(10_000, TimeUnit.MILLISECONDS)\n            .writeTimeout(30_000, TimeUnit.MILLISECONDS)\n            .retryOnConnectionFailure(true)\n            .addInterceptor(httpLoggingInterceptor)\n            .addInterceptor(AuthInterceptor)\n            .build().also {\n                okHttpClient = it\n            }\n    }\n\n    private fun generateWorkdayClient(): OkHttpClient {\n        val httpLoggingInterceptor = HttpLoggingInterceptor()\n        httpLoggingInterceptor.level = HttpLoggingInterceptor.Level.BODY\n\n        return OkHttpClient.Builder()\n            .connectTimeout(5_000L, TimeUnit.MILLISECONDS)\n            .readTimeout(10_000, TimeUnit.MILLISECONDS)\n            .writeTimeout(30_000, TimeUnit.MILLISECONDS)\n            .retryOnConnectionFailure(false)\n            .addInterceptor(httpLoggingInterceptor)\n            .build()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/net/api/PushApi.kt",
    "content": "package com.pengxh.autodingding.net.api\n\nimport com.pengxh.autodingding.bean.PushMessage\nimport com.pengxh.autodingding.bean.PushResp\nimport retrofit2.http.Body\nimport retrofit2.http.POST\n\ninterface PushApi {\n    @POST(\"v3/push\")\n    suspend fun pushMsg(@Body pushMessage: PushMessage): PushResp\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/net/api/UpdateApi.kt",
    "content": "package com.pengxh.autodingding.net.api\n\nimport com.pengxh.autodingding.base.ApiResponse\nimport com.pengxh.autodingding.bean.Version\nimport retrofit2.http.GET\n\ninterface UpdateApi {\n    @GET(\"api/version.json\")\n    suspend fun getVersion(): ApiResponse<Version>\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/net/api/WorkDayApi.kt",
    "content": "package com.pengxh.autodingding.net.api\n\nimport com.pengxh.autodingding.bean.WorkdayResp\nimport retrofit2.http.GET\nimport retrofit2.http.Headers\n\ninterface WorkDayApi {\n    @Headers(\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36\")\n    @GET(\"/api/holiday/workday/next/\")\n    suspend fun getNextWorkday(): WorkdayResp\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/service/BaseAccessibilityService.kt",
    "content": "package com.pengxh.autodingding.service\n\nimport android.util.Log\nimport cn.vove7.andro_accessibility_api.AccessibilityApi\nimport cn.vove7.auto.core.AppScope\n\nclass BaseAccessibilityService: AccessibilityApi() {\n\n    override val enableListenPageUpdate: Boolean\n        get() = true\n    companion object {\n        private const val TAG = \"BaseAccessibilityService\"\n    }\n\n    override fun onCreate() {\n        //must set\n        baseService = this\n        super.onCreate()\n    }\n\n    override fun onDestroy() {\n        //must set\n        baseService = null\n        super.onDestroy()\n    }\n\n    //页面更新回调\n    override fun onPageUpdate(currentScope: AppScope) {\n        Log.d(TAG, \"onPageUpdate: $currentScope\")\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/service/GestureService.kt",
    "content": "package com.pengxh.autodingding.service\n\nimport android.accessibilityservice.AccessibilityService\nimport android.view.accessibility.AccessibilityEvent\nimport cn.vove7.andro_accessibility_api.AccessibilityApi\n\nclass GestureService: AccessibilityService() {\n\n    override fun onCreate() {\n        super.onCreate()\n        //must call\n        AccessibilityApi.gestureService = this\n    }\n    override fun onDestroy() {\n        super.onDestroy()\n        //must call\n        AccessibilityApi.gestureService = null\n    }\n\n    override fun onAccessibilityEvent(event: AccessibilityEvent?) {\n    }\n\n    override fun onInterrupt() {\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/service/NotificationMonitorService.kt",
    "content": "package com.pengxh.autodingding.service\n\nimport android.app.Notification\nimport android.content.ComponentName\nimport android.os.Build\nimport android.service.notification.NotificationListenerService\nimport android.service.notification.StatusBarNotification\nimport com.drake.channel.sendEvent\nimport com.pengxh.autodingding.BaseApplication\nimport com.pengxh.autodingding.bean.HistoryRecordBean\nimport com.pengxh.autodingding.greendao.HistoryRecordBeanDao\nimport com.pengxh.autodingding.ui.fragment.SettingsFragment\nimport com.pengxh.autodingding.utils.TimeOrDateUtil\nimport java.util.*\n\nclass NotificationMonitorService : NotificationListenerService() {\n    private var recordBeanDao: HistoryRecordBeanDao? = null\n\n    /**\n     * 有可用的并且和通知管理器连接成功时回调\n     */\n    override fun onListenerConnected() {\n        recordBeanDao = BaseApplication.daoSession?.historyRecordBeanDao\n    }\n\n    /**\n     * 当有新通知到来时会回调\n     */\n    override fun onNotificationPosted(sbn: StatusBarNotification) {\n        val extras = sbn.notification.extras\n        // 获取接收消息APP的包名\n        val packageName = sbn.packageName\n        // 获取接收消息的内容\n        val notificationText = extras.getString(Notification.EXTRA_TEXT)\n        if (packageName == \"com.alibaba.android.rimet\") {\n            if (notificationText == null || notificationText == \"\") {\n                return\n            }\n            if (notificationText.contains(\"考勤打卡\")) {\n                //保存打卡记录\n                val bean = HistoryRecordBean()\n                bean.uuid = UUID.randomUUID().toString()\n                bean.date = TimeOrDateUtil.timestampToDate(System.currentTimeMillis())\n                bean.message = notificationText\n                recordBeanDao!!.save(bean)\n                //通知发送邮件和更新界面\n                sendEvent(notificationText)\n            }\n        }else if(packageName == \"com.pengxh.autodingding\"){\n            if (notificationText == null || notificationText == \"\") {\n                return\n            }\n            if(notificationText.contains(\"\")){\n\n            }\n        }\n    }\n\n    /**\n     * 当有通知移除时会回调\n     */\n    override fun onNotificationRemoved(sbn: StatusBarNotification) {}\n    override fun onListenerDisconnected() {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            // 通知侦听器断开连接 - 请求重新绑定\n            requestRebind(ComponentName(this, NotificationListenerService::class.java))\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/service/PushCoreService.kt",
    "content": "package com.pengxh.autodingding.service\n\nimport android.app.KeyguardManager\nimport android.content.Context\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.os.BatteryManager\nimport android.os.Build\nimport android.os.PowerManager\nimport android.util.Log\nimport cn.jpush.android.api.CustomMessage\nimport cn.jpush.android.api.JPushInterface\nimport cn.jpush.android.service.JPushMessageService\nimport com.blankj.utilcode.util.ActivityUtils\nimport com.blankj.utilcode.util.AppUtils\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.blankj.utilcode.util.DeviceUtils\nimport com.blankj.utilcode.util.ScreenUtils\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.AndroidxBaseActivity\nimport com.pengxh.autodingding.actions.SwipeUnlockAction\nimport com.pengxh.autodingding.bean.BodyMsg\nimport com.pengxh.autodingding.bean.PushAudience\nimport com.pengxh.autodingding.bean.PushMessage\nimport com.pengxh.autodingding.net.RetrofitManager\nimport com.pengxh.autodingding.net.api.PushApi\nimport com.pengxh.autodingding.ui.MainActivity\nimport com.pengxh.autodingding.utils.SendMailUtil\nimport com.pengxh.autodingding.utils.Utils\nimport com.pengxh.autodingding.utils.launchWithExpHandler\nimport kotlinx.coroutines.DelicateCoroutinesApi\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.withContext\n\nclass PushCoreService : JPushMessageService() {\n    override fun onMessage(context: Context, customMessage: CustomMessage) {\n        Log.d(TAG, customMessage.message)\n        val intent = Intent(context, MainActivity::class.java)\n        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)\n        val senderRegId = customMessage.title\n        if (MSG_MAIL_CHECK == customMessage.message) {\n            wakePhone(context)\n            unlockPhone(context){\n                intent.putExtra(MainActivity.EXTRA_ACTION, MainActivity.ACTION_SEND_MAIL)\n                context.startActivity(intent)\n            }\n            reply(senderRegId)\n        } else if (MSG_SIGN == customMessage.message) {\n            wakePhone(context)\n            unlockPhone(context){\n                intent.putExtra(MainActivity.EXTRA_ACTION, MainActivity.ACTION_LAUNCH_DING)\n                context.startActivity(intent)\n            }\n        } else if (MSG_STATUS_REPORT == customMessage.message){\n            val emailAddress = Utils.readEmailAddress()\n            val manager = context.getSystemService(AndroidxBaseActivity.BATTERY_SERVICE) as BatteryManager\n            val charging = manager.isCharging\n            val curBattery = manager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)///当前电量百分比\n            val regId = JPushInterface.getRegistrationID(context)\n            val screenLock = ScreenUtils.isScreenLock()\n            val androidAPI = Build.VERSION.SDK_INT\n            val manufacturer = Build.MANUFACTURER\n            val model = DeviceUtils.getModel()\n            val appInfo = AppUtils.getAppInfo()\n            val message = \"注册ID: $regId ${if (screenLock) \"是\" else \"未\"}锁屏 \" +\n                    \"当前${if (charging) \"正在\" else \"未\"}充电： 当前电量百分比：$curBattery %,\" +\n                    \"安卓版本:${androidAPI}, 厂商:${manufacturer},型号：${model}, 应用版本${appInfo.versionName}\"\n            SendMailUtil.send(emailAddress, message)\n        } else if (MSG_SCREEN_SHOT == customMessage.message){\n            wakePhone(context)\n            unlockPhone(context){\n                intent.putExtra(MainActivity.EXTRA_ACTION, MainActivity.ACTION_SCREENSHOT)\n                context.startActivity(intent)\n            }\n        } else if (MSG_SLEEP == customMessage.message){\n            val ifLock = ScreenUtils.isScreenLock()\n            if (ifLock.not()){\n                //TODO turn off screen\n            }\n        } else if (MSG_MANUAL_SIGN == customMessage.message){\n            wakePhone(context)\n            unlockPhone(context){\n                intent.putExtra(MainActivity.EXTRA_ACTION, MainActivity.ACTION_MANUAL_SIGN)\n                context.startActivity(intent)\n            }\n        }\n        super.onMessage(context, customMessage)\n    }\n\n    @OptIn(DelicateCoroutinesApi::class)\n    private fun wakePhone(context: Context){\n        val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager\n        val screenOn = powerManager.isInteractive\n        if (!screenOn) {\n            //唤醒屏幕\n            Log.d(TAG, \"screen off, now waking up phone\")\n            val wakeLock = powerManager.newWakeLock(\n                PowerManager.PARTIAL_WAKE_LOCK,\n                \"autoDing:bright\"\n            )\n            wakeLock.acquire(10000)\n            launchWithExpHandler {\n                withContext(Dispatchers.IO){\n                    delay(50000)\n                    wakeLock.release()\n                }\n            }\n        }\n    }\n\n    private fun unlockPhone(context: Context, callback: (()->Unit)){\n        val keyGuardManager = context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager\n        if (keyGuardManager.isKeyguardLocked){\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n                Log.d(\"unlock\", \"8.0+ version dismiss function\")\n                keyGuardManager.requestDismissKeyguard(ActivityUtils.getTopActivity(), object : KeyguardManager.KeyguardDismissCallback(){\n                    override fun onDismissSucceeded() {\n                        Log.d(\"unlock\", \"success\")\n                        callback.invoke()\n                    }\n\n                    override fun onDismissError() {\n                        Log.d(\"unlock\", \"error\")\n                        ToastUtils.showShort(\"解锁错误\")\n                        val emailAddress = Utils.readEmailAddress()\n                        SendMailUtil.send(emailAddress, \"解锁手机异常，可能手机未设置锁屏显示，导致手机收到了消息但无法正常唤醒手机锁屏\");\n//                        launchWithExpHandler {\n//                            SwipeUnlockAction().run(ActivityUtils.getTopActivity())\n//                            delay(3000)\n//                            callback.invoke()\n//                        }\n                    }\n\n                    override fun onDismissCancelled() {\n                        Log.d(\"unlock\", \"cancelled\")\n                        ToastUtils.showShort(\"解锁取消\")\n                    }\n                })\n            }else{\n                Log.d(\"unlock\", \"old version dismiss function\")\n                keyGuardManager.newKeyguardLock(\"dismiss\").disableKeyguard()\n                callback.invoke()\n            }\n        }else{\n            callback.invoke()\n        }\n    }\n\n    @OptIn(DelicateCoroutinesApi::class)\n    private fun reply(targetRegId:String){\n        launchWithExpHandler {\n            withContext(Dispatchers.IO){\n                val api = RetrofitManager.retrofitClient.create(PushApi::class.java)\n                val pushMessage = PushMessage()\n                pushMessage.audience = PushAudience().apply {\n                    registration_id = mutableListOf(targetRegId)\n                }\n                pushMessage.message = BodyMsg().apply {\n                    msg_content = MSG_REPLY\n                    title = CacheDiskUtils.getInstance().getString(\"pushRegId\")\n                }\n                api.pushMsg(pushMessage)\n            }\n        }\n    }\n\n    companion object {\n        private const val TAG = \"MyReceiver\"\n        const val MSG_MAIL_CHECK = \"check\"\n        const val MSG_SIGN = \"sign\"\n        const val MSG_STATUS_REPORT = \"statusReport\"\n        const val MSG_SCREEN_SHOT = \"screenShot\"\n        const val MSG_SLEEP = \"goToSleep\"\n        const val MSG_MANUAL_SIGN = \"manualSign\"\n        const val MSG_REPLY = \"reply\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/service/PushService.kt",
    "content": "package com.pengxh.autodingding.service\n\nimport cn.jpush.android.service.JCommonService\n\nclass PushService : JCommonService()"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/HistoryRecordActivity.kt",
    "content": "package com.pengxh.autodingding.ui\n\nimport android.os.CountDownTimer\nimport android.os.Environment\nimport android.os.Handler\nimport android.os.Message\nimport android.view.View\nimport androidx.core.content.ContextCompat\nimport com.afollestad.materialdialogs.MaterialDialog\nimport com.blankj.utilcode.util.SizeUtils\nimport com.blankj.utilcode.util.ToastUtils\nimport com.gyf.immersionbar.ImmersionBar\nimport com.pengxh.autodingding.AndroidxBaseActivity\nimport com.pengxh.autodingding.BaseApplication.Companion.daoSession\nimport com.pengxh.autodingding.R\nimport com.pengxh.autodingding.adapter.HistoryRecordAdapter\nimport com.pengxh.autodingding.bean.HistoryRecordBean\nimport com.pengxh.autodingding.databinding.ActivityHistoryBinding\nimport com.pengxh.autodingding.greendao.HistoryRecordBeanDao\nimport com.pengxh.autodingding.utils.ExcelUtils\nimport com.pengxh.autodingding.utils.StatusBarColorUtil\nimport com.pengxh.autodingding.utils.Utils\nimport com.pengxh.autodingding.widgets.EasyPopupWindow\nimport com.scwang.smartrefresh.layout.api.RefreshLayout\nimport java.io.File\nimport java.lang.ref.WeakReference\n\nclass HistoryRecordActivity : AndroidxBaseActivity<ActivityHistoryBinding?>(),\n    View.OnClickListener {\n    private var weakReferenceHandler: WeakReferenceHandler? = null\n    private lateinit var recordBeanDao: HistoryRecordBeanDao\n    private var dataBeans: MutableList<HistoryRecordBean> = ArrayList()\n    private var isRefresh = false\n    private var historyAdapter: HistoryRecordAdapter? = null\n    override fun setupTopBarLayout() {\n        StatusBarColorUtil.setColor(this, ContextCompat.getColor(this, R.color.colorAppThemeLight))\n        ImmersionBar.with(this).statusBarDarkFont(false).init()\n        viewBinding!!.titleView.text = \"打卡记录\"\n        viewBinding!!.titleRightView.setOnClickListener(this)\n    }\n\n    public override fun initData() {\n        weakReferenceHandler = WeakReferenceHandler(this)\n        recordBeanDao = daoSession!!.historyRecordBeanDao\n        dataBeans = recordBeanDao.loadAll()\n        weakReferenceHandler!!.sendEmptyMessage(2022021403)\n    }\n\n    public override fun initEvent() {\n        viewBinding!!.refreshLayout.setOnRefreshListener { layout: RefreshLayout ->\n            isRefresh = true\n            object : CountDownTimer(1500, 500) {\n                override fun onTick(millisUntilFinished: Long) {}\n                override fun onFinish() {\n                    dataBeans.clear()\n                    dataBeans = recordBeanDao.loadAll()\n                    layout.finishRefresh()\n                    isRefresh = false\n                    weakReferenceHandler!!.sendEmptyMessage(2022021403)\n                }\n            }.start()\n        }\n        viewBinding!!.refreshLayout.setEnableLoadMore(false)\n    }\n\n    private class WeakReferenceHandler(activity: HistoryRecordActivity) : Handler() {\n        private val reference: WeakReference<HistoryRecordActivity>\n        override fun handleMessage(msg: Message) {\n            super.handleMessage(msg)\n            val activity = reference.get()\n            if (msg.what == 2022021403) {\n                if (activity!!.isRefresh) {\n                    activity.historyAdapter!!.notifyDataSetChanged()\n                } else { //首次加载数据\n                    if (activity.dataBeans.size == 0) {\n                        activity.viewBinding!!.emptyView.visibility = View.VISIBLE\n                    } else {\n                        activity.viewBinding!!.emptyView.visibility = View.GONE\n                        activity.historyAdapter = HistoryRecordAdapter(activity, activity.dataBeans)\n                        activity.viewBinding!!.historyListView.adapter = activity.historyAdapter\n                    }\n                }\n            }\n        }\n\n        init {\n            reference = WeakReference(activity)\n        }\n    }\n\n    override fun onClick(view: View) {\n        val easyPopupWindow = EasyPopupWindow(this, items)\n        easyPopupWindow.setPopupWindowClickListener(object: EasyPopupWindow.PopupWindowClickListener{\n            override fun popupWindowClick(position: Int) {\n                if (position == 0) {\n                    //添加导出功能\n                    if (dataBeans.size == 0) {\n                        MaterialDialog(this@HistoryRecordActivity).show {\n                            title(text = \"温馨提示\")\n                            message(text = \"空空如也，无法删除\")\n                            positiveButton()\n                        }\n                    } else {\n                        MaterialDialog(this@HistoryRecordActivity).show {\n                            title(text=\"清除\")\n                            message(text = \"是否确定清除打卡记录？\")\n                            positiveButton{\n                                recordBeanDao.deleteAll()\n                                dataBeans.clear()\n                                historyAdapter?.notifyDataSetChanged()\n                            }\n                        }\n                    }\n                } else if (position == 1) {\n                    val emailAddress = Utils.readEmailAddress()\n                    if (emailAddress == \"\") {\n                        ToastUtils.showShort(\"未设置邮箱，无法导出\")\n                        return\n                    }\n                    if (dataBeans.size == 0) {\n                        ToastUtils.showShort(\"无打卡记录，无法导出\")\n                        return\n                    }\n                    MaterialDialog(this@HistoryRecordActivity).show {\n                        title(text =\"导出\")\n                        message(text= \"导出到$emailAddress？\")\n                        positiveButton {\n                            pullToEmail(dataBeans)\n                        }\n                        negativeButton()\n                    }\n                }\n            }\n        })\n        easyPopupWindow.showAsDropDown(\n            viewBinding!!.titleRightView, viewBinding!!.titleRightView.width, SizeUtils.dp2px(10f)\n        )\n    }\n\n    private fun pullToEmail(historyBeans: List<HistoryRecordBean>) {\n        //{\"date\":\"2020-04-15\",\"message\":\"考勤打卡:11:42 下班打卡 早退\",\"uuid\":\"26btND0uLqU\"},{\"date\":\"2020-04-15\",\"message\":\"考勤打卡:16:32 下班打卡 早退\",\"uuid\":\"UTWQJzCfTl9\"}\n        val dir = File(getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS), \"DingRecord\")\n        if (!dir.exists()) {\n            dir.mkdir()\n        }\n        ExcelUtils.initExcel(\"$dir/打卡记录表.xls\", excelTitle)\n        val fileName = \"$dir/打卡记录表.xls\"\n        ExcelUtils.writeObjListToExcel(historyBeans, fileName)\n    }\n\n    companion object {\n        private val items = listOf(\"删除记录\", \"导出记录\")\n        private val excelTitle:Array<String?> = arrayOf(\"uuid\", \"日期\", \"打卡信息\")\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/MainActivity.kt",
    "content": "package com.pengxh.autodingding.ui\n\nimport android.content.Intent\nimport android.graphics.Bitmap\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.MenuItem\nimport android.view.WindowManager\nimport androidx.core.content.ContextCompat\nimport androidx.fragment.app.Fragment\nimport androidx.viewpager2.widget.ViewPager2\nimport com.afollestad.materialdialogs.MaterialDialog\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.blankj.utilcode.util.ImageUtils\nimport com.blankj.utilcode.util.IntentUtils\nimport com.blankj.utilcode.util.LogUtils\nimport com.blankj.utilcode.util.ScreenUtils\nimport com.blankj.utilcode.util.TimeUtils\nimport com.gyf.immersionbar.ImmersionBar\nimport com.pengxh.autodingding.AndroidxBaseActivity\nimport com.pengxh.autodingding.R\nimport com.pengxh.autodingding.actions.DingSignAction\nimport com.pengxh.autodingding.adapter.FragAdapter\nimport com.pengxh.autodingding.databinding.ActivityMainBinding\nimport com.pengxh.autodingding.service.BaseAccessibilityService\nimport com.pengxh.autodingding.ui.fragment.AutoDingDingFragment\nimport com.pengxh.autodingding.ui.fragment.SettingsFragment\nimport com.pengxh.autodingding.utils.AccessibilityUtil\nimport com.pengxh.autodingding.utils.Constant\nimport com.pengxh.autodingding.utils.MailSender\nimport com.pengxh.autodingding.utils.SendMailUtil\nimport com.pengxh.autodingding.utils.SendMailUtil.createMail\nimport com.pengxh.autodingding.utils.SendMailUtil.send\nimport com.pengxh.autodingding.utils.StatusBarColorUtil\nimport com.pengxh.autodingding.utils.Utils\nimport com.pengxh.autodingding.utils.launchWithExpHandler\nimport com.pengxh.autodingding.utils.toast\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.GlobalScope\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\nimport java.io.File\n\nclass MainActivity : AndroidxBaseActivity<ActivityMainBinding?>() {\n    private var menuItem: MenuItem? = null\n    private var actionJob: Job? = null\n    private val fragmentList: MutableList<Fragment> = ArrayList()\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        this.window.addFlags(\n            WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or\n                    WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or\n                    WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON\n        )\n    }\n\n    override fun setupTopBarLayout() {\n        StatusBarColorUtil.setColor(this, ContextCompat.getColor(this, R.color.colorAppThemeLight))\n        ImmersionBar.with(this).statusBarDarkFont(false).init()\n        viewBinding!!.titleView.text = \"远程启动钉钉\"\n    }\n\n    override fun onNewIntent(intent: Intent) {\n        super.onNewIntent(intent)\n        execAction(intent)\n    }\n\n    override fun initData() {\n        execAction(intent)\n        fragmentList.add(AutoDingDingFragment())\n        fragmentList.add(SettingsFragment())\n    }\n\n    private fun execAction(intent: Intent) {\n        val action = intent.getStringExtra(EXTRA_ACTION)\n        if (ACTION_SEND_MAIL == action) {\n            val emailAddress = Utils.readEmailAddress()\n            Log.d(\"action\", \"sending email:$emailAddress\")\n            val emailMessage =\n                \"如果发送指令1分钟内收到，说明应用正常运行中。\" + TimeUtils.getNowString()\n            send(emailAddress, emailMessage)\n        } else if (ACTION_LAUNCH_DING == action) {\n            try {\n                viewBinding!!.root.postDelayed({\n                    Log.d(\"action\", \"trying to launch dingding\")\n                    startActivity(IntentUtils.getLaunchAppIntent(Constant.DINGDING))\n                }, 2000)\n            } catch (e: Exception) {\n                e.printStackTrace()\n            }\n        } else if (ACTION_SCREENSHOT == action) {\n            val emailAddress = Utils.readEmailAddress()\n            GlobalScope.launch(Dispatchers.IO) {\n                delay(2000)\n                val screenBitmap = ScreenUtils.screenShot(this@MainActivity, false)\n                val temp = filesDir.absolutePath + \"screenShot${TimeUtils.getNowString()}.jpg\"\n                ImageUtils.save(screenBitmap, temp, Bitmap.CompressFormat.JPEG)\n                val mailInfo = SendMailUtil.createAttachMail(\n                    emailAddress, File(temp),\n                    CacheDiskUtils.getInstance().getString(\"senderEmail\", \"lttclaw@qq.com\"),\n                    CacheDiskUtils.getInstance().getString(\"senderAuth\", \"hwpzapzrkmgpgaba\")\n                )\n                LogUtils.d(\n                    temp,\n                    mailInfo.fromAddress,\n                    mailInfo.toAddress,\n                    mailInfo.attachFile?.absolutePath\n                )\n                MailSender().sendAccessoryMail(mailInfo)\n            }\n        } else if (ACTION_MANUAL_SIGN == action) {\n            val dingAction = DingSignAction()\n            if (actionJob?.isCompleted.let { it != null && !it }) {\n                toast(\"有正在运行的任务\")\n                return\n            } else if (AccessibilityUtil.isServiceOn(\n                    this,\n                    BaseAccessibilityService::class.java.canonicalName ?: \"\"\n                ).not()\n            ) {\n                toast(\"未开启相应的辅助服务\")\n                return\n            }\n            actionJob = launchWithExpHandler {\n                dingAction.run(this@MainActivity)\n            }\n            actionJob?.invokeOnCompletion {\n                toast(\"执行结束\")\n                val emailAddress = Utils.readEmailAddress()\n                val emailMessage = dingAction.message.toString()\n                MailSender().sendTextMail(createMail(emailAddress, emailMessage))\n            }\n        }\n    }\n\n    public override fun initEvent() {\n        viewBinding!!.bottomNavigation.setOnItemSelectedListener { item: MenuItem ->\n            val itemId = item.itemId\n            if (itemId == R.id.nav_auto_sign) {\n                viewBinding!!.mViewPager.currentItem = 0\n                viewBinding!!.titleView.text = \"定时打卡\"\n            } else if (itemId == R.id.nav_settings) {\n                viewBinding!!.mViewPager.currentItem = 1\n                viewBinding!!.titleView.text = \"设置\"\n            }\n            false\n        }\n        val fragmentAdapter = FragAdapter(this, fragmentList)\n        viewBinding!!.mViewPager.adapter = fragmentAdapter\n        viewBinding!!.mViewPager.offscreenPageLimit = fragmentList.size\n        viewBinding!!.mViewPager.registerOnPageChangeCallback(object :\n            ViewPager2.OnPageChangeCallback() {\n            override fun onPageSelected(position: Int) {\n                if (menuItem != null) {\n                    menuItem!!.isChecked = false\n                } else {\n                    viewBinding!!.bottomNavigation.menu.getItem(0).isChecked = false\n                }\n                menuItem = viewBinding!!.bottomNavigation.menu.getItem(position)\n                menuItem!!.isChecked = true\n            }\n        })\n        if (!Utils.isAppAvailable(Constant.DINGDING)) {\n            MaterialDialog(this).show {\n                title(text = \"温馨提醒\")\n                message(text = \"手机没有安装钉钉软件，无法自动打卡\")\n                positiveButton(text = \"退出\") {\n                    finish()\n                }\n            }\n        }\n    }\n\n    @Deprecated(\"Deprecated in Java\", ReplaceWith(\"moveTaskToBack(false)\"))\n    override fun onBackPressed() {\n        moveTaskToBack(false)\n    }\n\n    companion object {\n        const val EXTRA_ACTION = \"action\"\n        const val ACTION_SEND_MAIL = \"sendMail\"\n        const val ACTION_LAUNCH_DING = \"launchDing\"\n        const val ACTION_SCREENSHOT = \"screenShot\"\n        const val ACTION_MANUAL_SIGN = \"manualSign\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/WelcomeActivity.kt",
    "content": "package com.pengxh.autodingding.ui\n\nimport android.content.Intent\nimport android.os.Bundle\nimport androidx.appcompat.app.AppCompatActivity\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.utils.Constant\nimport com.pengxh.autodingding.utils.mainHandler\nimport pub.devrel.easypermissions.EasyPermissions\nimport pub.devrel.easypermissions.EasyPermissions.PermissionCallbacks\n\nclass WelcomeActivity : AppCompatActivity(), PermissionCallbacks {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        startMainActivity()\n    }\n\n    private fun startMainActivity() {\n        startActivity(Intent(this, MainActivity::class.java))\n        finish()\n    }\n\n    override fun onPermissionsGranted(requestCode: Int, perms: List<String>) {\n        startMainActivity()\n    }\n\n    override fun onPermissionsDenied(requestCode: Int, perms: List<String>) {\n        if (perms.size == Constant.USER_PERMISSIONS.size) { //授权全部失败，则提示用户\n            ToastUtils.showShort(\"授权失败\")\n            mainHandler.postDelayed({ this@WelcomeActivity.finish() }, 1500)\n        }\n    }\n\n    override fun onRequestPermissionsResult(\n        requestCode: Int,\n        permissions: Array<String>,\n        grantResults: IntArray\n    ) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n        //将请求结果传递EasyPermission库处理\n        EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/AutoDingDingFragment.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport android.content.Intent\nimport android.graphics.Color\nimport android.os.CountDownTimer\nimport android.util.Log\nimport android.view.View\nimport com.blankj.utilcode.util.ToastUtils\nimport com.drake.channel.receiveEvent\nimport com.jzxiang.pickerview.TimePickerDialog\nimport com.jzxiang.pickerview.data.Type\nimport com.pengxh.autodingding.AndroidxBaseFragment\nimport com.pengxh.autodingding.R\nimport com.pengxh.autodingding.databinding.FragmentDayBinding\nimport com.pengxh.autodingding.net.RetrofitManager\nimport com.pengxh.autodingding.net.api.WorkDayApi\nimport com.pengxh.autodingding.ui.WelcomeActivity\nimport com.pengxh.autodingding.utils.Constant\nimport com.pengxh.autodingding.utils.SendMailUtil\nimport com.pengxh.autodingding.utils.TimeOrDateUtil\nimport com.pengxh.autodingding.utils.Utils\nimport kotlinx.coroutines.DelicateCoroutinesApi\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.GlobalScope\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.text.SimpleDateFormat\nimport java.util.Calendar\nimport java.util.Locale\nimport java.util.Timer\nimport java.util.TimerTask\n\nclass AutoDingDingFragment : AndroidxBaseFragment<FragmentDayBinding?>(), View.OnClickListener {\n    private var amCountDownTimer: CountDownTimer? = null\n    private var pmCountDownTimer: CountDownTimer? = null\n    private var timer: Timer? = null\n    override fun setupTopBarLayout() {}\n    override fun initData() {\n        timer = Timer()\n        timer!!.schedule(object : TimerTask() {\n            override fun run() {\n                val systemTime = TimeOrDateUtil.timestampToTime(System.currentTimeMillis())\n                viewBinding!!.currentTime.post {\n                    viewBinding?.currentTime?.text = systemTime\n                }\n            }\n        }, 0, 1000)\n        viewBinding!!.startLayoutView.setOnClickListener(this)\n        viewBinding!!.endLayoutView.setOnClickListener(this)\n        viewBinding!!.endAmDuty.setOnClickListener(this)\n        viewBinding!!.endPmDuty.setOnClickListener(this)\n        receiveEvent<String> {\n            val intent = Intent(context, WelcomeActivity::class.java)\n            intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK\n            context?.startActivity(intent)\n            val emailAddress = Utils.readEmailAddress()\n            if (emailAddress == \"\") {\n                Log.d(\"receive event\", \"邮箱地址为空\")\n                ToastUtils.showShort(\"收件邮箱未设置\")\n            } else {\n                if (it.isNotEmpty()){\n                    SendMailUtil.send(emailAddress, it)\n                }\n            }\n\n        }\n    }\n\n    override fun initEvent() {}\n\n    override fun onClick(v: View) {\n        val id = v.id\n        if (id == R.id.startLayoutView) {\n            //设置上班时间\n            TimePickerDialog.Builder().setThemeColor(Color.BLUE)\n                .setWheelItemTextSize(15)\n                .setCyclic(false)\n                .setMinMillseconds(System.currentTimeMillis())\n                .setMaxMillseconds(System.currentTimeMillis() + Constant.ONE_WEEK)\n                .setType(Type.ALL)\n                .setCallBack { timePickerView: TimePickerDialog?, millSeconds: Long ->\n                    viewBinding!!.amTime.text = TimeOrDateUtil.timestampToDate(millSeconds)\n                    //计算时间差\n                    onDuty(millSeconds)\n                }.build().show(childFragmentManager, \"year_month_day_hour_minute\")\n        } else if (id == R.id.endLayoutView) {\n            //设置下班时间\n            TimePickerDialog.Builder().setThemeColor(Color.BLUE)\n                .setWheelItemTextSize(15)\n                .setCyclic(false)\n                .setMinMillseconds(System.currentTimeMillis())\n                .setMaxMillseconds(System.currentTimeMillis() + Constant.ONE_WEEK)\n                .setType(Type.ALL)\n                .setCallBack { timePickerView: TimePickerDialog?, millSeconds: Long ->\n                    viewBinding!!.pmTime.text = TimeOrDateUtil.timestampToDate(millSeconds)\n                    //计算时间差\n                    offDuty(millSeconds)\n                }.build().show(childFragmentManager, \"year_month_day_hour_minute\")\n        } else if (id == R.id.endAmDuty) {\n            if (amCountDownTimer != null) {\n                amCountDownTimer!!.cancel()\n                viewBinding!!.startTimeView.text = \"--\"\n            }\n        } else if (id == R.id.endPmDuty) {\n            if (pmCountDownTimer != null) {\n                pmCountDownTimer!!.cancel()\n                viewBinding!!.endTimeView.text = \"--\"\n            }\n        }\n    }\n\n    private fun onDuty(millSeconds: Long) {\n        val deltaTime = TimeOrDateUtil.deltaTime(millSeconds / 1000)\n        if (deltaTime == 0L) {\n            return\n        }\n        viewBinding!!.amTime.text = TimeOrDateUtil.timestampToDate(millSeconds)\n        //显示倒计时\n        val text = viewBinding!!.startTimeView.text.toString()\n        if (text == \"--\") {\n            amCountDownTimer = object : CountDownTimer(deltaTime * 1000, 1000) {\n                override fun onTick(l: Long) {\n                    viewBinding!!.startTimeView.text = (l / 1000).toInt().toString()\n                }\n\n                override fun onFinish() {\n                    viewBinding!!.startTimeView.text = \"--\"\n                    Utils.openDingDing(Constant.DINGDING)\n                    setNextPeriod(millSeconds){\n                        onDuty(it)\n                    }\n                }\n            }\n            (amCountDownTimer as CountDownTimer).start()\n        } else {\n            ToastUtils.showShort(\"已有任务在进行中\")\n        }\n    }\n\n    private fun offDuty(millSeconds: Long) {\n        val deltaTime = TimeOrDateUtil.deltaTime(millSeconds / 1000)\n        if (deltaTime == 0L) {\n            return\n        }\n        viewBinding!!.pmTime.text = TimeOrDateUtil.timestampToDate(millSeconds)\n        //显示倒计时\n        val text = viewBinding!!.endTimeView.text.toString()\n        if (text == \"--\") {\n            pmCountDownTimer = object : CountDownTimer(deltaTime * 1000, 1000) {\n                override fun onTick(l: Long) {\n                    viewBinding!!.endTimeView.text = (l / 1000).toInt().toString()\n                }\n\n                override fun onFinish() {\n                    viewBinding!!.endTimeView.text = \"--\"\n                    Utils.openDingDing(Constant.DINGDING)\n                    setNextPeriod(millSeconds){\n                        offDuty(it)\n                    }\n                }\n            }\n            (pmCountDownTimer as CountDownTimer).start()\n        } else {\n            ToastUtils.showShort(\"已有任务在进行中\")\n        }\n    }\n\n    @OptIn(DelicateCoroutinesApi::class)\n    private fun setNextPeriod(millSeconds: Long, block: (timeStamp:Long)->Unit){\n        val retrofit = RetrofitManager.workdayClient\n        val api = retrofit.create(WorkDayApi::class.java)\n        GlobalScope.launch(Dispatchers.Main) {\n            val nextWorkdayCal = withContext(Dispatchers.IO){\n                val resp = api.getNextWorkday()\n                resp.workday?.date?.let {\n                    val curCal = Calendar.getInstance()\n                    curCal.timeInMillis = millSeconds\n\n                    val df = SimpleDateFormat(\"yyyy-MM-dd\", Locale.CHINESE)\n                    val nextWorkdayCal = Calendar.getInstance()\n                    nextWorkdayCal.time = df.parse(it)!!\n                    nextWorkdayCal.set(Calendar.HOUR_OF_DAY, curCal.get(Calendar.HOUR_OF_DAY))\n                    nextWorkdayCal.set(Calendar.MINUTE, curCal.get(Calendar.MINUTE))\n                    nextWorkdayCal.set(Calendar.SECOND, curCal.get(Calendar.SECOND))\n                    nextWorkdayCal\n                }\n            }\n            if (nextWorkdayCal != null) {\n                block.invoke(nextWorkdayCal.timeInMillis)\n            }\n        }\n    }\n\n    override fun onDestroyView() {\n        if (timer != null) {\n            timer!!.cancel()\n        }\n        super.onDestroyView()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/MailConfFragment.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport android.content.Context\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.ViewModel\nimport androidx.lifecycle.ViewModelProvider\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.databinding.FragmentMailConfBinding\nimport com.pengxh.autodingding.utils.Utils\n\nclass MailConfFragment :Fragment() {\n    private var fragmentProvider: ViewModelProvider? = null\n    private lateinit var binding: FragmentMailConfBinding\n    private var configTested = false\n    private lateinit var vm: MailConfVM\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View {\n        binding = FragmentMailConfBinding.inflate(inflater, container, false);\n        return binding.root\n    }\n\n    override fun onAttach(context: Context) {\n        super.onAttach(context)\n        vm = getFragmentViewModel(MailConfVM::class.java)\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        val savedFromAddress = CacheDiskUtils.getInstance().getString(\"senderEmail\", \"lttclaw@qq.com\")\n        val savedFromAuth = CacheDiskUtils.getInstance().getString(\"senderAuth\", \"hwpzapzrkmgpgaba\")\n        val savedToAddress = Utils.readEmailAddress()\n        binding.etSenderEmailAddress.setText(savedFromAddress)\n        binding.etSenderEmailAuth.setText(savedFromAuth)\n        binding.etReceiverEmailAddress.setText(savedToAddress)\n\n        binding.btnCheck.setOnClickListener {\n            val fromAddress = binding.etSenderEmailAddress.text.toString()\n            val fromAuth = binding.etSenderEmailAuth.text.toString()\n            val toAddress = binding.etReceiverEmailAddress.text.toString()\n            if(fromAddress.isEmpty() || fromAuth.isEmpty() || toAddress.isEmpty()){\n                ToastUtils.showShort(\"配置选项缺失！\")\n            }else{\n                vm.sendMail(fromAddress, fromAuth, toAddress)\n                configTested = true\n                ToastUtils.showShort(\"已尝试发送邮件\")\n            }\n        }\n        binding.btnSave.setOnClickListener {\n            val fromAddress = binding.etSenderEmailAddress.text.toString()\n            val fromAuth = binding.etSenderEmailAuth.text.toString()\n            val toAddress = binding.etReceiverEmailAddress.text.toString()\n            if(configTested){\n                CacheDiskUtils.getInstance().put(\"senderEmail\" , fromAddress)\n                CacheDiskUtils.getInstance().put(\"senderAuth\", fromAuth)\n                Utils.saveEmailAddress(toAddress)\n                ToastUtils.showShort(\"保存配置成功\")\n            }else{\n                ToastUtils.showShort(\"请先进行配置测试\")\n            }\n        }\n        binding.ivBack.setOnClickListener {\n            parentFragmentManager.beginTransaction()\n                .hide(this)\n                .commit()\n        }\n    }\n\n    private fun <T : ViewModel> getFragmentViewModel(modelClass: Class<T>): T {\n        if (fragmentProvider == null) {\n            fragmentProvider = ViewModelProvider(this)\n        }\n        return fragmentProvider!![modelClass]\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/MailConfVM.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\n\nimport com.pengxh.autodingding.base.BaseViewModel\nimport com.pengxh.autodingding.utils.MailSender\nimport com.pengxh.autodingding.utils.SendMailUtil\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.withContext\n\nclass MailConfVM : BaseViewModel() {\n\n    fun sendMail(fromEmail: String, fromAuth: String, toEmail: String) = launch {\n        withContext(Dispatchers.IO) {\n            MailSender().sendTextMail(\n                SendMailUtil.createMail(\n                    toEmail,\n                    \"测试邮件\",\n                    fromEmail,\n                    fromAuth\n                )\n            )\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/PermissionFragment.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.provider.Settings\nimport com.blankj.utilcode.util.IntentUtils\nimport com.pengxh.autodingding.R\nimport com.pengxh.autodingding.base.BaseVmFragment\nimport com.pengxh.autodingding.databinding.PermissionFragmentBinding\nimport com.pengxh.autodingding.service.BaseAccessibilityService\nimport com.pengxh.autodingding.utils.AccessibilityUtil\nimport com.pengxh.autodingding.utils.RomUtils\nimport com.pengxh.autodingding.utils.clickNoRepeat\n\nclass PermissionFragment : BaseVmFragment<PermissionFragmentBinding>() {\n    private lateinit var viewModel: PermissionVM\n    override fun getLayoutId() = R.layout.permission_fragment\n\n    override fun init(savedInstanceState: Bundle?) {\n        initView()\n    }\n\n    override fun initViewModel() {\n        viewModel = getFragmentViewModel(PermissionVM::class.java)\n    }\n\n    override fun initView() {\n        binding.vm = viewModel\n    }\n\n    override fun onClick() {\n        binding.ivBack.setOnClickListener {\n            parentFragmentManager.beginTransaction()\n                .hide(this)\n                .commit()\n        }\n        binding.rlAccessibility.clickNoRepeat {\n            val intent = Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)\n            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)\n            activity?.startActivity(intent)\n        }\n\n        binding.rlBgStart.clickNoRepeat {\n            activity?.startActivity(IntentUtils.getLaunchAppDetailsSettingsIntent(context?.packageName))\n        }\n    }\n\n    override fun onStart() {\n        super.onStart()\n        viewModel.bgStartEnable.set(RomUtils.isBackgroundStartAllowed(requireContext()))\n        viewModel.accessibilityEnable.set(AccessibilityUtil.isServiceOn(requireContext(),\n            BaseAccessibilityService::class.java.canonicalName?:\"\"))\n    }\n\n\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/PermissionVM.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport androidx.databinding.ObservableBoolean\nimport com.pengxh.autodingding.base.BaseViewModel\n\nclass PermissionVM : BaseViewModel() {\n    val accessibilityEnable = ObservableBoolean()\n    val bgStartEnable = ObservableBoolean()\n\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/PushFragment.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.ViewModel\nimport androidx.lifecycle.ViewModelProvider\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.databinding.FragmentPushBinding\nimport com.pengxh.autodingding.utils.clickNoRepeat\n\nopen class PushFragment : Fragment() {\n    private var fragmentProvider: ViewModelProvider? = null\n    private var binding: FragmentPushBinding? = null\n    private lateinit var pushVM: PushVM\n\n    override fun onCreateView(\n        inflater: LayoutInflater, container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        binding = FragmentPushBinding.inflate(inflater, container, false)\n        return binding!!.root\n    }\n\n    override fun onAttach(context: Context) {\n        super.onAttach(context)\n        pushVM = getFragmentViewModel(PushVM::class.java)\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        pushVM.pushResult.observe(viewLifecycleOwner){\n            if (it.errorCode == 0){\n                ToastUtils.showShort(\"指令下发成功\")\n                saveRegId()\n            }else{\n                ToastUtils.showShort(it.messageCn)\n            }\n        }\n        val savedRegId = CacheDiskUtils.getInstance().getString(\"regId\")\n        if (savedRegId != null){\n            binding!!.etTargetRegId.setText(savedRegId)\n        }\n        binding!!.ivBack.setOnClickListener {\n            parentFragmentManager.beginTransaction()\n                .hide(this)\n                .commit()\n        }\n        binding!!.btnCheck.setOnClickListener {\n            if (binding!!.etTargetRegId.text.toString() == \"\") {\n                ToastUtils.showShort(\"注册id必须填写\")\n            }else {\n                pushVM.pushCheck(binding!!.etTargetRegId.text.toString())\n            }\n        }\n        binding!!.btnPush.setOnClickListener {\n            if (binding!!.etTargetRegId.text.toString() == \"\") {\n                ToastUtils.showShort(\"注册id必须填写\")\n            }else {\n                pushVM.pushSign(binding!!.etTargetRegId.text.toString())\n            }\n        }\n        binding!!.btnStatus.setOnClickListener {\n            if (binding!!.etTargetRegId.text.toString() == \"\") {\n                ToastUtils.showShort(\"注册id必须填写\")\n            } else {\n                pushVM.pushStatusFetch(binding!!.etTargetRegId.text.toString())\n            }\n        }\n        binding!!.btnScreenShot.setOnClickListener {\n            if (binding!!.etTargetRegId.text.toString() == \"\") {\n                ToastUtils.showShort(\"注册id必须填写\")\n            } else {\n                pushVM.pushScreenShot(binding!!.etTargetRegId.text.toString())\n            }\n        }\n        binding!!.btnManualSign.clickNoRepeat(1000) {\n            if (binding!!.etTargetRegId.text.toString() == \"\") {\n                ToastUtils.showShort(\"注册id必须填写\")\n            } else {\n                pushVM.pushManualSign(binding!!.etTargetRegId.text.toString())\n            }\n        }\n\n    }\n\n    private fun <T : ViewModel> getFragmentViewModel(modelClass: Class<T>): T {\n        if (fragmentProvider == null) {\n            fragmentProvider = ViewModelProvider(this)\n        }\n        return fragmentProvider!![modelClass]\n    }\n\n    private fun saveRegId(){\n        val curRegId = binding!!.etTargetRegId.text.toString()\n        CacheDiskUtils.getInstance().put(\"regId\", curRegId)\n    }\n\n    companion object {\n        @JvmStatic\n        fun newInstance(): PushFragment {\n            return PushFragment()\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/PushVM.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport androidx.lifecycle.MutableLiveData\nimport cn.jpush.android.api.JPushInterface\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.pengxh.autodingding.base.BaseViewModel\nimport com.pengxh.autodingding.bean.BodyMsg\nimport com.pengxh.autodingding.bean.PushAudience\nimport com.pengxh.autodingding.bean.PushMessage\nimport com.pengxh.autodingding.bean.PushResp\nimport com.pengxh.autodingding.net.RetrofitManager\nimport com.pengxh.autodingding.net.api.PushApi\nimport com.pengxh.autodingding.service.PushCoreService\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.withContext\n\nclass PushVM: BaseViewModel() {\n    val pushResult = MutableLiveData<PushResp>()\n\n    fun pushCheck(regId:String) {\n        pushCmd(regId, PushCoreService.MSG_MAIL_CHECK)\n    }\n\n    fun pushSign(regId:String) {\n        pushCmd(regId, PushCoreService.MSG_SIGN)\n    }\n\n    fun pushStatusFetch(regId: String){\n        pushCmd(regId, PushCoreService.MSG_STATUS_REPORT)\n    }\n\n    fun pushScreenShot(regId: String){\n        pushCmd(regId, PushCoreService.MSG_SCREEN_SHOT)\n    }\n\n    fun pushManualSign(regId: String){\n        pushCmd(regId, PushCoreService.MSG_MANUAL_SIGN)\n    }\n\n    private fun pushCmd(regId: String, cmd: String) = launch {\n        pushResult.value = withContext(Dispatchers.IO){\n            val api = RetrofitManager.retrofitClient.create(PushApi::class.java)\n            val pushMessage = PushMessage()\n            pushMessage.audience = PushAudience().apply {\n                registration_id = mutableListOf(regId)\n            }\n            pushMessage.message = BodyMsg().apply {\n                msg_content = cmd\n                title = CacheDiskUtils.getInstance().getString(\"pushRegId\")\n            }\n            api.pushMsg(pushMessage)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/RemoteSignFragment.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport com.pengxh.autodingding.AndroidxBaseFragment\nimport com.pengxh.autodingding.databinding.FragmentRemoteSignBinding\n\nclass RemoteSignFragment: AndroidxBaseFragment<FragmentRemoteSignBinding>() {\n    override fun setupTopBarLayout() {\n\n    }\n\n    override fun initData() {\n        // check if is master or slave first, then lis\n    }\n\n    override fun initEvent() {\n        TODO(\"Not yet implemented\")\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/ui/fragment/SettingsFragment.kt",
    "content": "package com.pengxh.autodingding.ui.fragment\n\nimport android.content.*\nimport android.content.pm.PackageManager\nimport android.provider.Settings\nimport android.view.View\nimport androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult\nimport androidx.core.app.NotificationManagerCompat\nimport cn.jpush.android.api.JPushInterface\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.blankj.utilcode.util.IntentUtils\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.AndroidxBaseFragment\nimport com.pengxh.autodingding.BaseApplication.Companion.daoSession\nimport com.pengxh.autodingding.BuildConfig\nimport com.pengxh.autodingding.R\nimport com.pengxh.autodingding.actions.DingSignAction\nimport com.pengxh.autodingding.databinding.FragmentSettingsBinding\nimport com.pengxh.autodingding.service.NotificationMonitorService\nimport com.pengxh.autodingding.ui.HistoryRecordActivity\nimport com.pengxh.autodingding.ui.fragment.PushFragment.Companion.newInstance\nimport com.pengxh.autodingding.utils.Constant\nimport com.pengxh.autodingding.utils.Utils\nimport com.pengxh.autodingding.utils.launchWithExpHandler\nimport com.pengxh.autodingding.utils.toast\nimport kotlinx.coroutines.DelicateCoroutinesApi\nimport kotlinx.coroutines.Job\n\nclass SettingsFragment : AndroidxBaseFragment<FragmentSettingsBinding?>(), View.OnClickListener {\n    private var actionJob: Job? = null\n\n    override fun initData() {\n        val historyBeanDao = daoSession!!.historyRecordBeanDao\n        val emailAddress = Utils.readEmailAddress()\n        if (emailAddress != \"\") {\n            viewBinding!!.emailTextView.text = emailAddress\n        }\n        viewBinding!!.recordSize.text = historyBeanDao.loadAll().size.toString()\n        viewBinding!!.appVersion.text = BuildConfig.VERSION_NAME\n        val savedRegId = CacheDiskUtils.getInstance().getString(\"regId\")\n        if (savedRegId != null) viewBinding!!.pushTextView.text = savedRegId\n    }\n\n    private val settingsLauncher =\n        registerForActivityResult(StartActivityForResult()) {\n            if (isNotificationEnable) {\n                startNotificationMonitorService()\n            }\n        }\n\n    //检测通知监听服务是否被授权\n    private val isNotificationEnable: Boolean\n        get() {\n            val packageNames =\n                NotificationManagerCompat.getEnabledListenerPackages(requireContext())\n            return packageNames.contains(context?.packageName)\n        }\n\n    override fun initEvent() {\n        if (!isNotificationEnable) {\n            try {\n                //打开通知监听设置页面\n                val intent = Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS)\n                settingsLauncher.launch(intent)\n            } catch (e: Exception) {\n                e.printStackTrace()\n            }\n        } else {\n            startNotificationMonitorService()\n        }\n        viewBinding!!.tvRegValue.text = JPushInterface.getRegistrationID(context)\n        viewBinding!!.btnCopy.setOnClickListener(this)\n        viewBinding!!.btnTestLaunchDing.setOnClickListener(this)\n        viewBinding!!.emailLayout.setOnClickListener(this)\n        viewBinding!!.historyLayout.setOnClickListener(this)\n        viewBinding!!.introduceLayout.setOnClickListener(this)\n        viewBinding!!.pushLayout.setOnClickListener(this)\n        viewBinding!!.testLayout.setOnClickListener(this)\n        viewBinding!!.rlVersion.setOnClickListener(this)\n        viewBinding!!.permissionLayout.setOnClickListener(this)\n    }\n\n    //切换通知监听器服务\n    private fun startNotificationMonitorService() {\n        //创建常住通知栏\n        Utils.createNotification()\n        val pm = requireContext().packageManager\n        pm.setComponentEnabledSetting(\n            ComponentName(requireContext(), NotificationMonitorService::class.java),\n            PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP\n        )\n        pm.setComponentEnabledSetting(\n            ComponentName(requireContext(), NotificationMonitorService::class.java),\n            PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP\n        )\n        viewBinding!!.noticeCheckBox.isChecked = isNotificationEnable\n    }\n\n    @OptIn(DelicateCoroutinesApi::class)\n    override fun onClick(v: View) {\n        when (v.id) {\n            R.id.emailLayout -> {\n                parentFragmentManager\n                    .beginTransaction()\n                    .add(R.id.fragmentContainer, MailConfFragment())\n                    .commit()\n            }\n            R.id.historyLayout -> {\n                startActivity(Intent(context, HistoryRecordActivity::class.java))\n            }\n            R.id.introduceLayout -> {\n                Utils.showAlertDialog(\n                    activity,\n                    \"功能介绍\",\n                    context?.getString(R.string.about),\n                    \"看完了\",\n                    true\n                )\n            }\n            R.id.btnCopy -> {\n                val clipboardManager = context\n                    ?.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager\n                clipboardManager.setPrimaryClip(\n                    ClipData.newPlainText(\n                        null,\n                        JPushInterface.getRegistrationID(context)\n                    )\n                )\n                ToastUtils.showShort(\"已复制\")\n            }\n            R.id.btnTestLaunchDing -> {\n                activity?.startActivity(IntentUtils.getLaunchAppIntent(Constant.DINGDING))\n            }\n            R.id.pushLayout -> {\n                parentFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.fragmentContainer, newInstance())\n                    .commit()\n            }\n            R.id.rlVersion -> {\n                // undone\n            }\n            R.id.testLayout -> {\n                val action = DingSignAction()\n                if (actionJob?.isCompleted.let { it != null && !it }) {\n                    toast(\"有正在运行的任务\")\n                    return\n                }\n                actionJob = launchWithExpHandler {\n                    activity?.let { action.run(it) }\n                }\n                actionJob?.invokeOnCompletion {\n                    Utils.showAlertDialog(activity, \"执行日志\", action.message.toString(),\n                        \"确定\", true)\n                }\n            }\n            R.id.permissionLayout -> {\n                parentFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.fragmentContainer, PermissionFragment())\n                    .commit()\n            }\n        }\n    }\n\n    override fun setupTopBarLayout() {\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/AccessibilityUtil.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.content.Context\nimport android.provider.Settings\nimport android.text.TextUtils.SimpleStringSplitter\nimport android.util.Log\nimport android.view.accessibility.AccessibilityManager\n\n\nobject AccessibilityUtil {\n    fun isServiceOn(context: Context, serviceName: String): Boolean{\n        val am = context.getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager\n        if (am.isEnabled){\n            val fullAccName = \"${context.packageName}/${serviceName}\"\n            return isAccessibilitySettingsOn(context, fullAccName)\n        }\n        return false\n    }\n\n    private fun isAccessibilitySettingsOn(context: Context, service: String): Boolean {\n        Log.d(\"param service name\", service)\n        val mStringColonSplitter = SimpleStringSplitter(':')\n        val settingValue: String = Settings.Secure.getString(\n            context.applicationContext.contentResolver,\n            Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES\n        )\n        mStringColonSplitter.setString(settingValue)\n        while (mStringColonSplitter.hasNext()) {\n            val accessibilityService = mStringColonSplitter.next()\n            Log.d(\"accessibility services\", accessibilityService)\n            if (accessibilityService.equals(service, ignoreCase = true)) {\n                return true\n            }\n        }\n        return false\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/Constant.java",
    "content": "package com.pengxh.autodingding.utils;\n\nimport android.Manifest;\n\nimport com.pengxh.autodingding.R;\n\n\npublic class Constant {\n    public static final int PERMISSIONS_CODE = 999;\n    public static final String[] USER_PERMISSIONS = {Manifest.permission.WRITE_EXTERNAL_STORAGE,\n            Manifest.permission.READ_EXTERNAL_STORAGE};\n\n    //钉钉包名：com.alibaba.android.rimet\n    //打卡页面类名：com.alibaba.lightapp.runtime.activity.CommonWebViewActivity\n    public static final String DINGDING = \"com.alibaba.android.rimet\";\n\n    public static final int[] images = {R.mipmap.delete, R.mipmap.output};\n\n    public static final long ONE_WEEK = 5 * 24 * 60 * 60 * 1000L;\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/EmailAuthenticator.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport javax.mail.Authenticator\nimport javax.mail.PasswordAuthentication\n\nclass EmailAuthenticator(private val userName: String, private val password: String) :\n    Authenticator() {\n    override fun getPasswordAuthentication(): PasswordAuthentication {\n        return PasswordAuthentication(userName, password)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/ExcelUtils.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.util.Log\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.bean.HistoryRecordBean\nimport com.pengxh.autodingding.utils.SendMailUtil.sendAttachFileEmail\nimport jxl.Workbook\nimport jxl.WorkbookSettings\nimport jxl.format.Alignment\nimport jxl.format.Border\nimport jxl.format.BorderLineStyle\nimport jxl.format.Colour\nimport jxl.write.*\nimport java.io.File\nimport java.io.FileInputStream\nimport java.io.IOException\nimport java.io.InputStream\n\nobject ExcelUtils {\n    private const val TAG = \"ExcelUtils\"\n    private var arial14format: WritableCellFormat? = null\n    private var arial10format: WritableCellFormat? = null\n    private var arial12format: WritableCellFormat? = null\n    private const val UTF8_ENCODING = \"UTF-8\"\n\n    /**\n     * 初始化Excel\n     *\n     * @param fileName\n     * @param colName\n     */\n    fun initExcel(fileName: String?, colName: Array<String?>) {\n        format()\n        var workbook: WritableWorkbook? = null\n        try {\n            val file = File(fileName)\n            if (!file.exists()) {\n                file.createNewFile()\n            }\n            workbook = Workbook.createWorkbook(file)\n            val sheet = workbook.createSheet(\"打卡记录表\", 0)\n            //创建标题栏\n            sheet.addCell(Label(0, 0, fileName, arial14format))\n            for (col in colName.indices) {\n                sheet.addCell(Label(col, 0, colName[col], arial10format))\n            }\n            sheet.setRowView(0, 340) //设置行高\n            workbook.write()\n        } catch (e: Exception) {\n            e.printStackTrace()\n        } finally {\n            if (workbook != null) {\n                try {\n                    workbook.close()\n                } catch (e: Exception) {\n                    e.printStackTrace()\n                }\n            }\n        }\n    }\n\n    /**\n     * 单元格的格式设置 字体大小 颜色 对齐方式、背景颜色等...\n     */\n    private fun format() {\n        try {\n            val arial14font = WritableFont(WritableFont.ARIAL, 14, WritableFont.BOLD)\n            arial14font.colour = Colour.LIGHT_BLUE\n            arial14format = WritableCellFormat(arial14font)\n            arial14format!!.alignment = Alignment.CENTRE\n            arial14format!!.setBorder(Border.ALL, BorderLineStyle.THIN)\n            arial14format!!.setBackground(Colour.VERY_LIGHT_YELLOW)\n            arial10format =\n                WritableCellFormat(WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD))\n            arial10format!!.alignment = Alignment.CENTRE\n            arial10format!!.setBorder(Border.ALL, BorderLineStyle.THIN)\n            arial10format!!.setBackground(Colour.GRAY_25)\n            arial12format = WritableCellFormat(WritableFont(WritableFont.ARIAL, 10))\n            arial10format!!.alignment = Alignment.CENTRE //对齐格式\n            arial12format!!.setBorder(Border.ALL, BorderLineStyle.THIN) //设置边框\n        } catch (e: WriteException) {\n            e.printStackTrace()\n        }\n    }\n\n    fun writeObjListToExcel(objList: List<HistoryRecordBean>?, fileName: String?) {\n        if (objList != null && objList.size > 0) {\n            var writebook: WritableWorkbook? = null\n            var `in`: InputStream? = null\n            try {\n                val setEncode = WorkbookSettings()\n                setEncode.encoding = UTF8_ENCODING\n                `in` = FileInputStream(File(fileName))\n                val workbook = Workbook.getWorkbook(`in`)\n                writebook = Workbook.createWorkbook(File(fileName), workbook)\n                val sheet = writebook.getSheet(0)\n                for (j in objList.indices) {\n                    val historyBean = objList[j]\n                    val uuid = historyBean.uuid\n                    val date = historyBean.date\n                    val message = historyBean.message\n                    //第一行留作表头\n                    sheet.addCell(Label(0, j + 1, uuid, arial12format))\n                    sheet.addCell(Label(1, j + 1, date, arial12format))\n                    sheet.addCell(Label(2, j + 1, message, arial12format))\n                    sheet.setRowView(j + 1, 350) //设置行高\n                }\n                writebook.write()\n                Log.d(TAG, \"writeObjListToExcel: 导出表格到本地成功\")\n                //然后发送邮件到指定邮箱\n                val emailAddress = Utils.readEmailAddress()\n                if (emailAddress == \"\") {\n                    ToastUtils.showLong(\"邮箱未填写，无法导出\")\n                    return\n                }\n                sendAttachFileEmail(emailAddress, fileName)\n            } catch (e: Exception) {\n                e.printStackTrace()\n            } finally {\n                if (writebook != null) {\n                    try {\n                        writebook.close()\n                    } catch (e: Exception) {\n                        e.printStackTrace()\n                    }\n                }\n                if (`in` != null) {\n                    try {\n                        `in`.close()\n                    } catch (e: IOException) {\n                        e.printStackTrace()\n                    }\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/KtUtils.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.os.Handler\nimport android.os.Looper\nimport android.widget.Toast\nimport com.pengxh.autodingding.BaseApplication\nimport kotlinx.coroutines.*\nimport kotlin.coroutines.CoroutineContext\nimport kotlin.coroutines.EmptyCoroutineContext\n\n\n\n@DelicateCoroutinesApi\nfun launchWithExpHandler(\n    context: CoroutineContext = EmptyCoroutineContext,\n    start: CoroutineStart = CoroutineStart.DEFAULT,\n    block: suspend CoroutineScope.() -> Unit\n) = GlobalScope.launch(context + ExceptionHandler, start, block)\n\n\nval ExceptionHandler by lazy {\n    CoroutineExceptionHandler { _, throwable ->\n        toast(throwable.message ?: \"$throwable\")\n        throwable.printStackTrace()\n    }\n}\n\nval mainHandler by lazy {\n    Handler(Looper.getMainLooper())\n}\n\nfun runOnUi(block: () -> Unit) {\n    if (Looper.getMainLooper() == Looper.myLooper()) {\n        block()\n    } else {\n        mainHandler.post(block)\n    }\n}\n\n\nfun toast(m: String) =\n    runOnUi {\n        Toast.makeText(BaseApplication.application, m, Toast.LENGTH_SHORT).show()\n    }\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/MailSender.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.util.Log\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.bean.MailInfo\nimport java.util.*\nimport javax.activation.DataHandler\nimport javax.activation.DataSource\nimport javax.activation.FileDataSource\nimport javax.mail.*\nimport javax.mail.internet.*\n\nclass MailSender {\n    /**\n     * 以文本格式发送邮件\n     * @param mailInfo 待发送的邮件的信息\n     */\n    @Throws(MessagingException::class)\n    fun sendTextMail(mailInfo: MailInfo) {\n        // 判断是否需要身份认证\n        var authenticator: EmailAuthenticator? = null\n        val pro = mailInfo.properties\n        if (mailInfo.isValidate) {\n            // 如果需要身份认证，则创建一个密码验证器\n            authenticator = EmailAuthenticator(mailInfo.userName ?: \"\", mailInfo.password ?: \"\")\n        }\n        // 根据邮件会话属性和密码验证器构造一个发送邮件的session\n        val sendMailSession = Session.getInstance(pro, authenticator)\n\n        // 根据session创建一个邮件消息\n        val mailMessage: Message = MimeMessage(sendMailSession)\n        // 创建邮件发送者地址\n        val from: Address = InternetAddress(mailInfo.fromAddress)\n        // 设置邮件消息的发送者\n        mailMessage.setFrom(from)\n        // 创建邮件的接收者地址，并设置到邮件消息中\n        val to: Address = InternetAddress(mailInfo.toAddress)\n        mailMessage.setRecipient(Message.RecipientType.TO, to)\n        // 设置邮件消息的主题\n        val mailSubject = mailInfo.subject\n        mailMessage.subject = mailSubject\n        // 设置邮件消息发送的时间\n        mailMessage.sentDate = Date()\n        // 设置邮件消息的主要内容\n        val mailContent = mailInfo.content\n        mailMessage.setText(mailContent)\n        // 发送邮件\n        Transport.send(mailMessage)\n    }\n\n    // 发送带附件的邮件\n    fun sendAccessoryMail(mailInfo: MailInfo): Boolean {\n        Log.d(\"MailSender\", \"sendAccessoryMail: 发送带附件的邮件\")\n        // 判断是否需要身份验证\n        var authenticator: EmailAuthenticator? = null\n        val p = mailInfo.properties\n        // 如果需要身份验证，则创建一个密码验证器\n        if (mailInfo.isValidate) {\n            authenticator = EmailAuthenticator(mailInfo.userName ?: \"\", mailInfo.password ?: \"\")\n        }\n        // 根据邮件会话属性和密码验证器构造一个发送邮件的session\n        val sendMailSession = Session.getInstance(p, authenticator)\n        try {\n            // 根据session创建一个邮件消息\n            val mailMessage: Message = MimeMessage(sendMailSession)\n            // 创建邮件发送者的地址\n            val fromAddress: Address = InternetAddress(mailInfo.fromAddress)\n            // 设置邮件消息的发送者\n            mailMessage.setFrom(fromAddress)\n            // 创建邮件接收者的地址\n            val toAddress: Address = InternetAddress(mailInfo.toAddress)\n            // 设置邮件消息的接收者\n            mailMessage.setRecipient(Message.RecipientType.TO, toAddress)\n            // 设置邮件消息的主题\n            mailMessage.subject = mailInfo.subject\n            // 设置邮件消息的发送时间\n            mailMessage.sentDate = Date()\n            // MimeMultipart类是一个容器类，包含MimeBodyPart类型的对象\n            val mainPart: Multipart = MimeMultipart()\n            val file = mailInfo.attachFile!!\n            if (!file.exists()) {\n                ToastUtils.showShort(\"需要导出的表格不存在，请重试\")\n                return false\n            } else {\n                // 创建一个MimeBodyPart来包含附件\n                val bodyPart: BodyPart = MimeBodyPart()\n                val source: DataSource = FileDataSource(file)\n                bodyPart.dataHandler = DataHandler(source)\n                bodyPart.fileName = MimeUtility.encodeWord(file.name)\n                mainPart.addBodyPart(bodyPart)\n            }\n            // 将MimeMultipart对象设置为邮件内容\n            mailMessage.setContent(mainPart)\n            // 发送邮件\n            Transport.send(mailMessage)\n            return true\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return false\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/Param.java",
    "content": "package com.pengxh.autodingding.utils;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * des 参数解析注解\n */\n@Target(ElementType.FIELD)\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface Param {\n    String value() default \"\";\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/ParamUtil.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.app.Activity\nimport android.os.Bundle\nimport android.os.Parcelable\nimport android.text.TextUtils\nimport androidx.fragment.app.Fragment\n\n/**\n * 页面跳转传参 注解+反射获取页面入参\n */\nobject ParamUtil {\n    /**\n     * Fragment\n     */\n    fun initParam(fragment: Fragment) {\n        val javaClass = fragment.javaClass\n        fragment.arguments?.apply {\n            setParam(fragment, this)\n        }\n    }\n\n    /**\n     * Activity\n     */\n    fun initParam(activity: Activity) {\n        activity.intent.extras?.apply {\n            setParam(activity, this)\n        }\n    }\n\n    private fun setParam(obj: Any, intent: Bundle) {\n        val javaClass = obj.javaClass\n        val fields = javaClass.declaredFields\n        for (item in fields) {\n            if (item.isAnnotationPresent(Param::class.java)) {\n                item.getAnnotation(Param::class.java)?.let {\n                    val key: String = if (TextUtils.isEmpty(it.value)) item.name else it.value\n                    if (intent.containsKey(key)) {\n                        val type = item.type\n                        when (type) {\n                            Boolean::class.javaPrimitiveType -> {\n                                intent.getBoolean(key, false)\n                            }\n                            Int::class.javaPrimitiveType -> {\n                                intent.getInt(key, 0)\n                            }\n                            Long::class.javaPrimitiveType -> {\n                                intent.getLong(key, 0L)\n                            }\n                            String::class.java -> {\n                                intent.getString(key)\n                            }\n                            Double::class.javaPrimitiveType -> {\n                                intent.getDouble(key, 0.0)\n                            }\n                            Byte::class.javaPrimitiveType -> {\n                                intent.getByte(key, \"\".toByte())\n                            }\n                            Char::class.javaPrimitiveType -> {\n                                intent.getChar(key, '\\u0000')\n                            }\n                            Float::class.javaPrimitiveType -> {\n                                intent.getFloat(key, 0f)\n                            }\n                            else -> {\n                                if((type as Class).interfaces.asList().contains(Parcelable::class.java)){\n                                    intent.getParcelable<Parcelable>(key)\n                                }else{\n                                    intent.getSerializable(key)\n                                }\n                            }\n                        }?.apply {\n                            item.isAccessible = true\n                            try {\n                                item[obj] = this\n                            } catch (e: IllegalAccessException) {\n                                e.printStackTrace()\n                            }\n                            item.isAccessible = false\n                        }\n                    }\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/RomUtils.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.annotation.SuppressLint\nimport android.app.AppOpsManager\nimport android.content.Context\nimport android.net.Uri\nimport android.os.Build\nimport android.provider.Settings\nimport java.lang.reflect.Method\n\nobject RomUtils {\n    private val TAG = RomUtils::class.java.simpleName\n\n    private fun isXiaoMi(): Boolean {\n        return checkManufacturer(\"xiaomi\")\n    }\n\n    private fun isOppo(): Boolean {\n        return checkManufacturer(\"oppo\")\n    }\n\n    private fun isVivo(): Boolean {\n        return checkManufacturer(\"vivo\")\n    }\n\n    private fun checkManufacturer(manufacturer: String): Boolean {\n        return manufacturer.equals(Build.MANUFACTURER, true)\n    }\n\n    fun isBackgroundStartAllowed(context: Context): Boolean {\n        if (isXiaoMi()) {\n            return isXiaomiBgStartPermissionAllowed(context)\n        }\n\n        if (isVivo()) {\n            return isVivoBgStartPermissionAllowed(context)\n        }\n\n        if (isOppo() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n            return Settings.canDrawOverlays(context)\n        }\n        return true\n    }\n\n\n    private fun isXiaomiBgStartPermissionAllowed(context: Context): Boolean {\n        val ops = context.getSystemService(Context.APP_OPS_SERVICE) as AppOpsManager\n        try {\n            val op = 10021\n            val method: Method = ops.javaClass.getMethod(\"checkOpNoThrow\", Int::class.javaPrimitiveType, Int::class.javaPrimitiveType, String::class.java)\n            val result = method.invoke(ops, op, android.os.Process.myUid(), context.packageName) as Int\n            return result == AppOpsManager.MODE_ALLOWED\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return false\n    }\n\n    private fun isVivoBgStartPermissionAllowed(context: Context): Boolean {\n        return getVivoBgStartPermissionStatus(context) == 0\n    }\n\n    /**\n     * 判断Vivo后台弹出界面状态， 1无权限，0有权限\n     * @param context context\n     */\n    @SuppressLint(\"Range\")\n    private fun getVivoBgStartPermissionStatus(context: Context): Int {\n        val uri: Uri = Uri.parse(\"content://com.vivo.permissionmanager.provider.permission/start_bg_activity\")\n        val selection = \"pkgname = ?\"\n        val selectionArgs = arrayOf(context.packageName)\n        var state = 1\n        try {\n            context.contentResolver.query(uri, null, selection, selectionArgs, null)?.use {\n                if (it.moveToFirst()) {\n                    state = it.getInt(it.getColumnIndex(\"currentstate\"))\n                }\n            }\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return state\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/SendMailUtil.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport com.blankj.utilcode.util.CacheDiskUtils\nimport com.blankj.utilcode.util.ToastUtils\nimport com.pengxh.autodingding.bean.MailInfo\nimport java.io.File\n\nobject SendMailUtil {\n    fun send(\n        toAddress: String?, emailMessage: String\n    ) {\n        Thread {\n            MailSender().sendTextMail(\n                createMail(\n                    toAddress,\n                    emailMessage,\n                    CacheDiskUtils.getInstance().getString(\"senderEmail\", \"lttclaw@qq.com\"),\n                    CacheDiskUtils.getInstance().getString(\"senderAuth\", \"hwpzapzrkmgpgaba\")\n                )\n            )\n        }\n            .start()\n    }\n\n    @JvmStatic\n    fun sendAttachFileEmail(toAddress: String, filePath: String?) {\n        val file = File(filePath)\n        if (!file.exists()) {\n            ToastUtils.showLong(\"打卡记录不存在，请检查\")\n            return\n        }\n        Thread {\n            val isSendSuccess = MailSender().sendAccessoryMail(\n                createAttachMail(\n                    toAddress,\n                    file\n                )\n            )\n        }.start()\n    }\n\n    fun createMail(\n        toAddress: String?,\n        emailMessage: String,\n        senderEmail: String = \"lttclaw@qq.com\",\n        senderAuth: String = \"hwpzapzrkmgpgaba\"\n    ): MailInfo {\n        val mailInfo = MailInfo()\n        mailInfo.mailServerHost = \"smtp.qq.com\" //发送方邮箱服务器\n        mailInfo.mailServerPort = \"465\" //发送方邮箱端口号\n        mailInfo.isValidate = true\n        mailInfo.userName = senderEmail // 发送者邮箱地址\n        mailInfo.password = senderAuth //邮箱授权码，不是密码\n        mailInfo.toAddress = toAddress // 接收者邮箱\n        mailInfo.fromAddress = senderEmail // 发送者邮箱\n        mailInfo.subject = \"自动打卡通知\" // 邮件主题\n        if (emailMessage == \"\") {\n            mailInfo.content =\n                \"未监听到打卡成功的通知，请手动登录检查\" + TimeOrDateUtil.timestampToDate(System.currentTimeMillis()) // 邮件文本\n        } else {\n            mailInfo.content = emailMessage // 邮件文本\n        }\n        return mailInfo\n    }\n\n    fun createAttachMail(\n        toAddress: String,\n        file: File,\n        senderEmail: String = \"lttclaw@qq.com\",\n        senderAuth: String = \"hwpzapzrkmgpgaba\"\n    ): MailInfo {\n        val mailInfo = MailInfo()\n        mailInfo.mailServerHost = \"smtp.qq.com\" //发送方邮箱服务器\n        mailInfo.mailServerPort = \"465\" //发送方邮箱端口号\n        mailInfo.isValidate = true\n        mailInfo.userName = senderEmail // 发送者邮箱地址\n        mailInfo.password = senderAuth //邮箱授权码，不是密码\n        mailInfo.toAddress = toAddress // 接收者邮箱\n        mailInfo.fromAddress = senderEmail // 发送者邮箱\n        mailInfo.subject = \"打卡记录\" // 邮件主题\n        mailInfo.attachFile = file\n        return mailInfo\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/StatusBarColorUtil.java",
    "content": "package com.pengxh.autodingding.utils;\n\nimport android.app.Activity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.WindowManager;\nimport android.widget.LinearLayout;\n\npublic class StatusBarColorUtil {\n    public static void setColor(Activity activity, int color) {\n        //限制android系统的版本\n        // 设置状态栏透明\n        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);\n        // 生成一个状态栏大小的矩形\n        View statusView = createStatusView(activity, color);\n        // 添加 statusView 到布局中\n        ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();\n        decorView.addView(statusView);\n        // 设置根布局的参数\n        ViewGroup rootView = (ViewGroup) ((ViewGroup) activity.findViewById(android.R.id.content)).getChildAt(0);\n        rootView.setFitsSystemWindows(true);\n        rootView.setClipToPadding(true);\n    }\n\n    /**\n     * 生成一个和状态栏大小相同的矩形条\n     *\n     * @param activity 需要设置的activity\n     * @param color    状态栏颜色值\n     * @return 状态栏矩形条\n     */\n    private static View createStatusView(Activity activity, int color) {\n        // 获得状态栏高度\n        int resourceId = activity.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n        int statusBarHeight = activity.getResources().getDimensionPixelSize(resourceId);\n        // 绘制一个和状态栏一样高的矩形\n        View statusView = new View(activity);\n        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, statusBarHeight);\n        statusView.setLayoutParams(params);\n        statusView.setBackgroundColor(color);\n        return statusView;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/TimeOrDateUtil.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport com.blankj.utilcode.util.ToastUtils\nimport java.text.SimpleDateFormat\nimport java.util.*\n\nobject TimeOrDateUtil {\n    private var dateFormat: SimpleDateFormat? = null\n\n    /**\n     * 时间戳转日期\n     */\n    fun rTimestampToDate(millSeconds: Long): String {\n        dateFormat = SimpleDateFormat(\"yyyy-MM-dd\", Locale.CHINA)\n        return dateFormat!!.format(Date(millSeconds))\n    }\n\n    /**\n     * 时间戳转时间\n     */\n    fun timestampToTime(millSeconds: Long): String {\n        dateFormat = SimpleDateFormat(\"HH:mm:ss\", Locale.CHINA)\n        return dateFormat!!.format(Date(millSeconds))\n    }\n\n    /**\n     * 时间戳转详细日期时间\n     */\n    fun timestampToDate(millSeconds: Long): String {\n        dateFormat = SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.CHINA)\n        return dateFormat!!.format(Date(millSeconds))\n    }\n\n    /**\n     * 计算时间差\n     *\n     * @param fixedTime 结束时间\n     */\n    fun deltaTime(fixedTime: Long): Long {\n        val currentTime = System.currentTimeMillis() / 1000\n        if (fixedTime > currentTime) {\n            return fixedTime - currentTime\n        } else {\n            ToastUtils.showLong(\"时间设置异常\")\n        }\n        return 0L\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/Utils.java",
    "content": "package com.pengxh.autodingding.utils;\n\nimport android.annotation.SuppressLint;\nimport android.app.Activity;\nimport android.app.KeyguardManager;\nimport android.app.Notification;\nimport android.app.NotificationChannel;\nimport android.app.NotificationManager;\nimport android.content.ComponentName;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.pm.PackageInfo;\nimport android.content.pm.PackageManager;\nimport android.content.pm.ResolveInfo;\nimport android.os.Build;\nimport android.os.CountDownTimer;\nimport android.os.Environment;\nimport android.os.PowerManager;\nimport android.util.Log;\n\nimport androidx.appcompat.app.AlertDialog;\n\nimport com.blankj.utilcode.util.ActivityUtils;\nimport com.pengxh.autodingding.R;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.util.ArrayList;\nimport java.util.List;\n\n\npublic class Utils {\n    private static final String TAG = \"Utils\";\n    private static final String fileName = \"emailAddress.txt\";\n    @SuppressLint(\"StaticFieldLeak\")\n    private static Context mContext;\n    private static NotificationManager notificationManager;\n\n    public static void init(Context context) {\n        Utils.mContext = context.getApplicationContext();//获取全局上下文，最长生命周期\n        File filePath = context.getExternalFilesDir(\"setting\");\n        File file = new File(filePath, fileName);\n        if (!file.exists()) {\n            try {\n                file.createNewFile();\n            } catch (IOException e) {\n                e.printStackTrace();\n            }\n        }\n        notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);\n        Log.d(TAG, \"init: \" + file);\n    }\n\n    /**\n     * 检查手机上是否安装了指定的软件\n     *\n     * @param packageName 应用包名\n     */\n    public static boolean isAppAvailable(String packageName) {\n        PackageManager packageManager = mContext.getPackageManager();\n        //获取所有已安装程序的包信息\n        List<PackageInfo> packageInfos = packageManager.getInstalledPackages(0);\n        List<String> packageNames = new ArrayList<>();\n        for (int i = 0; i < packageInfos.size(); i++) {\n            String packName = packageInfos.get(i).packageName;\n            packageNames.add(packName);\n        }\n        return packageNames.contains(packageName);\n    }\n\n    public static void createNotification() {\n        //Android8.0以上必须添加 渠道 才能显示通知栏\n        Notification.Builder builder;\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n            //创建渠道\n            String name = mContext.getResources().getString(R.string.app_name);\n            String id = name + \"_DefaultChannel\";\n            NotificationChannel mChannel = new NotificationChannel(id, name, NotificationManager.IMPORTANCE_DEFAULT);\n            notificationManager.createNotificationChannel(mChannel);\n            builder = new Notification.Builder(mContext, id);\n        } else {\n            builder = new Notification.Builder(mContext);\n        }\n        builder.setContentTitle(\"钉钉打卡通知监听已打开\")\n                .setContentText(\"如果通知消失，请重新开启应用\")\n                .setSmallIcon(R.mipmap.logo_round)\n                .setAutoCancel(false);\n        Notification notification = builder.build();\n        notification.flags = Notification.FLAG_NO_CLEAR;\n        notificationManager.notify(111, notification);\n    }\n\n    /**\n     * 打开指定包名的apk\n     *\n     * @param packageName 应用包名\n     */\n\n    public static void openDingDing(String packageName) {\n        wakeUpAndUnlock();\n        Log.d(TAG, \"openDingDing: 已亮屏，1s后启动钉钉\");\n        new CountDownTimer(1000, 1000) {\n            @Override\n            public void onTick(long millisUntilFinished) {\n\n            }\n\n            @Override\n            public void onFinish() {\n                startPackageLauncherIntent(packageName);\n            }\n        }.start();\n    }\n\n    public static void startPackageLauncherIntent(String packageName) {\n        PackageManager packageManager = mContext.getPackageManager();\n        Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null);\n        resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER);\n        resolveIntent.setPackage(packageName);\n        List<ResolveInfo> apps = packageManager.queryIntentActivities(resolveIntent, 0);\n        ResolveInfo resolveInfo = apps.iterator().next();\n        if (resolveInfo != null) {\n            String className = resolveInfo.activityInfo.name;\n            Intent intent = new Intent(Intent.ACTION_MAIN);\n            intent.addCategory(Intent.CATEGORY_LAUNCHER);\n            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n            ComponentName cn = new ComponentName(packageName, className);\n            intent.setComponent(cn);\n            mContext.startActivity(intent);\n        }\n    }\n\n    /**\n     * 唤醒屏幕并解锁\n     */\n    public static void wakeUpAndUnlock() {\n        Log.d(TAG, \"wakeUpAndUnlock: 亮屏解锁\");\n        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);\n        boolean screenOn = powerManager.isInteractive();\n        if (!screenOn) {\n            //唤醒屏幕\n            PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.ACQUIRE_CAUSES_WAKEUP\n                    | PowerManager.SCREEN_BRIGHT_WAKE_LOCK, \"autoDing:bright\");\n            wakeLock.acquire(10000);\n            wakeLock.release();\n        }\n        //解锁屏幕\n        KeyguardManager keyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n            keyguardManager.requestDismissKeyguard(ActivityUtils.getTopActivity(), new KeyguardManager.KeyguardDismissCallback() {\n                @Override\n                public void onDismissError() {\n                    super.onDismissError();\n                }\n            });\n        }else {\n            KeyguardManager.KeyguardLock keyguardLock = keyguardManager.newKeyguardLock(\"unLock\");\n            keyguardLock.disableKeyguard();\n        }\n    }\n\n    /**\n     * 将数据写入文件\n     */\n    public static void saveEmailAddress(String email) {\n        //准备写入\n        FileOutputStream outputStream;\n        BufferedWriter bufferedWriter = null;\n        try {\n            outputStream = mContext.openFileOutput(fileName, Context.MODE_PRIVATE);\n            bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream));\n            bufferedWriter.write(email);\n        } catch (IOException e) {\n            e.printStackTrace();\n        } finally {\n            if (bufferedWriter != null) {\n                try {\n                    bufferedWriter.close();\n                } catch (IOException e) {\n                    e.printStackTrace();\n                }\n            }\n        }\n    }\n\n    /**\n     * 读取文件存储内容\n     */\n    public static String readEmailAddress() {\n        FileInputStream inputStream;\n        BufferedReader bufferedReader = null;\n        StringBuilder content = new StringBuilder();\n        try {\n            inputStream = mContext.openFileInput(fileName);\n            bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\n            String line;\n            while ((line = bufferedReader.readLine()) != null) {\n                content.append(line);\n            }\n        } catch (IOException e) {\n            e.printStackTrace();\n        } finally {\n            if (bufferedReader != null) {\n                try {\n                    bufferedReader.close();\n                } catch (IOException e) {\n                    e.printStackTrace();\n                }\n            }\n        }\n        return content.toString();\n    }\n\n    public static void showAlertDialog(Activity activity, String title, String message, String positiveButton, boolean cancelable) {\n        createBuilder(activity, title, message)\n                .setCancelable(cancelable)\n                .setPositiveButton(positiveButton, null)\n                .create()\n                .show();\n    }\n\n    private static AlertDialog.Builder createBuilder(Activity activity, String title, String message) {\n        return new AlertDialog.Builder(activity)\n                .setIcon(R.mipmap.logo)\n                .setTitle(title)\n                .setMessage(message);\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/utils/ViewExt.kt",
    "content": "package com.pengxh.autodingding.utils\n\nimport android.content.ClipData\nimport android.content.ClipboardManager\nimport android.content.Context\nimport android.content.res.TypedArray\nimport android.view.View\nimport android.view.inputmethod.EditorInfo\nimport android.widget.EditText\nimport com.scwang.smartrefresh.layout.SmartRefreshLayout\n\n\n/**\n * 防止重复点击\n * @param interval 重复间隔\n * @param onClick  事件响应\n */\nvar lastTime = 0L\nfun View.clickNoRepeat(interval: Long = 400, onClick: (View) -> Unit) {\n    setOnClickListener {\n        val currentTime = System.currentTimeMillis()\n        if (lastTime != 0L && (currentTime - lastTime < interval)) {\n            return@setOnClickListener\n        }\n        lastTime = currentTime\n        onClick(it)\n    }\n}\n\n/**\n * 复制剪切板\n */\nfun copy(context: Context, msg: String) {\n    val clip = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager\n    clip.setPrimaryClip(ClipData.newPlainText(\"text\", msg))\n    toast(\"已复制\")\n}\n\n\n/**\n * 隐藏刷新加载ui\n */\nfun SmartRefreshLayout.smartDismiss() {\n    finishRefresh(0)\n    finishLoadMore(0)\n}\n\n\n/**\n * 获取当前主图颜色属性\n */\nfun Context.getThemeColor(attr: Int): Int {\n    val array: TypedArray = theme.obtainStyledAttributes(\n        intArrayOf(\n            attr\n        )\n    )\n    val color = array.getColor(0, -0x50506)\n    array.recycle()\n    return color\n}\n\n\n/**\n * editText搜索按钮\n * @param onClick 搜索点击事件\n */\nfun EditText.keyBoardSearch(onClick: () -> Unit) {\n    //添加搜索按钮\n    setOnEditorActionListener { _, actionId, _ ->\n        if (actionId == EditorInfo.IME_ACTION_SEARCH) {\n            onClick()\n        } else {\n            toast(\"请输入关键字\")\n            return@setOnEditorActionListener false\n        }\n        return@setOnEditorActionListener true\n    }\n}\n\n\n\n\n\n"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/widgets/EasyPopupWindow.kt",
    "content": "package com.pengxh.autodingding.widgets\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport android.widget.AdapterView.OnItemClickListener\nimport android.widget.ListView\nimport android.widget.PopupWindow\nimport com.pengxh.autodingding.R\n\n/**\n * @description: TODO 顶部下拉菜单\n * @author: Pengxh\n * @email: 290677893@qq.com\n * @date: 2019/12/28 20:35\n */\nclass EasyPopupWindow(private val mContext: Context, private val itemList: List<String>) :\n    PopupWindow(\n        mContext\n    ) {\n    private var mClickListener: PopupWindowClickListener? = null\n\n    init {\n        width = 400\n        height = ViewGroup.LayoutParams.WRAP_CONTENT\n        isOutsideTouchable = true\n        isFocusable = true\n        animationStyle = R.style.PopupAnimation\n        val contentView = LayoutInflater.from(mContext).inflate(R.layout.easy_popup, null, false)\n        setContentView(contentView)\n        val popupListView = contentView.findViewById<ListView>(R.id.popupListView)\n        setupListView(popupListView)\n    }\n\n    //给PopupWindow列表绑定数据\n    private fun setupListView(popupListView: ListView) {\n        val adapter = PopupAdapter(mContext, itemList)\n        popupListView.adapter = adapter\n        popupListView.onItemClickListener = OnItemClickListener { adapterView, view, i, l ->\n            if (mClickListener != null) {\n                mClickListener!!.popupWindowClick(i)\n            }\n            dismiss()\n        }\n    }\n\n    interface PopupWindowClickListener {\n        fun popupWindowClick(position: Int)\n    }\n\n    fun setPopupWindowClickListener(windowClickListener: PopupWindowClickListener?) {\n        mClickListener = windowClickListener\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/pengxh/autodingding/widgets/PopupAdapter.java",
    "content": "package com.pengxh.autodingding.widgets;\n\nimport android.content.Context;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\nimport com.pengxh.autodingding.R;\nimport com.pengxh.autodingding.utils.Constant;\n\nimport java.util.List;\n\n/**\n * @description: TODO\n * @author: Pengxh\n * @email: 290677893@qq.com\n * @date: 2019/12/28 20:46\n */\npublic class PopupAdapter extends BaseAdapter {\n\n    private final List<String> itemList;\n    private final LayoutInflater inflater;\n\n    public PopupAdapter(Context mContext, List<String> stringList) {\n        this.itemList = stringList;\n        inflater = LayoutInflater.from(mContext);\n    }\n\n    @Override\n    public int getCount() {\n        return itemList == null ? 0 : itemList.size();\n    }\n\n    @Override\n    public Object getItem(int position) {\n        return itemList.get(position);\n    }\n\n    @Override\n    public long getItemId(int position) {\n        return position;\n    }\n\n    @Override\n    public View getView(int position, View convertView, ViewGroup parent) {\n        PopupWindowHolder holder;\n        if (convertView == null) {\n            convertView = inflater.inflate(R.layout.item_easy_popup, null);\n            holder = new PopupWindowHolder();\n            holder.itemIcon = convertView.findViewById(R.id.itemIcon);\n            holder.itemName = convertView.findViewById(R.id.itemName);\n            convertView.setTag(holder);\n        } else {\n            holder = (PopupWindowHolder) convertView.getTag();\n        }\n        holder.bindData(itemList.get(position), position);\n        return convertView;\n    }\n\n    private static class PopupWindowHolder {\n        private ImageView itemIcon;\n        private TextView itemName;\n\n        void bindData(String s, int index) {\n            itemIcon.setImageResource(Constant.images[index]);\n            itemName.setText(s);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/xcom/warof/chosen/greendao/DaoMaster.java",
    "content": "package xcom.warof.chosen.greendao;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteDatabase.CursorFactory;\nimport android.util.Log;\n\nimport org.greenrobot.greendao.AbstractDaoMaster;\nimport org.greenrobot.greendao.database.StandardDatabase;\nimport org.greenrobot.greendao.database.Database;\nimport org.greenrobot.greendao.database.DatabaseOpenHelper;\nimport org.greenrobot.greendao.identityscope.IdentityScopeType;\n\n\n// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.\n/**\n * Master of DAO (schema version 1): knows all DAOs.\n */\npublic class DaoMaster extends AbstractDaoMaster {\n    public static final int SCHEMA_VERSION = 1;\n\n    /** Creates underlying database table using DAOs. */\n    public static void createAllTables(Database db, boolean ifNotExists) {\n        HistoryRecordBeanDao.createTable(db, ifNotExists);\n    }\n\n    /** Drops underlying database table using DAOs. */\n    public static void dropAllTables(Database db, boolean ifExists) {\n        HistoryRecordBeanDao.dropTable(db, ifExists);\n    }\n\n    /**\n     * WARNING: Drops all table on Upgrade! Use only during development.\n     * Convenience method using a {@link DevOpenHelper}.\n     */\n    public static DaoSession newDevSession(Context context, String name) {\n        Database db = new DevOpenHelper(context, name).getWritableDb();\n        DaoMaster daoMaster = new DaoMaster(db);\n        return daoMaster.newSession();\n    }\n\n    public DaoMaster(SQLiteDatabase db) {\n        this(new StandardDatabase(db));\n    }\n\n    public DaoMaster(Database db) {\n        super(db, SCHEMA_VERSION);\n        registerDaoClass(HistoryRecordBeanDao.class);\n    }\n\n    public DaoSession newSession() {\n        return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);\n    }\n\n    public DaoSession newSession(IdentityScopeType type) {\n        return new DaoSession(db, type, daoConfigMap);\n    }\n\n    /**\n     * Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -\n     */\n    public static abstract class OpenHelper extends DatabaseOpenHelper {\n        public OpenHelper(Context context, String name) {\n            super(context, name, SCHEMA_VERSION);\n        }\n\n        public OpenHelper(Context context, String name, CursorFactory factory) {\n            super(context, name, factory, SCHEMA_VERSION);\n        }\n\n        @Override\n        public void onCreate(Database db) {\n            Log.i(\"greenDAO\", \"Creating tables for schema version \" + SCHEMA_VERSION);\n            createAllTables(db, false);\n        }\n    }\n\n    /** WARNING: Drops all table on Upgrade! Use only during development. */\n    public static class DevOpenHelper extends OpenHelper {\n        public DevOpenHelper(Context context, String name) {\n            super(context, name);\n        }\n\n        public DevOpenHelper(Context context, String name, CursorFactory factory) {\n            super(context, name, factory);\n        }\n\n        @Override\n        public void onUpgrade(Database db, int oldVersion, int newVersion) {\n            Log.i(\"greenDAO\", \"Upgrading schema from version \" + oldVersion + \" to \" + newVersion + \" by dropping all tables\");\n            dropAllTables(db, true);\n            onCreate(db);\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/xcom/warof/chosen/greendao/DaoSession.java",
    "content": "package xcom.warof.chosen.greendao;\n\nimport java.util.Map;\n\nimport org.greenrobot.greendao.AbstractDao;\nimport org.greenrobot.greendao.AbstractDaoSession;\nimport org.greenrobot.greendao.database.Database;\nimport org.greenrobot.greendao.identityscope.IdentityScopeType;\nimport org.greenrobot.greendao.internal.DaoConfig;\n\nimport com.pengxh.autodingding.bean.HistoryRecordBean;\n\nimport xcom.warof.chosen.greendao.HistoryRecordBeanDao;\n\n// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.\n\n/**\n * {@inheritDoc}\n * \n * @see org.greenrobot.greendao.AbstractDaoSession\n */\npublic class DaoSession extends AbstractDaoSession {\n\n    private final DaoConfig historyRecordBeanDaoConfig;\n\n    private final HistoryRecordBeanDao historyRecordBeanDao;\n\n    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>\n            daoConfigMap) {\n        super(db);\n\n        historyRecordBeanDaoConfig = daoConfigMap.get(HistoryRecordBeanDao.class).clone();\n        historyRecordBeanDaoConfig.initIdentityScope(type);\n\n        historyRecordBeanDao = new HistoryRecordBeanDao(historyRecordBeanDaoConfig, this);\n\n        registerDao(HistoryRecordBean.class, historyRecordBeanDao);\n    }\n    \n    public void clear() {\n        historyRecordBeanDaoConfig.clearIdentityScope();\n    }\n\n    public HistoryRecordBeanDao getHistoryRecordBeanDao() {\n        return historyRecordBeanDao;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/xcom/warof/chosen/greendao/HistoryRecordBeanDao.java",
    "content": "package xcom.warof.chosen.greendao;\n\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteStatement;\n\nimport org.greenrobot.greendao.AbstractDao;\nimport org.greenrobot.greendao.Property;\nimport org.greenrobot.greendao.internal.DaoConfig;\nimport org.greenrobot.greendao.database.Database;\nimport org.greenrobot.greendao.database.DatabaseStatement;\n\nimport com.pengxh.autodingding.bean.HistoryRecordBean;\n\n// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.\n/** \n * DAO for table \"HISTORY_RECORD_BEAN\".\n*/\npublic class HistoryRecordBeanDao extends AbstractDao<HistoryRecordBean, Long> {\n\n    public static final String TABLENAME = \"HISTORY_RECORD_BEAN\";\n\n    /**\n     * Properties of entity HistoryRecordBean.<br/>\n     * Can be used for QueryBuilder and for referencing column names.\n     */\n    public static class Properties {\n        public final static Property Id = new Property(0, Long.class, \"id\", true, \"_id\");\n        public final static Property Uuid = new Property(1, String.class, \"uuid\", false, \"UUID\");\n        public final static Property Date = new Property(2, String.class, \"date\", false, \"DATE\");\n        public final static Property Message = new Property(3, String.class, \"message\", false, \"MESSAGE\");\n    }\n\n\n    public HistoryRecordBeanDao(DaoConfig config) {\n        super(config);\n    }\n    \n    public HistoryRecordBeanDao(DaoConfig config, DaoSession daoSession) {\n        super(config, daoSession);\n    }\n\n    /** Creates the underlying database table. */\n    public static void createTable(Database db, boolean ifNotExists) {\n        String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n        db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"HISTORY_RECORD_BEAN\\\" (\" + //\n                \"\\\"_id\\\" INTEGER PRIMARY KEY AUTOINCREMENT ,\" + // 0: id\n                \"\\\"UUID\\\" TEXT,\" + // 1: uuid\n                \"\\\"DATE\\\" TEXT,\" + // 2: date\n                \"\\\"MESSAGE\\\" TEXT);\"); // 3: message\n    }\n\n    /** Drops the underlying database table. */\n    public static void dropTable(Database db, boolean ifExists) {\n        String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"HISTORY_RECORD_BEAN\\\"\";\n        db.execSQL(sql);\n    }\n\n    @Override\n    protected final void bindValues(DatabaseStatement stmt, HistoryRecordBean entity) {\n        stmt.clearBindings();\n \n        Long id = entity.getId();\n        if (id != null) {\n            stmt.bindLong(1, id);\n        }\n \n        String uuid = entity.getUuid();\n        if (uuid != null) {\n            stmt.bindString(2, uuid);\n        }\n \n        String date = entity.getDate();\n        if (date != null) {\n            stmt.bindString(3, date);\n        }\n \n        String message = entity.getMessage();\n        if (message != null) {\n            stmt.bindString(4, message);\n        }\n    }\n\n    @Override\n    protected final void bindValues(SQLiteStatement stmt, HistoryRecordBean entity) {\n        stmt.clearBindings();\n \n        Long id = entity.getId();\n        if (id != null) {\n            stmt.bindLong(1, id);\n        }\n \n        String uuid = entity.getUuid();\n        if (uuid != null) {\n            stmt.bindString(2, uuid);\n        }\n \n        String date = entity.getDate();\n        if (date != null) {\n            stmt.bindString(3, date);\n        }\n \n        String message = entity.getMessage();\n        if (message != null) {\n            stmt.bindString(4, message);\n        }\n    }\n\n    @Override\n    public Long readKey(Cursor cursor, int offset) {\n        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);\n    }    \n\n    @Override\n    public HistoryRecordBean readEntity(Cursor cursor, int offset) {\n        HistoryRecordBean entity = new HistoryRecordBean( //\n            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id\n            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // uuid\n            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // date\n            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3) // message\n        );\n        return entity;\n    }\n     \n    @Override\n    public void readEntity(Cursor cursor, HistoryRecordBean entity, int offset) {\n        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));\n        entity.setUuid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));\n        entity.setDate(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));\n        entity.setMessage(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));\n     }\n    \n    @Override\n    protected final Long updateKeyAfterInsert(HistoryRecordBean entity, long rowId) {\n        entity.setId(rowId);\n        return rowId;\n    }\n    \n    @Override\n    public Long getKey(HistoryRecordBean entity) {\n        if(entity != null) {\n            return entity.getId();\n        } else {\n            return null;\n        }\n    }\n\n    @Override\n    public boolean hasKey(HistoryRecordBean entity) {\n        return entity.getId() != null;\n    }\n\n    @Override\n    protected final boolean isEntityUpdateable() {\n        return true;\n    }\n    \n}\n"
  },
  {
    "path": "app/src/main/res/anim/popup_hide.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <alpha\n        android:duration=\"200\"\n        android:fromAlpha=\"1.0\"\n        android:toAlpha=\"0.0\" />\n</set>"
  },
  {
    "path": "app/src/main/res/anim/popup_show.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <scale\n        android:duration=\"200\"\n        android:fromXScale=\"0.0\"\n        android:fromYScale=\"0.0\"\n        android:interpolator=\"@android:anim/accelerate_decelerate_interpolator\"\n        android:pivotX=\"100%\"\n        android:pivotY=\"0%\"\n        android:toXScale=\"1.0\"\n        android:toYScale=\"1.0\" />\n</set>"
  },
  {
    "path": "app/src/main/res/drawable/bg_textview.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\">\n\n    <solid android:color=\"@color/iOSGreen\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/bg_textview_error.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\">\n\n    <solid android:color=\"#FFFF00\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/bottom_text_color.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@color/colorAppThemeLight\" android:state_checked=\"true\" />\n    <item android:color=\"@color/colorText\" android:state_checked=\"false\" />\n</selector>"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_stop.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"128px\"\n    android:height=\"128px\"\n    android:viewportWidth=\"1024\"\n    android:viewportHeight=\"1024\">\n    <path\n        android:fillColor=\"#FF3F00\"\n        android:pathData=\"M953.6,510.1c0,244.3 -198,442.3 -442.3,442.3 -244.2,0 -442.2,-198 -442.2,-442.3s198,-442.3 442.2,-442.3c244.3,0 442.3,198 442.3,442.3z\" />\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:pathData=\"M788.5,510.1c0,46 -37.2,83.2 -83.2,83.2h-388c-45.9,0 -83.2,-37.3 -83.2,-83.2 0,-46 37.2,-83.2 83.2,-83.2h388.1c45.9,0 83.1,37.2 83.1,83.2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/list_divider.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:left=\"10dp\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"#343434\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "app/src/main/res/drawable/popup_list_divider.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item\n        android:left=\"10dp\"\n        android:right=\"10dp\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"#FFFFFF\" />\n        </shape>\n    </item>\n</layer-list>"
  },
  {
    "path": "app/src/main/res/drawable/select_switch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@drawable/swich_background_on\" android:state_checked=\"true\" />\n    <item android:drawable=\"@drawable/swich_background_off\" />\n</selector>"
  },
  {
    "path": "app/src/main/res/drawable/select_switch_circle.xml",
    "content": "<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@drawable/switch_circle_on\" android:state_checked=\"true\" />\n    <item android:drawable=\"@drawable/switch_circle_off\" />\n</selector>"
  },
  {
    "path": "app/src/main/res/drawable/svg_back.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"200dp\"\n    android:height=\"200dp\"\n    android:viewportWidth=\"1024\"\n    android:viewportHeight=\"1024\">\n  <path\n      android:pathData=\"M768,160.85L691.2,85.33l-358.83,353.71L256,514.13l76.8,75.95L686.93,938.67l75.95,-75.09 -353.71,-348.59z\"\n      android:fillColor=\"@color/white\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/swich_background_off.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n\n    <size android:height=\"25dp\" />\n\n    <corners android:radius=\"20dp\" />\n\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"@color/gray\" />\n\n    <solid android:color=\"@color/gray\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/swich_background_on.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n\n    <size android:height=\"25dp\" />\n\n    <corners android:radius=\"20dp\" />\n\n    <solid android:color=\"@color/iOSGreen\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/switch_circle_off.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <size\n        android:width=\"25dp\"\n        android:height=\"25dp\" />\n\n    <corners android:radius=\"20dp\" />\n\n    <stroke\n        android:width=\"2dp\"\n        android:color=\"#CCCCCC\" />\n\n    <solid android:color=\"#FFFFFF\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/switch_circle_on.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <size\n        android:width=\"25dp\"\n        android:height=\"25dp\" />\n\n    <corners android:radius=\"20dp\" />\n\n    <stroke\n        android:width=\"2dp\"\n        android:color=\"@color/iOSGreen\" />\n\n    <solid android:color=\"#FFFFFF\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable-v24/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:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillType=\"evenOdd\"\n        android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"78.5885\"\n                android:endY=\"90.9159\"\n                android:startX=\"48.7653\"\n                android:startY=\"61.0927\"\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=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_history.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/parentLayout\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#FFFFFF\"\n    android:orientation=\"vertical\">\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"46dp\"\n        android:background=\"@color/colorAppThemeLight\">\n\n        <TextView\n            android:id=\"@+id/titleView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@color/colorAppThemeLight\"\n            android:gravity=\"center\"\n            android:paddingVertical=\"10dp\"\n            android:text=\"@string/app_name\"\n            android:textColor=\"@color/white\"\n            android:textSize=\"18sp\" />\n\n        <ImageView\n            android:id=\"@+id/titleRightView\"\n            style=\"@style/rightImageStyle\"\n            android:background=\"@mipmap/settings\" />\n    </RelativeLayout>\n\n    <com.scwang.smartrefresh.layout.SmartRefreshLayout\n        android:id=\"@+id/refreshLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <com.scwang.smartrefresh.layout.header.ClassicsHeader\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\">\n\n            <ImageView\n                android:id=\"@+id/emptyView\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerInParent=\"true\"\n                android:src=\"@mipmap/empty\"\n                android:visibility=\"gone\" />\n\n            <ListView\n                android:id=\"@+id/historyListView\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:layout_centerInParent=\"true\"\n                android:dividerHeight=\"1px\"\n                android:scrollbars=\"none\" />\n        </RelativeLayout>\n\n    </com.scwang.smartrefresh.layout.SmartRefreshLayout>\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n    <LinearLayout\n        android:id=\"@+id/llContainer\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <TextView\n            android:id=\"@+id/titleView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@color/colorAppThemeLight\"\n            android:gravity=\"center\"\n            android:paddingVertical=\"10dp\"\n            android:text=\"@string/app_name\"\n            android:textColor=\"@color/white\"\n            android:textSize=\"18sp\" />\n\n        <androidx.viewpager2.widget.ViewPager2\n            android:id=\"@+id/mViewPager\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0dp\"\n            android:layout_weight=\"1\" />\n\n        <com.google.android.material.bottomnavigation.BottomNavigationView\n            android:id=\"@+id/bottomNavigation\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"#FFFFFF\"\n            app:itemIconTint=\"@drawable/bottom_text_color\"\n            app:itemTextColor=\"@drawable/bottom_text_color\"\n            app:menu=\"@menu/bottom_nav_menu\" />\n    </LinearLayout>\n    <androidx.fragment.app.FragmentContainerView\n        android:id=\"@+id/fragmentContainer\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"/>\n</androidx.constraintlayout.widget.ConstraintLayout>\n\n"
  },
  {
    "path": "app/src/main/res/layout/easy_popup.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"#66000000\">\n\n    <ListView\n        android:id=\"@+id/popupListView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:divider=\"@drawable/popup_list_divider\"\n        android:dividerHeight=\"1px\"\n        android:scrollbars=\"none\" />\n</RelativeLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/fragment_day.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/white\"\n    android:orientation=\"vertical\">\n\n    <TextView\n        android:id=\"@+id/currentTime\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:fontFamily=\"monospace\"\n        android:gravity=\"center\"\n        android:padding=\"30dp\"\n        android:text=\"--:--:--\"\n        android:textColor=\"@color/colorText\"\n        android:textSize=\"40sp\"\n        android:textStyle=\"bold\" />\n\n    <androidx.cardview.widget.CardView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginStart=\"20dp\"\n        android:layout_marginEnd=\"20dp\"\n        app:cardCornerRadius=\"5dp\"\n        app:cardElevation=\"10dp\">\n\n        <RelativeLayout\n            android:id=\"@+id/startLayoutView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"170dp\"\n            android:background=\"@mipmap/bg_2\"\n            android:padding=\"5dp\">\n\n            <RelativeLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\">\n\n                <ImageView\n                    android:id=\"@+id/v\"\n                    android:layout_width=\"80px\"\n                    android:layout_height=\"80px\"\n                    android:background=\"@mipmap/clock\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_toEndOf=\"@id/v\"\n                    android:text=\"上班打卡\"\n                    android:textColor=\"@color/white\" />\n\n                <ImageView\n                    android:id=\"@+id/endAmDuty\"\n                    android:layout_width=\"80px\"\n                    android:layout_height=\"80px\"\n                    android:layout_alignParentEnd=\"true\"\n                    android:background=\"@drawable/ic_stop\" />\n            </RelativeLayout>\n\n            <TextView\n                android:id=\"@+id/startTimeView\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerInParent=\"true\"\n                android:text=\"--\"\n                android:textColor=\"@color/white\"\n                android:textSize=\"50sp\" />\n\n            <TextView\n                android:id=\"@+id/amTime\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentBottom=\"true\"\n                android:text=\"--:--:--\"\n                android:textColor=\"@color/white\" />\n\n            <ImageView\n                android:layout_width=\"80px\"\n                android:layout_height=\"80px\"\n                android:layout_alignParentEnd=\"true\"\n                android:layout_alignParentBottom=\"true\"\n                android:background=\"@mipmap/ding\" />\n        </RelativeLayout>\n    </androidx.cardview.widget.CardView>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"30dp\" />\n\n    <androidx.cardview.widget.CardView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginStart=\"20dp\"\n        android:layout_marginEnd=\"20dp\"\n        app:cardCornerRadius=\"5dp\"\n        app:cardElevation=\"10dp\">\n\n        <RelativeLayout\n            android:id=\"@+id/endLayoutView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"170dp\"\n            android:background=\"@mipmap/bg_2\"\n            android:padding=\"5dp\">\n\n            <RelativeLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\">\n\n                <ImageView\n                    android:id=\"@+id/vv\"\n                    android:layout_width=\"80px\"\n                    android:layout_height=\"80px\"\n                    android:background=\"@mipmap/clock\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_toEndOf=\"@id/vv\"\n                    android:text=\"下班打卡\"\n                    android:textColor=\"@color/white\" />\n\n                <ImageView\n                    android:id=\"@+id/endPmDuty\"\n                    android:layout_width=\"80px\"\n                    android:layout_height=\"80px\"\n                    android:layout_alignParentEnd=\"true\"\n                    android:background=\"@drawable/ic_stop\" />\n            </RelativeLayout>\n\n            <TextView\n                android:id=\"@+id/endTimeView\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerInParent=\"true\"\n                android:text=\"--\"\n                android:textColor=\"@color/white\"\n                android:textSize=\"50sp\" />\n\n            <TextView\n                android:id=\"@+id/pmTime\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentBottom=\"true\"\n                android:text=\"--:--:--\"\n                android:textColor=\"@color/white\" />\n\n            <ImageView\n                android:layout_width=\"80px\"\n                android:layout_height=\"80px\"\n                android:layout_alignParentEnd=\"true\"\n                android:layout_alignParentBottom=\"true\"\n                android:background=\"@mipmap/ding\" />\n        </RelativeLayout>\n    </androidx.cardview.widget.CardView>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/fragment_mail_conf.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/white\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    tools:context=\".ui.fragment.PushFragment\">\n\n    <androidx.constraintlayout.widget.ConstraintLayout\n        android:id=\"@+id/clHeader\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:gravity=\"center_vertical\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        android:elevation=\"6dp\"\n        android:background=\"@color/iOSGreen\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/ivBack\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:padding=\"15dp\"\n            android:src=\"@drawable/svg_back\"\n            app:layout_constraintLeft_toLeftOf=\"parent\"\n            app:layout_constraintBottom_toBottomOf=\"parent\"\n            app:layout_constraintTop_toTopOf=\"parent\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"邮箱设置\"\n            android:textColor=\"@color/white\"\n            android:textSize=\"17sp\"\n            app:layout_constraintBottom_toBottomOf=\"parent\"\n            app:layout_constraintEnd_toEndOf=\"parent\"\n            app:layout_constraintStart_toStartOf=\"parent\"\n            app:layout_constraintTop_toTopOf=\"parent\" />\n    </androidx.constraintlayout.widget.ConstraintLayout>\n    <TextView\n        android:id=\"@+id/tvSenderEmail\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginStart=\"8dp\"\n        android:layout_marginTop=\"8dp\"\n        android:text=\"发件QQ邮箱地址，如123456@qq.com\"\n        app:layout_constraintTop_toBottomOf=\"@id/clHeader\"/>\n    <EditText\n        android:id=\"@+id/etSenderEmailAddress\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:maxLines=\"1\"\n        android:layout_marginTop=\"8dp\"\n        android:hint=\"发件QQ邮箱地址，如123456@qq.com\"\n        android:inputType=\"textEmailAddress\"\n        style=\"@style/Widget.AppCompat.EditText\"\n        app:layout_constraintTop_toBottomOf=\"@id/tvSenderEmail\"/>\n    <TextView\n        android:id=\"@+id/tvSenderAuth\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginStart=\"8dp\"\n        android:layout_marginTop=\"8dp\"\n        android:text=\"发件QQ邮箱授权码，在qq邮箱设置里获取\"\n        app:layout_constraintTop_toBottomOf=\"@id/etSenderEmailAddress\"/>\n    <EditText\n        android:id=\"@+id/etSenderEmailAuth\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:maxLines=\"1\"\n        android:layout_marginTop=\"8dp\"\n        android:hint=\"发件QQ邮箱授权码，在qq邮箱设置里获取\"\n        android:inputType=\"textPassword\"\n        style=\"@style/Widget.AppCompat.EditText\"\n        app:layout_constraintTop_toBottomOf=\"@id/tvSenderAuth\"\n        tools:ignore=\"TextFields\" />\n    <TextView\n        android:id=\"@+id/tvReceiverEmail\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginStart=\"8dp\"\n        android:layout_marginTop=\"8dp\"\n        android:text=\"收件QQ邮箱地址，可以与发件邮箱相同\"\n        app:layout_constraintTop_toBottomOf=\"@id/etSenderEmailAuth\"/>\n    <EditText\n        android:id=\"@+id/etReceiverEmailAddress\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:maxLines=\"1\"\n        android:layout_marginTop=\"8dp\"\n        android:hint=\"收件QQ邮箱地址，可以与发件邮箱相同\"\n        android:inputType=\"textEmailAddress\"\n        style=\"@style/Widget.AppCompat.EditText\"\n        app:layout_constraintTop_toBottomOf=\"@id/tvReceiverEmail\"/>\n\n    <Button\n        android:id=\"@+id/btnCheck\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        android:layout_marginTop=\"8dp\"\n        app:layout_constraintTop_toBottomOf=\"@id/etReceiverEmailAddress\"\n        android:backgroundTint=\"@android:color/holo_orange_light\"\n        android:text=\"测试邮箱配置\"/>\n    <Button\n        android:id=\"@+id/btnSave\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"8dp\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        app:layout_constraintTop_toBottomOf=\"@id/btnCheck\"\n        android:backgroundTint=\"@android:color/holo_blue_bright\"\n        android:text=\"保存邮箱配置\"/>\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:layout_constraintTop_toBottomOf=\"@id/btnSave\"\n        android:text=\"@string/mail_setting_tip\"/>\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "app/src/main/res/layout/fragment_push.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/white\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    tools:context=\".ui.fragment.PushFragment\">\n\n    <androidx.constraintlayout.widget.ConstraintLayout\n        android:id=\"@+id/clHeader\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:gravity=\"center_vertical\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        android:elevation=\"6dp\"\n        android:background=\"@color/iOSGreen\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/ivBack\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:padding=\"15dp\"\n            android:src=\"@drawable/svg_back\"\n            app:layout_constraintLeft_toLeftOf=\"parent\"\n            app:layout_constraintBottom_toBottomOf=\"parent\"\n            app:layout_constraintTop_toTopOf=\"parent\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"推送设置\"\n            android:textColor=\"@color/white\"\n            android:textSize=\"17sp\"\n            app:layout_constraintBottom_toBottomOf=\"parent\"\n            app:layout_constraintEnd_toEndOf=\"parent\"\n            app:layout_constraintStart_toStartOf=\"parent\"\n            app:layout_constraintTop_toTopOf=\"parent\" />\n    </androidx.constraintlayout.widget.ConstraintLayout>\n\n    <EditText\n        android:id=\"@+id/etTargetRegId\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:maxLines=\"1\"\n        android:layout_marginTop=\"8dp\"\n        android:hint=\"输入推送目标的注册id\"\n        style=\"@style/Widget.AppCompat.EditText\"\n        app:layout_constraintTop_toBottomOf=\"@id/clHeader\"/>\n\n    <Button\n        android:id=\"@+id/btnCheck\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        android:layout_marginTop=\"8dp\"\n        app:layout_constraintTop_toBottomOf=\"@id/etTargetRegId\"\n        android:backgroundTint=\"@color/sky\"\n        android:text=\"推送检查指令(会点亮屏幕)\"/>\n    <Button\n        android:id=\"@+id/btnStatus\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        android:layout_marginTop=\"8dp\"\n        app:layout_constraintTop_toBottomOf=\"@id/btnCheck\"\n        android:backgroundTint=\"@color/cyan\"\n        android:text=\"推送获取手机电量状态指令(不会亮屏)\"/>\n    <Button\n        android:id=\"@+id/btnScreenShot\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        android:layout_marginTop=\"8dp\"\n        app:layout_constraintTop_toBottomOf=\"@id/btnStatus\"\n        android:backgroundTint=\"@color/orange\"\n        android:text=\"推送截屏指令(会亮屏)\"/>\n    <Button\n        android:id=\"@+id/btnPush\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"8dp\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        app:layout_constraintTop_toBottomOf=\"@id/btnScreenShot\"\n        android:backgroundTint=\"@color/weChatGreen\"\n        android:text=\"推送打开钉钉指令\"/>\n\n    <TextView\n        android:id=\"@+id/tvTest\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:layout_constraintTop_toBottomOf=\"@id/btnPush\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        android:textSize=\"18sp\"\n        android:textColor=\"#000\"\n        android:layout_marginStart=\"8dp\"\n        android:layout_marginTop=\"8dp\"\n        android:text=\"测试功能:\"/>\n    <Button\n        android:id=\"@+id/btnManualSign\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"8dp\"\n        style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n        app:layout_constraintTop_toBottomOf=\"@id/tvTest\"\n        android:backgroundTint=\"#F00\"\n        android:text=\"推送辅助手动打卡指令(测试功能)\"/>\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "app/src/main/res/layout/fragment_remote_sign.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:orientation=\"vertical\">\n   <androidx.constraintlayout.widget.ConstraintLayout\n       android:layout_width=\"match_parent\"\n       android:layout_height=\"match_parent\">\n       <TextView\n           android:id=\"@+id/tv_sender_title\"\n           android:layout_width=\"wrap_content\"\n           android:layout_height=\"wrap_content\"\n           app:layout_constraintTop_toTopOf=\"parent\"\n           app:layout_constraintLeft_toLeftOf=\"parent\"\n           app:layout_constraintRight_toRightOf=\"parent\"\n           android:text=\"指令发送\"\n           android:textColor=\"@android:color/black\"\n           android:textSize=\"24sp\"\n           android:layout_marginTop=\"16dp\"\n           />\n       <Button\n           android:layout_width=\"wrap_content\"\n           android:layout_height=\"wrap_content\"\n           android:text=\"切换发送/接收视图\"\n           android:textColor=\"@android:color/white\"\n           android:textSize=\"16sp\"\n           android:layout_marginEnd=\"16dp\"\n           android:layout_marginTop=\"8dp\"\n           android:backgroundTint=\"@color/colorAppThemeLight\"\n           app:layout_constraintRight_toRightOf=\"parent\"\n           app:layout_constraintTop_toBottomOf=\"@id/tv_sender_title\"/>\n\n   </androidx.constraintlayout.widget.ConstraintLayout>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/fragment_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:background=\"#F3F7FF\"\n    android:orientation=\"vertical\">\n\n    <RelativeLayout\n        android:id=\"@+id/emailLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center_vertical\"\n            android:text=\"邮箱设置\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <TextView\n            android:id=\"@+id/emailTextView\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentEnd=\"true\"\n            android:gravity=\"center_vertical\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n    </RelativeLayout>\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:background=\"@color/gray\" />\n    <RelativeLayout\n        android:id=\"@+id/pushLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"2dp\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center_vertical\"\n            android:text=\"发送推送\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <TextView\n            android:id=\"@+id/pushTextView\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentEnd=\"true\"\n            android:gravity=\"center_vertical\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\"\n            tools:text=\"what\" />\n    </RelativeLayout>\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"16dp\"\n        android:background=\"@android:color/darker_gray\"/>\n    <RelativeLayout\n        android:id=\"@+id/historyLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"打卡记录\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <TextView\n            android:id=\"@+id/recordSize\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentEnd=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n    </RelativeLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:background=\"@color/gray\" />\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"通知监听\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <CheckBox\n            android:id=\"@+id/noticeCheckBox\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentEnd=\"true\"\n            android:layout_centerVertical=\"true\" />\n    </RelativeLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:background=\"#CCC\" />\n\n    <RelativeLayout\n        android:id=\"@+id/permissionLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"权限检查\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <ImageView\n            android:layout_width=\"72px\"\n            android:layout_height=\"72px\"\n            android:layout_alignParentEnd=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:background=\"@mipmap/right\" />\n    </RelativeLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:background=\"#CCC\" />\n\n    <RelativeLayout\n        android:id=\"@+id/introduceLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"使用说明\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <ImageView\n            android:layout_width=\"72px\"\n            android:layout_height=\"72px\"\n            android:layout_alignParentEnd=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:background=\"@mipmap/right\" />\n    </RelativeLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:background=\"#CCC\" />\n\n    <RelativeLayout\n        android:id=\"@+id/testLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"实验功能\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <ImageView\n            android:layout_width=\"72px\"\n            android:layout_height=\"72px\"\n            android:layout_alignParentEnd=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:background=\"@mipmap/right\" />\n    </RelativeLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:background=\"#CCC\" />\n\n    <RelativeLayout\n        android:id=\"@+id/rlVersion\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:selectableItemBackground\"\n        android:padding=\"10dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center_vertical\"\n            android:text=\"当前版本\"\n            android:textColor=\"@color/colorText\"\n            android:textSize=\"18sp\" />\n\n        <TextView\n            android:id=\"@+id/appVersion\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentEnd=\"true\"\n            android:gravity=\"center_vertical\"\n            android:textColor=\"@color/colorText\"\n            tools:text=\"1.0.1\"\n            android:textSize=\"18sp\" />\n    </RelativeLayout>\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <TextView\n            android:id=\"@+id/tvRegTitle\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_marginStart=\"8dp\"\n            android:layout_marginTop=\"10dp\"\n            android:text=\"你的推送Registration ID,用来在指令手机的推送设置里定向发指令用，目前有检查在线指令和远程打开钉钉指令\"\n            android:textColor=\"@color/colorText\" />\n\n        <TextView\n            android:id=\"@+id/tvRegValue\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/tvRegTitle\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_marginTop=\"10dp\"\n            android:text=\"\"\n            android:textColor=\"@color/colorText\"\n            tools:text=\"160a3797c8f373355a2\" />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/tvRegValue\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/btnCopy\"\n                style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginStart=\"20dp\"\n                android:backgroundTint=\"@color/iOSGreen\"\n                android:text=\"复制\" />\n\n            <Button\n                android:id=\"@+id/btnTestLaunchDing\"\n                style=\"@style/TextAppearance.AppCompat.Widget.Button.Colored\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginStart=\"20dp\"\n                android:backgroundTint=\"@color/iOSGreen\"\n                android:text=\"测试打开钉钉\" />\n        </LinearLayout>\n\n    </RelativeLayout>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/include_title.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"46dp\"\n    android:background=\"@color/colorAppThemeLight\">\n\n    <ImageView\n        android:id=\"@+id/titleLeftView\"\n        style=\"@style/leftImageStyle\"\n        android:background=\"@mipmap/right\" />\n\n    <TextView\n        android:id=\"@+id/titleView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:singleLine=\"true\"\n        android:text=\"这是标题\"\n        android:textColor=\"@color/white\"\n        android:textSize=\"18sp\" />\n\n    <ImageView\n        android:id=\"@+id/titleRightView\"\n        style=\"@style/rightImageStyle\"\n        android:background=\"@mipmap/right\"\n        android:visibility=\"visible\" />\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/item_easy_popup.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"10dp\">\n\n    <ImageView\n        android:id=\"@+id/itemIcon\"\n        android:layout_width=\"72px\"\n        android:layout_height=\"72px\" />\n\n    <TextView\n        android:id=\"@+id/itemName\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerVertical=\"true\"\n        android:layout_marginStart=\"10dp\"\n        android:layout_toEndOf=\"@id/itemIcon\"\n        android:text=\"@string/app_name\"\n        android:textColor=\"@color/white\"\n        android:textSize=\"16sp\" />\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/item_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"8dp\">\n\n    <TextView\n        android:id=\"@+id/noticeMessage\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"下班打卡成功\"\n        android:textColor=\"@color/colorText\"\n        android:textSize=\"18sp\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\" />\n\n    <TextView\n        android:id=\"@+id/noticeDate\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@id/noticeMessage\"\n        android:layout_marginTop=\"4dp\"\n        android:text=\"2020年2月12日\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@id/noticeMessage\" />\n\n    <ImageView\n        android:id=\"@+id/tagView\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:background=\"@drawable/bg_textview\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintBottom_toBottomOf=\"parent\" />\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "app/src/main/res/layout/item_tab.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <ImageView\n        android:id=\"@+id/tab_icon\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\" />\n\n    <TextView\n        android:id=\"@+id/tab_title\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/permission_fragment.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <data>\n\n        <variable\n            name=\"vm\"\n            type=\"com.pengxh.autodingding.ui.fragment.PermissionVM\" />\n    </data>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:fitsSystemWindows=\"true\"\n        android:orientation=\"vertical\"\n        android:background=\"@color/white\">\n\n        <androidx.constraintlayout.widget.ConstraintLayout\n            android:id=\"@+id/clHeader\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"55dp\"\n            android:background=\"@color/iOSGreen\"\n            android:elevation=\"6dp\"\n            android:gravity=\"center_vertical\"\n            android:orientation=\"horizontal\"\n            app:layout_constraintEnd_toEndOf=\"parent\"\n            app:layout_constraintStart_toStartOf=\"parent\"\n            app:layout_constraintTop_toTopOf=\"parent\">\n\n            <ImageView\n                android:id=\"@+id/ivBack\"\n                android:layout_width=\"50dp\"\n                android:layout_height=\"50dp\"\n                android:padding=\"15dp\"\n                android:src=\"@drawable/svg_back\"\n                app:layout_constraintBottom_toBottomOf=\"parent\"\n                app:layout_constraintLeft_toLeftOf=\"parent\"\n                app:layout_constraintTop_toTopOf=\"parent\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"主要权限状态\"\n                android:textColor=\"@color/white\"\n                android:textSize=\"17sp\"\n                app:layout_constraintBottom_toBottomOf=\"parent\"\n                app:layout_constraintEnd_toEndOf=\"parent\"\n                app:layout_constraintStart_toStartOf=\"parent\"\n                app:layout_constraintTop_toTopOf=\"parent\" />\n        </androidx.constraintlayout.widget.ConstraintLayout>\n        <RelativeLayout\n            android:id=\"@+id/rlBgStart\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"?android:selectableItemBackground\"\n            android:padding=\"10dp\">\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"center_vertical\"\n                android:text=\"后台启动界面\"\n                android:textColor=\"@color/colorText\"\n                android:textSize=\"18sp\" />\n\n            <TextView\n                android:id=\"@+id/tvBgStart\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentEnd=\"true\"\n                android:gravity=\"center_vertical\"\n                android:textColor=\"@color/colorText\"\n                android:textSize=\"18sp\"\n                android:text=\"@{vm.bgStartEnable?`已开启`:`未开启`}\"\n                tools:text=\"未开启\" />\n        </RelativeLayout>\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:background=\"#CCC\" />\n        <RelativeLayout\n            android:id=\"@+id/rlAccessibility\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"?android:selectableItemBackground\"\n            android:padding=\"10dp\">\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"center_vertical\"\n                android:text=\"无障碍\"\n                android:textColor=\"@color/colorText\"\n                android:textSize=\"18sp\" />\n\n            <TextView\n                android:id=\"@+id/tvAccessibility\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentEnd=\"true\"\n                android:gravity=\"center_vertical\"\n                android:textColor=\"@color/colorText\"\n                android:text=\"@{vm.accessibilityEnable?`已开启`:`未开启`}\"\n                tools:text=\"已开启\"\n                android:textSize=\"18sp\" />\n        </RelativeLayout>\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:background=\"#CCC\" />\n\n\n    </LinearLayout>\n</layout>\n"
  },
  {
    "path": "app/src/main/res/menu/bottom_nav_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <item\n        android:id=\"@+id/nav_auto_sign\"\n        android:enabled=\"true\"\n        android:icon=\"@mipmap/day_gray\"\n        android:title=\"远程启动\"\n        app:showAsAction=\"ifRoom\" />\n\n    <item\n        android:id=\"@+id/nav_settings\"\n        android:enabled=\"true\"\n        android:icon=\"@mipmap/settings_gray\"\n        android:title=\"设置\"\n        app:showAsAction=\"ifRoom\" />\n</menu>"
  },
  {
    "path": "app/src/main/res/raw/tip",
    "content": "妈我建议你可以考虑这几个方向。\n1、见下国强小姑，和国强小姑商量一下你怎么和院长发个短信打个电话之类的方法跟进一下事情进展，\n让院长能给到我爸明确的彩礼数字和给的时间的答复。\n2、见下小辰她妈妈，和她妈妈一起吐槽一下爸这边态度问题，舒缓一下两家紧张的关系，再私下在领证前给到她妈妈3万，请她临场只问我爸要5万8，\n我爸要是高兴了可能还是会坚持按院长说的给足8万8的话引玲姨自然会把你多给的3万再私下退回给你"
  },
  {
    "path": "app/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n</resources>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n    <color name=\"white\">#FFFFFF</color>\n    <color name=\"gray\">#CCCCCC</color>\n    <color name=\"colorAppTheme\">#0D0D0D</color>\n    <color name=\"colorListItem\">#171717</color>\n    <color name=\"colorText\">#333333</color>\n    <color name=\"colorLine\">#313131</color>\n    <color name=\"colorAppThemeLight\">#0094FF</color>\n    <color name=\"iOSGreen\">#4DDC64</color>\n    <color name=\"sky\">#0094FF</color>\n    <color name=\"orange\">#ffa500</color>\n    <color name=\"cyan\">#00ffff</color>\n    <color name=\"weChatGreen\">#32cd32</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">上班帮手</string>\n    <string name=\"about\">\n        Tips：此版本是测试版本，可能会有些问题我自测试没有发现的，有问题请发邮件给lttclaw@qq.com。建议用一台闲置的手机\n        放在公司来打卡，另一台手机来推送打卡指令。基本用法只需要一台闲置手机，定好时间后会自动打开钉钉，完成极速打卡；进阶用法\n        需要一台打卡手机，一台自用手机，把打卡手机的注册ID复制到推送界面推送打卡指令可以远程打开钉钉，完成极速打卡。设置须知：\\n\n        1、请先确认好通知栏监听已开启，如不开启将无法监听打卡成功的通知。\\n\n        2、调起钉钉实现自动打卡，需要把打卡手机锁屏密码之类的取消掉\\n\n        3、部分手机需要授权允许后台打开窗口\\n\n        3、先在设置里面测试下能否正常打开钉钉，第一次有些手机会让授权\\n\n        4、将钉钉软件上下班都设置为“极速打卡”。\\n\n        5、设置好自己的收信邮箱，跳转到“钉钉”打卡成功后会发送一封打卡成功的邮件到你自己设置好的邮箱。\\n\n    </string>\n\n    <string name=\"hello_blank_fragment\">空白页</string>\n    <string name=\"mail_setting_tip\">\n        请注意，如果您使用应用内自带的发件邮箱配置，即开发者本人的个人qq邮箱来发送打卡通知，您的这些邮件都会被本人在qq邮箱的\n        发件箱中看到，而且如果使用我的邮箱发件人数太多，我会考虑更换邮箱授权码，界时用此授权码的发邮件功能将无法正常工作。\n        因此，为了您的隐私考虑，请您最好去自己的qq邮箱设置里打开smtp服务获取自己的邮箱授权码在此配置\n    </string>\n    <string name=\"base_ser_desc\">远程启钉基础辅助服务</string>\n    <string name=\"ges_ser_desc\">远程启钉手势服务</string>\n    <string name=\"fore_service\">前台服务</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"actionOverflowMenuStyle\">@style/OverflowMenu</item>\n    </style>\n\n    <style name=\"OverflowMenu\" parent=\"Widget.AppCompat.PopupMenu.Overflow\">\n        <!-- 是否覆盖锚点，默认为true，即盖住Toolbar -->\n        <item name=\"overlapAnchor\">false</item>\n        <item name=\"android:dropDownWidth\">wrap_content</item>\n        <item name=\"android:paddingRight\">5dp</item>\n        <!-- 弹出层垂直方向上的偏移，即在竖直方向上距离Toolbar的距离，值为负则会盖住Toolbar -->\n        <item name=\"android:dropDownVerticalOffset\">5dp</item>\n        <!-- 弹出层水平方向上的偏移，即距离屏幕左边的距离，负值会导致右边出现空隙 -->\n        <item name=\"android:dropDownHorizontalOffset\">0dp</item>\n        <!-- 设置弹出菜单文字颜色 -->\n        <item name=\"android:textColor\">@color/white</item>\n    </style>\n\n    <style name=\"PopupAnimation\">\n        <item name=\"android:windowEnterAnimation\">@anim/popup_show</item>\n        <!-- 指定显示的动画xml -->\n\n        <item name=\"android:windowExitAnimation\">@anim/popup_hide</item>\n        <!-- 指定消失的动画xml -->\n    </style>\n\n    <!--等高RelativeLayout item容器样式-->\n    <style name=\"itemLayoutStyle\">\n        <item name=\"android:layout_width\">match_parent</item>\n        <item name=\"android:layout_height\">46dp</item>\n        <item name=\"android:background\">@color/white</item>\n    </style>\n\n    <!--APP内所有左边图片样式-->\n    <style name=\"leftImageStyle\">\n        <item name=\"android:layout_width\">80px</item>\n        <item name=\"android:layout_height\">80px</item>\n        <item name=\"android:layout_centerVertical\">true</item>\n        <item name=\"android:layout_marginStart\">10dp</item>\n    </style>\n\n    <!--APP内所有右边小箭头样式-->\n    <style name=\"rightImageStyle\">\n        <item name=\"android:layout_width\">80px</item>\n        <item name=\"android:layout_height\">80px</item>\n        <item name=\"android:layout_alignParentEnd\">true</item>\n        <item name=\"android:layout_centerVertical\">true</item>\n        <item name=\"android:layout_marginEnd\">10dp</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/xml/base_accessibility_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<accessibility-service xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:accessibilityEventTypes=\"typeAllMask\"\n    android:accessibilityFeedbackType=\"feedbackAllMask\"\n    android:accessibilityFlags=\"flagIncludeNotImportantViews|flagReportViewIds|flagRetrieveInteractiveWindows|flagRequestEnhancedWebAccessibility\"\n    android:canRetrieveWindowContent=\"true\"\n    android:description=\"@string/base_ser_desc\"\n    android:notificationTimeout=\"10\"\n    android:canRequestEnhancedWebAccessibility=\"true\"\n    android:settingsActivity=\".MainActivity\"\n    android:summary=\"基础导航/视图检索操作\"/>\n\n<!--    android:canRequestFilterKeyEvents=\"true\"-->\n<!--flagRequestFilterKeyEvents-->"
  },
  {
    "path": "app/src/main/res/xml-v24/gesture_accessibility_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<accessibility-service xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:accessibilityEventTypes=\"typeAllMask\"\n    android:accessibilityFeedbackType=\"feedbackAllMask\"\n    android:accessibilityFlags=\"flagIncludeNotImportantViews|flagReportViewIds|flagRetrieveInteractiveWindows|flagRequestEnhancedWebAccessibility\"\n    android:canRetrieveWindowContent=\"true\"\n    android:notificationTimeout=\"10\"\n    android:canRequestEnhancedWebAccessibility=\"true\"\n    android:settingsActivity=\".MainActivity\"\n    android:canPerformGestures=\"true\"\n    android:description=\"@string/ges_ser_desc\"\n    android:summary=\"执行手势\" />\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        mavenCentral()\n        maven { url 'https://jitpack.io' }\n        maven { url \"https://maven.aliyun.com/repository/public\" }\n        maven { url 'https://maven.aliyun.com/repository/google' }\n        google()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.4.2'\n        classpath 'org.greenrobot:greendao-gradle-plugin:3.3.1'\n        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\ntasks.register('clean', Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Apr 27 09:13:07 CST 2022\ndistributionBase=GRADLE_USER_HOME\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.6-all.zip\ndistributionPath=wrapper/dists\nzipStorePath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\nandroid.useAndroidX=true\n# Automatically convert third-party libraries to use AndroidX\nandroid.enableJetifier=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\norg.gradle.jvmargs=-Xmx1536m\nandroid.injected.testOnly=false\nandroid.nonTransitiveRClass=false\nandroid.nonFinalResIds=false\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\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=\"\"\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# 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, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\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=$((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\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "dependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n        maven { url \"https://maven.aliyun.com/repository/public\" }\n        maven { url 'https://maven.aliyun.com/repository/google' }\n        maven { url 'https://developer.huawei.com/repo/'\n            allowInsecureProtocol = true}\n    }\n}\ninclude ':app'\n"
  }
]